From 39606dd17cafb2392db9cb9daa318db9996146e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Sun, 20 Nov 2011 16:10:02 +0100 Subject: [PATCH] Add Close menu item to the notebook tab menu This is especially useful if tab close buttons are disabled. --- src/notebook.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/notebook.c b/src/notebook.c index 9d9534ff..0f9e880b 100644 --- a/src/notebook.c +++ b/src/notebook.c @@ -246,6 +246,12 @@ static void show_tab_bar_popup_menu(GdkEventButton *event, GtkWidget *page) gtk_widget_show(menu_item); gtk_container_add(GTK_CONTAINER(menu), menu_item); + menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_CLOSE, NULL); + gtk_widget_show(menu_item); + gtk_container_add(GTK_CONTAINER(menu), menu_item); + g_signal_connect(menu_item, "activate", G_CALLBACK(notebook_tab_close_clicked_cb), page); + gtk_widget_set_sensitive(GTK_WIDGET(menu_item), (page != NULL)); + menu_item = ui_image_menu_item_new(GTK_STOCK_CLOSE, _("Close Ot_her Documents")); gtk_widget_show(menu_item); gtk_container_add(GTK_CONTAINER(menu), menu_item);