Fix sensitivity of Move to New Tab Group.

You do not want this item sensitive unless there is more than 1 tab.
parent 5c1c0960
......@@ -31,6 +31,7 @@ struct _GeditNotebookPopupMenuPrivate
GtkWidget *move_left_item;
GtkWidget *move_right_item;
GtkWidget *move_to_new_tab_group_item;
GtkWidget *close_item;
};
......@@ -122,6 +123,8 @@ update_sensitivity (GeditNotebookPopupMenu *menu)
(state != GEDIT_TAB_STATE_PRINT_PREVIEWING) &&
(state != GEDIT_TAB_STATE_SAVING_ERROR));
gtk_widget_set_sensitive (menu->priv->move_to_new_tab_group_item, n_pages > 1);
gtk_widget_set_sensitive (menu->priv->move_left_item, page_num > 0);
gtk_widget_set_sensitive (menu->priv->move_right_item, page_num < n_pages - 1);
}
......@@ -256,6 +259,7 @@ gedit_notebook_popup_menu_init (GeditNotebookPopupMenu *menu)
menu);
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menu_item);
gtk_widget_show (menu_item);
menu->priv->move_to_new_tab_group_item = menu_item;
menu_item = gtk_menu_item_new_with_mnemonic (_("_Move to New Window"));
g_signal_connect (menu_item, "activate",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment