gnome-terminal r3116 - branches/gnome-2-24/src



Author: chpe
Date: Wed Oct  1 16:38:07 2008
New Revision: 3116
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=3116&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:
   branches/gnome-2-24/src/terminal-window.c

Modified: branches/gnome-2-24/src/terminal-window.c
==============================================================================
--- branches/gnome-2-24/src/terminal-window.c	(original)
+++ branches/gnome-2-24/src/terminal-window.c	Wed Oct  1 16:38:07 2008
@@ -885,10 +885,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]