diff options
author | Rob Kendrick <rjek@netsurf-browser.org> | 2006-07-23 18:26:11 +0000 |
---|---|---|
committer | Rob Kendrick <rjek@netsurf-browser.org> | 2006-07-23 18:26:11 +0000 |
commit | 754b0c0c73d42dc85ba04f8bb0a7220c0f6a2ca9 (patch) | |
tree | cae9d9be44ba4657f32575153d5c2c784a4c338c /gtk/gtk_gui.c | |
parent | 80b3286e9dcf17698464ac874f7fc0e934d85aa4 (diff) | |
download | netsurf-754b0c0c73d42dc85ba04f8bb0a7220c0f6a2ca9.tar.gz netsurf-754b0c0c73d42dc85ba04f8bb0a7220c0f6a2ca9.tar.bz2 |
Initial code to support usable Choices window in nsgtk. Unsupported choices are currently greyed out. Additionally, only the home page URL is current saved when Apply is clicked.
svn path=/trunk/netsurf/; revision=2792
Diffstat (limited to 'gtk/gtk_gui.c')
-rw-r--r-- | gtk/gtk_gui.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gtk/gtk_gui.c b/gtk/gtk_gui.c index 6b7408c33..164e83dc5 100644 --- a/gtk/gtk_gui.c +++ b/gtk/gtk_gui.c @@ -27,6 +27,7 @@ #include "netsurf/desktop/netsurf.h" #include "netsurf/desktop/options.h" #include "netsurf/gtk/gtk_gui.h" +#include "netsurf/gtk/gtk_options.h" #include "netsurf/render/box.h" #include "netsurf/render/form.h" #include "netsurf/render/html.h" @@ -43,11 +44,12 @@ bool gui_in_multitask = false; char *default_stylesheet_url; char *adblock_stylesheet_url; +char *options_file_location; +char *glade_file_location; struct gui_window *search_current_window = 0; GladeXML *gladeWindows; -GtkWindow *wndChoices; /** * Locate a shared resource file by searching known places in order. @@ -98,16 +100,24 @@ void gui_init(int argc, char** argv) char buf[PATH_MAX]; gtk_init(&argc, &argv); - - gladeWindows = glade_xml_new("./gtk/netsurf.glade", NULL, NULL); - wndChoices = glade_xml_get_widget(gladeWindows, "wndChoices"); + + /* TODO: make this search for the file using the resource finding + * function above + */ + glade_file_location = strdup("./gtk/netsurf.glade"); + + glade_init(); + gladeWindows = glade_xml_new(glade_file_location, NULL, NULL); glade_xml_signal_autoconnect(gladeWindows); find_resource(buf, "Choices", "Choices"); LOG(("Using '%s' as Choices file", buf)); + options_file_location = strdup(buf); options_read(buf); + nsgtk_options_init(); + if (!option_cookie_file) { find_resource(buf, "Cookies", "Cookies"); LOG(("Using '%s' as Cookies file", buf)); |