gnome-terminal r3112 - trunk/src



Author: chpe
Date: Wed Oct  1 16:35:24 2008
New Revision: 3112
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=3112&view=rev

Log:
Bug 453193 â accels sent to the terminal if the corresponding gtkaction is insensitive
Bug 138609 â Next/prev TAB keybindings should not be passed through on first/last tab
Bug 92139 â Selecting "next tab" on rightmost tab should cycle to leftmost tab
Set the next/previous-tab actions always sensitive except when there's
only a single tab in the window. That prevents their shortcut key
sequences to end up in the terminal window (bug 453193, bug 138609).
Also fixes tab cycling (bug 92139).

Modified:
   trunk/src/terminal-window.c

Modified: trunk/src/terminal-window.c
==============================================================================
--- trunk/src/terminal-window.c	(original)
+++ trunk/src/terminal-window.c	Wed Oct  1 16:35:24 2008
@@ -883,10 +883,25 @@
   not_first = page_num > 0;
   not_last = page_num + 1 < num_pages;
 
+#if 1
+  /* NOTE: We always make next/prev actions sensitive except in
+   * single-tab windows, so the corresponding shortcut key escape code
+   * isn't sent to the terminal. See bug #453193 and bug #138609.
+   * This also makes tab cycling work, bug #92139.
+   * FIXME: Find a better way to do this.
+   */
+  action = gtk_action_group_get_action (action_group, "TabsPrevious");
+  gtk_action_set_sensitive (action, num_pages > 1);
+  action = gtk_action_group_get_action (action_group, "TabsNext");
+  gtk_action_set_sensitive (action, num_pages > 1);
+#else
+  /* This would be correct, but see the comment above. */
   action = gtk_action_group_get_action (action_group, "TabsPrevious");
   gtk_action_set_sensitive (action, not_first);
   action = gtk_action_group_get_action (action_group, "TabsNext");
   gtk_action_set_sensitive (action, not_last);
+#endif
+
   action = gtk_action_group_get_action (action_group, "TabsMoveLeft");
   gtk_action_set_sensitive (action, not_first);
   action = gtk_action_group_get_action (action_group, "TabsMoveRight");



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