gtk: Update for new hotlist API.

This allows the hotlist backend to work before the hotlist window opens.
This commit is contained in:
Michael Drake 2016-12-29 14:49:39 +00:00
parent b6be869f19
commit 4e5e9f1f5a
2 changed files with 5 additions and 7 deletions

View File

@ -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

View File

@ -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));