> Index: gtk/res/warning.glade
>
this file originates from glade branch; one of the bugs that needed
addressing was that netsurf.glade had several windows in its structure
so it would need in-depth manual re-editing frequently when the merest
change to one of the windows caused glade to rearrange the order of the
windows in its xml;
> ===================================================================
> --- /dev/null 2009-04-16 19:17:07.000000000 +0100
> +++ gtk/res/warning.glade 2009-07-10 12:49:47.000000000 +0100
> @@ -0,0 +1,79 @@
> +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
> +<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
> +<!--*- mode: xml -*-->
> +<glade-interface>
> + <widget class="GtkWindow" id="wndWarning">
<etc>
> + </widget>
> +</glade-interface>
> Index: gtk/res/login.glade
> ===================================================================
> --- /dev/null 2009-04-16 19:17:07.000000000 +0100
> +++ gtk/res/login.glade 2009-07-10 12:49:47.000000000 +0100
> @@ -0,0 +1,222 @@
> +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
> +<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
> +<!--*- mode: xml -*-->
> +<glade-interface>
> + <widget class="GtkDialog" id="wndLogin">
<etc>
> + </widget>
> +</glade-interface>
> Index: gtk/res/ssl.glade
>
as for warning.glade this file originates from glade branch
> ===================================================================
> --- /dev/null 2009-04-16 19:17:07.000000000 +0100
> +++ gtk/res/ssl.glade 2009-07-10 12:49:52.000000000 +0100
> @@ -0,0 +1,197 @@
> +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
> +<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
> +<!--*- mode: xml -*-->
> +<glade-interface>
> + <widget class="GtkDialog" id="wndSSLProblem">
<etc>
> + </widget>
> +</glade-interface>
> Index: gtk/res/password.glade
> ===================================================================
> --- /dev/null 2009-04-16 19:17:07.000000000 +0100
> +++ gtk/res/password.glade 2009-07-10 12:49:52.000000000 +0100
> @@ -0,0 +1,274 @@
> +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
> +<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
> +<!--*- mode: xml -*-->
> +<glade-interface>
> + <widget class="GtkWindow" id="wndPDFPassword">
> + </widget>
> +</glade-interface>
> Index: gtk/res/netsurf.glade
>
mainly modified in glade branch to contain 1 window the main netsurf
browser window; then in customization branch most of the toolbar was cleared
> ===================================================================
> --- gtk/res/netsurf.glade (revision 8438)
> +++ gtk/res/netsurf.glade (working copy)
> @@ -12,197 +12,10 @@
> <widget class="GtkMenuBar" id="menubar">
<etc>
> - </widget>
> </glade-interface>
> Index: gtk/gtk_login.c
>
modifications from glade branch
> ===================================================================
> --- gtk/gtk_login.c (revision 8438)
> +++ gtk/gtk_login.c (working copy)
> @@ -74,7 +74,7 @@
> * the widgets we're interested in.
> */
>
> - GladeXML *x = glade_xml_new(glade_file_location, NULL, NULL);
> + GladeXML *x = glade_xml_new(glade_login_file_location, NULL, NULL);
> GtkWindow *wnd = GTK_WINDOW(glade_xml_get_widget(x, "wndLogin"));
> GtkLabel *lhost, *lrealm;
> GtkEntry *euser, *epass;
> Index: gtk/gtk_gui.c
>
modifications mainly from glade branch; new resources from toolbar
customization branch, search branch
> ===================================================================
> --- gtk/gtk_gui.c (revision 8438)
> +++ gtk/gtk_gui.c (working copy)
> @@ -67,15 +67,27 @@
> char *default_stylesheet_url;
> char *adblock_stylesheet_url;
> char *options_file_location;
> -char *glade_file_location;
> +char *glade_netsurf_file_location;
> +char *glade_password_file_location;
> +char *glade_warning_file_location;
> +char *glade_login_file_location;
> +char *glade_ssl_file_location;
> +char *glade_toolbar_file_location;
> +char *toolbar_indices_file_location;
> char *res_dir_location;
> char *print_options_file_location;
> +char *search_engines_file_location;
> +char *search_default_ico_location;
>
> -struct gui_window *search_current_window = 0;
> +/* struct gui_window *search_current_window = 0; */
>
> GtkWindow *wndAbout;
> GtkWindow *wndWarning;
> -GladeXML *gladeWindows;
> +GladeXML *gladeNetsurf;
> +GladeXML *gladePassword;
> +GladeXML *gladeWarning;
> +GladeXML *gladeLogin;
> +GladeXML *gladeSsl;
> GtkWindow *wndTooltip;
> GtkLabel *labelTooltip;
>
> @@ -194,12 +206,28 @@
> check_homedir();
>
> find_resource(buf, "netsurf.glade", "./gtk/res/netsurf.glade");
> - LOG(("Using '%s' as Glade template file", buf));
> - glade_file_location = strdup(buf);
> + LOG(("Using '%s' as Netsurf glade template file", buf));
> + glade_netsurf_file_location = strdup(buf);
>
> buf[strlen(buf)- 13] = 0;
> LOG(("Using '%s' as Resources directory", buf));
> res_dir_location = strdup(buf);
> +
> + find_resource(buf, "password.glade", "./gtk/res/password.glade");
> + LOG(("Using '%s' as password glade template file", buf));
> + glade_password_file_location = strdup(buf);
> +
> + find_resource(buf, "warning.glade", "./gtk/res/warning.glade");
> + LOG(("Using '%s' as warning glade template file", buf));
> + glade_warning_file_location = strdup(buf);
> +
> + find_resource(buf, "login.glade", "./gtk/res/login.glade");
> + LOG(("Using '%s' as login glade template file", buf));
> + glade_login_file_location = strdup(buf);
> +
> + find_resource(buf, "ssl.glade", "./gtk/res/ssl.glade");
> + LOG(("Using '%s' as ssl glade template file", buf));
> + glade_ssl_file_location = strdup(buf);
>
> find_resource(buf, "Aliases", "./gtk/res/Aliases");
> LOG(("Using '%s' as Aliases file", buf));
> @@ -207,17 +235,42 @@
> die("Unable to initialise HTML parsing library.\n");
>
> glade_init();
> - gladeWindows = glade_xml_new(glade_file_location, NULL, NULL);
> - if (gladeWindows == NULL)
> - die("Unable to load Glade window definitions.\n");
> - glade_xml_signal_autoconnect(gladeWindows);
> + gladeWarning = glade_xml_new(glade_warning_file_location, NULL, NULL);
> + if (gladeWarning == NULL)
> + die("Unable to load glade warning window definitions.\n");
> + glade_xml_signal_autoconnect(gladeWarning);
> +
> + gladeNetsurf = glade_xml_new(glade_netsurf_file_location, NULL, NULL);
> + if (gladeNetsurf == NULL)
> + die("Unable to load glade Netsurf window definitions.\n");
> + glade_xml_signal_autoconnect(gladeNetsurf);
>
> + gladePassword = glade_xml_new(glade_password_file_location, NULL, NULL);
> + if (gladePassword == NULL)
> + die("Unable to load glade password window definitions.\n");
> + glade_xml_signal_autoconnect(gladePassword);
> +
> + gladeLogin = glade_xml_new(glade_login_file_location, NULL, NULL);
> + if (gladeLogin == NULL)
> + die("Unable to load glade login window definitions.\n");
> + glade_xml_signal_autoconnect(gladeLogin);
> +
> + gladeSsl = glade_xml_new(glade_ssl_file_location, NULL, NULL);
> + if (gladeSsl == NULL)
> + die("Unable to load glade ssl window definitions.\n");
> + glade_xml_signal_autoconnect(gladeSsl);
> +
> + find_resource(buf, "toolbar.glade", "./gtk/res/toolbar.glade");
> + LOG(("Using '%s' as glade toolbar file", buf));
> + glade_toolbar_file_location = strdup(buf);
> +
> find_resource(buf, "netsurf.xpm", "./gtk/res/netsurf.xpm");
> gtk_window_set_default_icon_from_file(buf, NULL);
>
> - wndTooltip = GTK_WINDOW(glade_xml_get_widget(gladeWindows,
> "wndTooltip"));
> - labelTooltip = GTK_LABEL(glade_xml_get_widget(gladeWindows, "tooltip"));
> -
> + /* superfluous ? */
> + wndTooltip = GTK_WINDOW(glade_xml_get_widget(gladeNetsurf,
> "wndTooltip"));
> + labelTooltip = GTK_LABEL(glade_xml_get_widget(gladeNetsurf, "tooltip"));
> +
> nsgtk_completion_init();
>
> /* This is an ugly hack to just get the new-style throbber going.
> @@ -315,13 +368,26 @@
> LOG(("Using '%s' as Print Settings file", buf));
> print_options_file_location = strdup(buf);
>
> + find_resource(buf, "SearchEngines", "./gtk/res/SearchEngines");
> + LOG(("Using '%s' as Search Engines file", buf));
> + search_engines_file_location = strdup(buf);
> +
> + find_resource(buf, "default.ico", "./gtk/res/default.ico");
> + LOG(("Using '%s' as default search ico", buf));
> + search_default_ico_location = strdup(buf);
> +
> + find_resource(buf, "toolbarIndices", "./gtk/res/toolbarIndices");
> + LOG(("Using '%s' as custom toolbar settings file", buf));
> + toolbar_indices_file_location = strdup(buf);
> +
> urldb_load(option_url_file);
> urldb_load_cookies(option_cookie_file);
> +
> + /* superfluous ? */
> + wndAbout = GTK_WINDOW(glade_xml_get_widget(gladeNetsurf, "wndAbout"));
>
> - wndAbout = GTK_WINDOW(glade_xml_get_widget(gladeWindows, "wndAbout"));
> + wndWarning = GTK_WINDOW(glade_xml_get_widget(gladeWarning,
> "wndWarning"));
>
> - wndWarning = GTK_WINDOW(glade_xml_get_widget(gladeWindows,
> "wndWarning"));
> -
> nsgtk_history_init();
> nsgtk_download_init();
> }
> @@ -421,6 +487,9 @@
> free(option_cookie_file);
> free(option_cookie_jar);
> free(print_options_file_location);
> + free(search_engines_file_location);
> + free(search_default_ico_location);
> + free(toolbar_indices_file_location);
> gtk_fetch_filetype_fin();
> /* We don't care if this fails as we're about to die, anyway */
> hubbub_finalise(myrealloc, NULL);
> @@ -483,15 +552,6 @@
> {
> }
>
> -
> -bool gui_search_term_highlighted(struct gui_window *g,
> - unsigned start_offset, unsigned end_offset,
> - unsigned *start_idx, unsigned *end_idx)
> -{
> - return false;
> -}
> -
> -
> void warn_user(const char *warning, const char *detail)
> {
> char buf[300]; /* 300 is the size the RISC OS GUI uses */
> @@ -503,7 +563,7 @@
> detail ? detail : "");
> buf[sizeof(buf) - 1] = 0;
>
> - gtk_label_set_text(GTK_LABEL(glade_xml_get_widget(gladeWindows,
> "labelWarning")), buf);
> + gtk_label_set_text(GTK_LABEL(glade_xml_get_widget(gladeWarning,
> "labelWarning")), buf);
>
> gtk_widget_show_all(GTK_WIDGET(wndWarning));
> }
> @@ -529,7 +589,7 @@
> struct content *c, const struct ssl_cert_info *certs,
> unsigned long num)
> {
> - GladeXML *x = glade_xml_new(glade_file_location, NULL, NULL);
> + GladeXML *x = glade_xml_new(glade_ssl_file_location, NULL, NULL);
> GtkWindow *wnd = GTK_WINDOW(glade_xml_get_widget(x, "wndSSLProblem"));
> GtkButton *accept, *reject;
> void **session = calloc(sizeof(void *), 4);
> @@ -633,7 +693,7 @@
>
> void PDF_Password(char **owner_pass, char **user_pass, char *path)
> {
> - GladeXML *x = glade_xml_new(glade_file_location, NULL, NULL);
> + GladeXML *x = glade_xml_new(glade_password_file_location, NULL, NULL);
> GtkWindow *wnd = GTK_WINDOW(glade_xml_get_widget(x, "wndPDFPassword"));
> GtkButton *ok, *no;
> void **data = malloc(5 * sizeof(void *));
--
Mark
http://www.halloit.com
Key ID 046B65CF