summaryrefslogtreecommitdiff
path: root/gtk/gtk_cookies.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2010-12-14 18:54:20 +0000
committerVincent Sanders <vince@netsurf-browser.org>2010-12-14 18:54:20 +0000
commitf6b0a33fd286c190814fb9e6c835f27552ad3186 (patch)
tree23687b1a26c512e8bc735cd0720801c12d57c850 /gtk/gtk_cookies.c
parentb550f27f4b62cdf8ec91e416670f7fc4dc60f6e6 (diff)
downloadnetsurf-f6b0a33fd286c190814fb9e6c835f27552ad3186.tar.gz
netsurf-f6b0a33fd286c190814fb9e6c835f27552ad3186.tar.bz2
make the history, download, hotlist and cookies initialisation actually use the generic glade file finding code instead of their own thing and erroring out.
svn path=/trunk/netsurf/; revision=11055
Diffstat (limited to 'gtk/gtk_cookies.c')
-rw-r--r--gtk/gtk_cookies.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gtk/gtk_cookies.c b/gtk/gtk_cookies.c
index e9528320b..12fa9cc14 100644
--- a/gtk/gtk_cookies.c
+++ b/gtk/gtk_cookies.c
@@ -86,14 +86,15 @@ GtkWindow *wndCookies;
/**
* Creates the window for the cookies tree.
*/
-void nsgtk_cookies_init(void)
+bool nsgtk_cookies_init(const char *glade_file_location)
{
- gchar *glade_location = g_strconcat(res_dir_location, GLADE_NAME, NULL);
- gladeFile = glade_xml_new(glade_location, NULL, NULL);
- g_free(glade_location);
GtkWindow *window;
GtkScrolledWindow *scrolled;
GtkDrawingArea *drawing_area;
+
+ gladeFile = glade_xml_new(glade_file_location, NULL, NULL);
+ if (gladeFile == NULL)
+ return false;
glade_xml_signal_autoconnect(gladeFile);
@@ -110,7 +111,7 @@ void nsgtk_cookies_init(void)
scrolled, drawing_area);
if (cookies_window == NULL)
- return;
+ return false;
#define CONNECT(obj, sig, callback, ptr) \
g_signal_connect(G_OBJECT(obj), (sig), G_CALLBACK(callback), (ptr))
@@ -123,6 +124,8 @@ void nsgtk_cookies_init(void)
tree_content_icon_name);
nsgtk_cookies_init_menu();
+
+ return true;
}
/**