Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 2138d5950451d5b6b664817dd40f00e0 > files > 2

gnome-terminal-2.24.0-2mdv2009.0.src.rpm

--- gnome-terminal/src/terminal.c	(révision 3059)
+++ gnome-terminal/src/terminal.c	(copie de travail)
@@ -932,8 +932,9 @@
         {
           GdkDisplay *disp = l->data;
 
-          /* compare without the screen number part */
-          if (strncmp (gdk_display_get_name (disp), display_name, period - display_name) == 0)
+          /* compare without the screen number part, if present */
+          if ((period && strncmp (gdk_display_get_name (disp), display_name, period - display_name) == 0) ||
+              (period == NULL && strcmp (gdk_display_get_name (disp), display_name) == 0))
             {
               display = disp;
               break;
--- gnome-terminal/src/terminal-window.c	(révision 3059)
+++ gnome-terminal/src/terminal-window.c	(copie de travail)
@@ -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");
@@ -2551,6 +2566,8 @@
 
   profile = g_object_get_data (G_OBJECT (action), PROFILE_DATA_KEY);
   if (!profile)
+    profile = terminal_screen_get_profile (priv->active_screen);
+  if (!profile)
     profile = terminal_app_get_profile_for_new_term (app);
   if (!profile)
     return;
@@ -2579,6 +2596,8 @@
   app = terminal_app_get ();
   profile = g_object_get_data (G_OBJECT (action), PROFILE_DATA_KEY);
   if (!profile)
+    profile = terminal_screen_get_profile (priv->active_screen);
+  if (!profile)
     profile = terminal_app_get_profile_for_new_term (app);
   if (!profile)
     return;