Previous/ next tab menu items should be disabled when not needed.

This commit is contained in:
Christian Dywan 2008-01-04 06:08:42 +01:00
parent 7c45654993
commit 3fc2bced12

View file

@ -401,6 +401,9 @@ void update_browser_actions(CBrowser* browser)
gboolean active = gtk_notebook_get_n_pages(GTK_NOTEBOOK(browser->webViews)) > 1; gboolean active = gtk_notebook_get_n_pages(GTK_NOTEBOOK(browser->webViews)) > 1;
gtk_notebook_set_show_tabs(GTK_NOTEBOOK(browser->webViews), active); gtk_notebook_set_show_tabs(GTK_NOTEBOOK(browser->webViews), active);
action_set_sensitive("TabClose", active, browser); action_set_sensitive("TabClose", active, browser);
action_set_sensitive("TabPrevious", active, browser);
action_set_sensitive("TabNext", active, browser);
gboolean tabtrashEmpty = xbel_folder_is_empty(tabtrash); gboolean tabtrashEmpty = xbel_folder_is_empty(tabtrash);
action_set_sensitive("UndoTabClose", !tabtrashEmpty, browser); action_set_sensitive("UndoTabClose", !tabtrashEmpty, browser);
action_set_sensitive("TabsClosed", !tabtrashEmpty, browser); action_set_sensitive("TabsClosed", !tabtrashEmpty, browser);