mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 22:41:30 +03:00
- 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
This commit is contained in:
parent
9e640a2ab9
commit
08073fb3d6
@ -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);
|
||||
|
@ -627,7 +627,6 @@ void nsbeos_dispatch_event(BMessage *message)
|
||||
LOG(("discarding event for destroyed scaffolding"));
|
||||
return;
|
||||
}
|
||||
//#warning XXX VALIDATE gui_window!!!
|
||||
|
||||
// messages for top-level
|
||||
if (scaffold) {
|
||||
@ -637,6 +636,7 @@ void nsbeos_dispatch_event(BMessage *message)
|
||||
return;
|
||||
}
|
||||
|
||||
LOG(("processing message"));
|
||||
switch (message->what) {
|
||||
case B_QUIT_REQUESTED:
|
||||
// from the BApplication
|
||||
@ -814,6 +814,7 @@ void nsbeos_window_keypress_event(BView *view, gui_window *g, BMessage *event)
|
||||
if (!numbytes)
|
||||
numbytes = strlen(bytes);
|
||||
|
||||
LOG(("mods 0x%08lx key %ld raw %ld byte[0] %d", mods, key, raw_char, buff[0]));
|
||||
|
||||
char byte;
|
||||
if (numbytes == 1) {
|
||||
@ -877,7 +878,9 @@ void nsbeos_window_keypress_event(BView *view, gui_window *g, BMessage *event)
|
||||
// else use convert_from_utf8()
|
||||
}
|
||||
|
||||
if (browser_window_key_press(g->bw, nskey))
|
||||
bool done = browser_window_key_press(g->bw, nskey);
|
||||
LOG(("nskey %d %d", nskey, done));
|
||||
//if (browser_window_key_press(g->bw, nskey))
|
||||
return;
|
||||
|
||||
}
|
||||
|
@ -4,7 +4,8 @@
|
||||
|
||||
/* Load base stylesheet. */
|
||||
|
||||
@import "default.css";
|
||||
/*@import "default.css";*/
|
||||
@import "rsrc:/default.css,text/css";
|
||||
|
||||
/* Apply GTK specific rules. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user