[gnome-terminal] window: Remove Close from popup menu



commit a0c0a2f33e07e7df01b3bf4a0ee0aa1e9f3865d6
Author: Christian Persch <chpe gnome org>
Date:   Sun Dec 16 15:08:59 2012 +0100

    window: Remove Close from popup menu
    
    There's the tab close button, and/or the window close button, so there's no need
    for an extra entry in the context menu that's too easily activated.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=551284

 src/terminal-window.c |   14 --------------
 src/terminal.xml      |    3 ---
 2 files changed, 0 insertions(+), 17 deletions(-)
---
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 9f713a8..27dd3c0 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -1242,7 +1242,6 @@ popup_clipboard_targets_received_cb (GtkClipboard *clipboard,
   GtkWidget *popup_menu, *im_menu, *im_menu_item;
   GtkAction *action;
   gboolean can_paste, can_paste_uris, show_link, show_email_link, show_call_link, show_input_method_menu;
-  int n_pages;
 
   if (!gtk_widget_get_realized (GTK_WIDGET (screen)))
     {
@@ -1255,8 +1254,6 @@ popup_clipboard_targets_received_cb (GtkClipboard *clipboard,
 
   priv->popup_info = info; /* adopt the ref added when requesting the clipboard */
 
-  n_pages = terminal_mdi_container_get_n_screens (priv->mdi_container);
-
   can_paste = targets != NULL && gtk_targets_include_text (targets, n_targets);
   can_paste_uris = targets != NULL && gtk_targets_include_uri (targets, n_targets);
   show_link = info->string != NULL && (info->flavour == FLAVOR_AS_IS || info->flavour == FLAVOR_DEFAULT_TO_HTTP);
@@ -1276,11 +1273,6 @@ popup_clipboard_targets_received_cb (GtkClipboard *clipboard,
   action = gtk_action_group_get_action (priv->action_group, "PopupCopyLinkAddress");
   gtk_action_set_visible (action, show_link);
 
-  action = gtk_action_group_get_action (priv->action_group, "PopupCloseWindow");
-  gtk_action_set_visible (action, n_pages <= 1);
-  action = gtk_action_group_get_action (priv->action_group, "PopupCloseTab");
-  gtk_action_set_visible (action, n_pages > 1);
-
   action = gtk_action_group_get_action (priv->action_group, "PopupCopy");
   gtk_action_set_sensitive (action, vte_terminal_get_has_selection (VTE_TERMINAL (screen)));
   action = gtk_action_group_get_action (priv->action_group, "PopupPaste");
@@ -1793,12 +1785,6 @@ terminal_window_init (TerminalWindow *window)
       { "PopupNewTab", NULL, N_("Open Ta_b"), NULL,
         NULL,
         G_CALLBACK (file_new_tab_callback) },
-      { "PopupCloseWindow", NULL, N_("C_lose Window"), NULL,
-        NULL,
-        G_CALLBACK (file_close_window_callback) },
-      { "PopupCloseTab", NULL, N_("C_lose Tab"), NULL,
-        NULL,
-        G_CALLBACK (file_close_tab_callback) },
       { "PopupLeaveFullscreen", NULL, N_("L_eave Full Screen"), NULL,
         NULL,
         G_CALLBACK (popup_leave_fullscreen_callback) },
diff --git a/src/terminal.xml b/src/terminal.xml
index 3c9cbed..dbadf16 100644
--- a/src/terminal.xml
+++ b/src/terminal.xml
@@ -88,9 +88,6 @@
     <menuitem action="PopupNewTerminal" />
     <menuitem action="PopupNewTab" />
     <separator />
-    <menuitem action="PopupCloseTab" />
-    <menuitem action="PopupCloseWindow" />
-    <separator />
     <menuitem action="PopupCopy" />
     <menuitem action="PopupPaste" />
     <menuitem action="PopupPasteURIPaths" />



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]