summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2016-12-29 14:49:39 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2016-12-29 14:49:39 +0000
commit4e5e9f1f5af2e526a87f38936aed0c4c100b5051 (patch)
treefbe70ca28de37caed07c120d7cefa53aef782f6d
parentb6be869f19994070ec522d19455ea7eb47965be4 (diff)
downloadnetsurf-4e5e9f1f5af2e526a87f38936aed0c4c100b5051.tar.gz
netsurf-4e5e9f1f5af2e526a87f38936aed0c4c100b5051.tar.bz2
gtk: Update for new hotlist API.
This allows the hotlist backend to work before the hotlist window opens.
-rw-r--r--frontends/gtk/gui.c2
-rw-r--r--frontends/gtk/hotlist.c10
2 files changed, 5 insertions, 7 deletions
diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c
index d128dc24f..c08ab0ae4 100644
--- a/frontends/gtk/gui.c
+++ b/frontends/gtk/gui.c
@@ -49,6 +49,7 @@
#include "desktop/save_complete.h"
#include "desktop/save_pdf.h"
#include "desktop/searchweb.h"
+#include "desktop/hotlist.h"
#include "gtk/compat.h"
#include "gtk/warn.h"
@@ -290,6 +291,7 @@ static nserror nsgtk_init(int argc, char** argv, char **respath)
urldb_load(nsoption_charp(url_file));
urldb_load_cookies(nsoption_charp(cookie_file));
+ hotlist_init(nsoption_charp(hotlist_path));
/* The tree view system needs to know the screen's DPI, so we
* find that out here, rather than when we create a first browser
diff --git a/frontends/gtk/hotlist.c b/frontends/gtk/hotlist.c
index f64600a5b..6ce9060fb 100644
--- a/frontends/gtk/hotlist.c
+++ b/frontends/gtk/hotlist.c
@@ -45,7 +45,6 @@ struct nsgtk_hotlist_window {
struct nsgtk_corewindow core;
GtkBuilder *builder;
GtkWindow *wnd;
- const char *path; /**< path to users bookmarks */
};
static struct nsgtk_hotlist_window *hotlist_window = NULL;
@@ -361,11 +360,8 @@ static nserror nsgtk_hotlist_init(void)
return res;
}
- ncwin->path = nsoption_charp(hotlist_path);
-
- res = hotlist_init(ncwin->core.cb_table,
- (struct core_window *)ncwin,
- ncwin->path);
+ res = hotlist_manager_init(ncwin->core.cb_table,
+ (struct core_window *)ncwin);
if (res != NSERROR_OK) {
free(ncwin);
return res;
@@ -402,7 +398,7 @@ nserror nsgtk_hotlist_destroy(void)
return NSERROR_OK;
}
- res = hotlist_fini(hotlist_window->path);
+ res = hotlist_fini(nsoption_charp(hotlist_path));
if (res == NSERROR_OK) {
res = nsgtk_corewindow_fini(&hotlist_window->core);
gtk_widget_destroy(GTK_WIDGET(hotlist_window->wnd));