summaryrefslogtreecommitdiff
path: root/extra/terminal/bug-7595-go-menu-single-tab-sensitivity.patch
blob: 9d8eff6bd60aaee590fa1d4acc551576b6dccb07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From be9fca9ea8cedcf879c8e0c8cea96dd256a3591c Mon Sep 17 00:00:00 2001
From: Nick Schermer <nick@xfce.org>
Date: Thu, 12 May 2011 16:08:20 +0000
Subject: Only make go menu action sensitive if tabs > 1 (bug #7595).

This way the (default) Alt+1 keybinding is usable when
only a single tab is opened in the terminal window.
---
diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index f580a39..0d461a4 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -748,6 +748,7 @@ terminal_window_rebuild_gomenu (TerminalWindow *window)
 
       /* create action */
       radio_action = gtk_radio_action_new (name, NULL, NULL, NULL, n);
+      gtk_action_set_sensitive (GTK_ACTION (radio_action), npages > 1);
       exo_binding_new (G_OBJECT (page), "title", G_OBJECT (radio_action), "label");
       gtk_radio_action_set_group (radio_action, group);
       group = gtk_radio_action_get_group (radio_action);
--
cgit