summaryrefslogtreecommitdiff
path: root/beos/beos_gui.cpp
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2008-10-02 13:34:20 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2008-10-02 13:34:20 +0000
commit08073fb3d696c474c92a6ac8cfabf8bf04774258 (patch)
tree9b4f658aa8362df25665e1a95c91f116316734d0 /beos/beos_gui.cpp
parent9e640a2ab97e0d7484268c2fc3456687a1b7360a (diff)
downloadnetsurf-08073fb3d696c474c92a6ac8cfabf8bf04774258.tar.gz
netsurf-08073fb3d696c474c92a6ac8cfabf8bf04774258.tar.bz2
- switch to using builtin css files from rsrc:
- add debug output to trace keyboard input as textinput doesn't work anymore. svn path=/trunk/netsurf/; revision=5468
Diffstat (limited to 'beos/beos_gui.cpp')
-rw-r--r--beos/beos_gui.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/beos/beos_gui.cpp b/beos/beos_gui.cpp
index 983ea7ae3..00feeb8ff 100644
--- a/beos/beos_gui.cpp
+++ b/beos/beos_gui.cpp
@@ -78,7 +78,10 @@ extern "C" {
/* Where to search for shared resources. Must have trailing / */
#define RESPATH "/boot/apps/netsurf/res/"
+
//TODO: use resources
+// enable using resources instead of files
+#define USE_RESOURCES 1
bool gui_in_multitask = false;
@@ -464,15 +467,22 @@ void gui_init(int argc, char** argv)
beos_fetch_filetype_init(buf);
/* set up stylesheet urls */
+
+#ifdef USE_RESOURCES
+ default_stylesheet_url = strdup("rsrc:/beosdefault.css,text/css");
+#else
find_resource(buf, "beosdefault.css", "./beos/res/beosdefault.css");
default_stylesheet_url = path_to_url(buf);
- //default_stylesheet_url = strdup("rsrc:/beosdefault.css,text/css");
+#endif
//default_stylesheet_url = generate_default_css();
LOG(("Using '%s' as Default CSS URL", default_stylesheet_url));
+#ifdef USE_RESOURCES
+ adblock_stylesheet_url = strdup("rsrc:/adblock.css,text/css");
+#else
find_resource(buf, "adblock.css", "./beos/res/adblock.css");
adblock_stylesheet_url = path_to_url(buf);
- //adblock_stylesheet_url = strdup("rsrc:/adblock.css,text/css");
+#endif
LOG(("Using '%s' as AdBlock CSS URL", adblock_stylesheet_url));
urldb_load(option_url_file);