summaryrefslogtreecommitdiff
path: root/gtk/gtk_hotlist.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_hotlist.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_hotlist.c')
-rw-r--r--gtk/gtk_hotlist.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gtk/gtk_hotlist.c b/gtk/gtk_hotlist.c
index bf700a047..98e0b217e 100644
--- a/gtk/gtk_hotlist.c
+++ b/gtk/gtk_hotlist.c
@@ -95,17 +95,16 @@ static GladeXML *gladeFile;
GtkWindow *wndHotlist;
-/**
- * Creates the window for the hotlist tree.
- */
-void nsgtk_hotlist_init()
+/* exported interface docuemnted in gtk_hotlist.h */
+bool nsgtk_hotlist_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);
@@ -123,7 +122,7 @@ void nsgtk_hotlist_init()
scrolled, drawing_area);
if (hotlist_window == NULL)
- return;
+ return false;
#define CONNECT(obj, sig, callback, ptr) \
g_signal_connect(G_OBJECT(obj), (sig), G_CALLBACK(callback), (ptr))
@@ -136,6 +135,8 @@ void nsgtk_hotlist_init()
tree_directory_icon_name);
nsgtk_hotlist_init_menu();
+
+ return true;
}