]> spindle.queued.net Git - midori/commitdiff
Only show Trash and UndoTabClose if there is a trash
authorChristian Dywan <christian@twotoasts.de>
Sun, 31 Oct 2010 20:27:47 +0000 (21:27 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sun, 31 Oct 2010 20:27:47 +0000 (21:27 +0100)
midori/midori-browser.c

index 62318de1cf7c99ed0ed0a327e32e5b3a098cf591..c3440c811dbd89731a9e165a28e2a03c6e69f4aa 100644 (file)
@@ -5784,6 +5784,8 @@ midori_browser_init (MidoriBrowser* browser)
     _action_set_visible (browser, "BookmarksImport", browser->bookmarks != NULL);
     _action_set_visible (browser, "BookmarksExport", browser->bookmarks != NULL);
     _action_set_visible (browser, "Bookmarkbar", browser->bookmarks != NULL);
+    _action_set_visible (browser, "Trash", browser->trash != NULL);
+    _action_set_visible (browser, "UndoTabClose", browser->trash != NULL);
 
     /* Create the navigationbar */
     browser->navigationbar = gtk_ui_manager_get_widget (
@@ -6504,6 +6506,8 @@ midori_browser_set_property (GObject*      object,
         g_object_set (_action_by_name (browser, "Trash"),
                       "array", browser->trash, "reversed", TRUE,
                       NULL);
+        _action_set_visible (browser, "Trash", browser->trash != NULL);
+        _action_set_visible (browser, "UndoTabClose", browser->trash != NULL);
         /* FIXME: Connect to updates */
         _midori_browser_update_actions (browser);
         break;