midori_browser_set_action_visible (browser, "Menubar", FALSE);
}
g_object_set (settings, "show-panel", FALSE, NULL);
- midori_browser_set_action_visible (browser, "Bookmarks", FALSE);
midori_browser_set_action_visible (browser, "Tools", FALSE);
midori_browser_set_action_visible (browser, "Panel", FALSE);
g_object_set (browser, "settings", settings, NULL);
/* FIXME: Show once implemented */
_action_set_visible (browser, "AddDesktopShortcut", FALSE);
+ _action_set_visible (browser, "Bookmarks", browser->bookmarks != NULL);
+ _action_set_visible (browser, "BookmarkAdd", browser->bookmarks != NULL);
+ _action_set_visible (browser, "BookmarksImport", browser->bookmarks != NULL);
+ _action_set_visible (browser, "BookmarksExport", browser->bookmarks != NULL);
+ _action_set_visible (browser, "Bookmarkbar", browser->bookmarks != NULL);
+
/* Create the navigationbar */
browser->navigationbar = gtk_ui_manager_get_widget (
ui_manager, "/toolbar_navigation");
midori_browser_show_bookmarkbar_notify_value_cb, browser);
katze_object_assign (browser->bookmarks, bookmarks);
+ _action_set_visible (browser, "Bookmarks", bookmarks != NULL);
+ if (bookmarks != NULL)
+ {
+ /* FIXME: Proxies aren't shown propely. Why? */
+ GSList* proxies = gtk_action_get_proxies (
+ _action_by_name (browser, "Bookmarks"));
+ for (; proxies; proxies = g_slist_next (proxies))
+ gtk_widget_show (proxies->data);
+ }
+ _action_set_visible (browser, "BookmarkAdd", bookmarks != NULL);
+ _action_set_visible (browser, "BookmarksImport", bookmarks != NULL);
+ _action_set_visible (browser, "BookmarksExport", bookmarks != NULL);
+ _action_set_visible (browser, "Bookmarkbar", bookmarks != NULL);
+
if (!bookmarks)
return;