]> spindle.queued.net Git - midori/commitdiff
Hide forward tool button when it's insensitive
authorChristian Dywan <christian@twotoasts.de>
Sat, 28 Jul 2012 11:41:33 +0000 (13:41 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 28 Jul 2012 11:41:33 +0000 (13:41 +0200)
Fixes: https://bugs.launchpad.net/midori/+bug/823736
midori/midori-browser.c

index 4e091a4eed81ce5f78edb6404bacc03f3a2afe13..b103d793ed92c9dacff813f6dfdf4c63422fe8a2 100644 (file)
@@ -316,11 +316,16 @@ _midori_browser_update_interface (MidoriBrowser* browser,
     gboolean loading = midori_view_get_load_status (view) != MIDORI_LOAD_FINISHED;
     gboolean can_reload = midori_view_can_reload (view);
     GtkAction* action;
+    GSList* proxies;
 
     _action_set_sensitive (browser, "Reload", can_reload);
     _action_set_sensitive (browser, "Stop", can_reload && loading);
     _action_set_sensitive (browser, "Back", midori_view_can_go_back (view));
     _action_set_sensitive (browser, "Forward", midori_view_can_go_forward (view));
+    proxies = gtk_action_get_proxies (_action_by_name (browser, "Forward"));
+    for (; proxies != NULL; proxies = g_slist_next (proxies))
+        if (GTK_IS_TOOL_ITEM (proxies->data))
+            gtk_widget_set_visible (proxies->data, midori_view_can_go_forward (view));
     _action_set_sensitive (browser, "Previous",
         midori_view_get_previous_page (view) != NULL);
     _action_set_sensitive (browser, "Next",