diff -u gnome-terminal-2.24.0/debian/changelog gnome-terminal-2.24.0/debian/changelog --- gnome-terminal-2.24.0/debian/changelog +++ gnome-terminal-2.24.0/debian/changelog @@ -1,3 +1,15 @@ +gnome-terminal (2.24.0-0ubuntu2) intrepid; urgency=low + + * debian/patches/05_restore_tab_switching_shortcuts.patch: Backport patch + from GNOME SVN to restore previously removed switch-to-tab keybnindings + (LP: #272199). + References: + + http://svn.gnome.org/viewvc/gnome-terminal?view=revision&revision=3170 + + http://svn.gnome.org/viewvc/gnome-terminal?view=revision&revision=3171 + + http://bugzilla.gnome.org/show_bug.cgi?id=548600 + + -- Iain Lane Mon, 13 Oct 2008 21:24:44 +0100 + gnome-terminal (2.24.0-0ubuntu1) intrepid; urgency=low * New upstream version only in patch2: unchanged: --- gnome-terminal-2.24.0.orig/debian/patches/05_restore_tab_switching_shortcuts.patch +++ gnome-terminal-2.24.0/debian/patches/05_restore_tab_switching_shortcuts.patch @@ -0,0 +1,391 @@ +# +# Description: Restore tab binding behaviour as present in 2.22 that was dropped in 2.24. Patch from upstream. +# References: http://svn.gnome.org/viewvc/gnome-terminal?view=revision&revision=3170 +# http://svn.gnome.org/viewvc/gnome-terminal?view=revision&revision=3171 +# +diff -Nur -x '*.orig' -x '*~' gnome-terminal-2.24.0/src/gnome-terminal.schemas.in gnome-terminal-2.24.0.new/src/gnome-terminal.schemas.in +--- gnome-terminal-2.24.0/src/gnome-terminal.schemas.in 2008-06-17 21:28:21.000000000 +0100 ++++ gnome-terminal-2.24.0.new/src/gnome-terminal.schemas.in 2008-10-13 21:22:28.000000000 +0100 +@@ -916,6 +916,210 @@ + + + ++ /schemas/apps/gnome-terminal/keybindings/switch_to_tab_1 ++ /apps/gnome-terminal/keybindings/switch_to_tab_1 ++ gnome-terminal ++ string ++ <Alt>1 ++ ++ Keyboard shortcut to switch to tab 1 ++ ++ Keyboard shortcut key for switch to tab 1. Expressed as a string ++ in the same format used for GTK+ resource files. ++ If you set the option to the special string "disabled", then there ++ will be no keyboard shortcut for this action. ++ ++ ++ ++ ++ ++ /schemas/apps/gnome-terminal/keybindings/switch_to_tab_2 ++ /apps/gnome-terminal/keybindings/switch_to_tab_2 ++ gnome-terminal ++ string ++ <Alt>2 ++ ++ Keyboard shortcut to switch to tab 2 ++ ++ Keyboard shortcut key for switch to tab 2. Expressed as a string ++ in the same format used for GTK+ resource files. ++ If you set the option to the special string "disabled", then there ++ will be no keyboard shortcut for this action. ++ ++ ++ ++ ++ ++ /schemas/apps/gnome-terminal/keybindings/switch_to_tab_3 ++ /apps/gnome-terminal/keybindings/switch_to_tab_3 ++ gnome-terminal ++ string ++ <Alt>3 ++ ++ Keyboard shortcut to switch to tab 3 ++ ++ Keyboard shortcut key for switch to tab 3. Expressed as a string ++ in the same format used for GTK+ resource files. ++ If you set the option to the special string "disabled", then there ++ will be no keyboard shortcut for this action. ++ ++ ++ ++ ++ ++ /schemas/apps/gnome-terminal/keybindings/switch_to_tab_4 ++ /apps/gnome-terminal/keybindings/switch_to_tab_4 ++ gnome-terminal ++ string ++ <Alt>4 ++ ++ Keyboard shortcut to switch to tab 4 ++ ++ Keyboard shortcut key for switch to tab 4. Expressed as a string ++ in the same format used for GTK+ resource files. ++ If you set the option to the special string "disabled", then there ++ will be no keyboard shortcut for this action. ++ ++ ++ ++ ++ ++ /schemas/apps/gnome-terminal/keybindings/switch_to_tab_5 ++ /apps/gnome-terminal/keybindings/switch_to_tab_5 ++ gnome-terminal ++ string ++ <Alt>5 ++ ++ Keyboard shortcut to switch to tab 5 ++ ++ Keyboard shortcut key for switch to tab 5. Expressed as a string ++ in the same format used for GTK+ resource files. ++ If you set the option to the special string "disabled", then there ++ will be no keyboard shortcut for this action. ++ ++ ++ ++ ++ ++ /schemas/apps/gnome-terminal/keybindings/switch_to_tab_6 ++ /apps/gnome-terminal/keybindings/switch_to_tab_6 ++ gnome-terminal ++ string ++ <Alt>6 ++ ++ Keyboard shortcut to switch to tab 6 ++ ++ Keyboard shortcut key for switch to tab 6. Expressed as a string ++ in the same format used for GTK+ resource files. ++ If you set the option to the special string "disabled", then there ++ will be no keyboard shortcut for this action. ++ ++ ++ ++ ++ ++ /schemas/apps/gnome-terminal/keybindings/switch_to_tab_7 ++ /apps/gnome-terminal/keybindings/switch_to_tab_7 ++ gnome-terminal ++ string ++ <Alt>7 ++ ++ Keyboard shortcut to switch to tab 7 ++ ++ Keyboard shortcut key for switch to tab 7. Expressed as a string ++ in the same format used for GTK+ resource files. ++ If you set the option to the special string "disabled", then there ++ will be no keyboard shortcut for this action. ++ ++ ++ ++ ++ ++ /schemas/apps/gnome-terminal/keybindings/switch_to_tab_8 ++ /apps/gnome-terminal/keybindings/switch_to_tab_8 ++ gnome-terminal ++ string ++ <Alt>8 ++ ++ Keyboard shortcut to switch to tab 8 ++ ++ Keyboard shortcut key for switch to tab 8. Expressed as a string ++ in the same format used for GTK+ resource files. ++ If you set the option to the special string "disabled", then there ++ will be no keyboard shortcut for this action. ++ ++ ++ ++ ++ ++ /schemas/apps/gnome-terminal/keybindings/switch_to_tab_9 ++ /apps/gnome-terminal/keybindings/switch_to_tab_9 ++ gnome-terminal ++ string ++ <Alt>9 ++ ++ Keyboard shortcut to switch to tab 9 ++ ++ Keyboard shortcut key for switch to tab 9. Expressed as a string ++ in the same format used for GTK+ resource files. ++ If you set the option to the special string "disabled", then there ++ will be no keyboard shortcut for this action. ++ ++ ++ ++ ++ ++ /schemas/apps/gnome-terminal/keybindings/switch_to_tab_10 ++ /apps/gnome-terminal/keybindings/switch_to_tab_10 ++ gnome-terminal ++ string ++ ++ ++ Keyboard shortcut to switch to tab 10 ++ ++ Keyboard shortcut key for switch to tab 10. Expressed as a string ++ in the same format used for GTK+ resource files. ++ If you set the option to the special string "disabled", then there ++ will be no keyboard shortcut for this action. ++ ++ ++ ++ ++ ++ /schemas/apps/gnome-terminal/keybindings/switch_to_tab_11 ++ /apps/gnome-terminal/keybindings/switch_to_tab_11 ++ gnome-terminal ++ string ++ ++ ++ Keyboard shortcut to switch to tab 11 ++ ++ Keyboard shortcut key for switch to tab 11. Expressed as a string ++ in the same format used for GTK+ resource files. ++ If you set the option to the special string "disabled", then there ++ will be no keyboard shortcut for this action. ++ ++ ++ ++ ++ ++ /schemas/apps/gnome-terminal/keybindings/switch_to_tab_12 ++ /apps/gnome-terminal/keybindings/switch_to_tab_12 ++ gnome-terminal ++ string ++ ++ ++ Keyboard shortcut to switch to tab 12 ++ ++ Keyboard shortcut key for switch to tab 12. Expressed as a string ++ in the same format used for GTK+ resource files. ++ If you set the option to the special string "disabled", then there ++ will be no keyboard shortcut for this action. ++ ++ ++ ++ ++ + /schemas/apps/gnome-terminal/keybindings/help + /apps/gnome-terminal/keybindings/help + gnome-terminal +diff -Nur -x '*.orig' -x '*~' gnome-terminal-2.24.0/src/terminal-accels.c gnome-terminal-2.24.0.new/src/terminal-accels.c +--- gnome-terminal-2.24.0/src/terminal-accels.c 2008-09-22 13:39:25.000000000 +0100 ++++ gnome-terminal-2.24.0.new/src/terminal-accels.c 2008-10-13 21:23:15.000000000 +0100 +@@ -20,11 +20,14 @@ + + #include + ++#include ++ + #include "terminal-accels.h" + #include "terminal-app.h" + #include "terminal-intl.h" + #include "terminal-profile.h" + #include "terminal-util.h" ++#include "terminal-accels.h" + + #define D(x) + +@@ -51,6 +54,7 @@ + #define ACCEL_PATH_MOVE_TAB_LEFT ACCEL_PATH_ROOT "TabsMoveLeft" + #define ACCEL_PATH_MOVE_TAB_RIGHT ACCEL_PATH_ROOT "TabsMoveRight" + #define ACCEL_PATH_DETACH_TAB ACCEL_PATH_ROOT "TabsDetach" ++#define ACCEL_PATH_SWITCH_TAB_PREFIX ACCEL_PATH_ROOT "TabsSwitch" + + #define KEY_CLOSE_TAB CONF_KEYS_PREFIX "/close_tab" + #define KEY_CLOSE_WINDOW CONF_KEYS_PREFIX "/close_window" +@@ -73,6 +77,7 @@ + #define KEY_ZOOM_IN CONF_KEYS_PREFIX "/zoom_in" + #define KEY_ZOOM_NORMAL CONF_KEYS_PREFIX "/zoom_normal" + #define KEY_ZOOM_OUT CONF_KEYS_PREFIX "/zoom_out" ++#define KEY_SWITCH_TAB_PREFIX CONF_KEYS_PREFIX "/switch_to_tab_" + + typedef struct + { +@@ -153,6 +158,42 @@ + KEY_MOVE_TAB_RIGHT, ACCEL_PATH_MOVE_TAB_RIGHT, 0, 0, NULL, FALSE, TRUE }, + { N_("Detach Tab"), + KEY_DETACH_TAB, ACCEL_PATH_DETACH_TAB, 0, 0, NULL, FALSE, TRUE }, ++ { N_("Switch to Tab 1"), ++ KEY_SWITCH_TAB_PREFIX "1", ++ ACCEL_PATH_SWITCH_TAB_PREFIX "1", GDK_1, GDK_MOD1_MASK, NULL, FALSE, TRUE }, ++ { N_("Switch to Tab 2"), ++ KEY_SWITCH_TAB_PREFIX "2", ++ ACCEL_PATH_SWITCH_TAB_PREFIX "2", GDK_2, GDK_MOD1_MASK, NULL, FALSE, TRUE }, ++ { N_("Switch to Tab 3"), ++ KEY_SWITCH_TAB_PREFIX "3", ++ ACCEL_PATH_SWITCH_TAB_PREFIX "3", GDK_3, GDK_MOD1_MASK, NULL, FALSE, TRUE }, ++ { N_("Switch to Tab 4"), ++ KEY_SWITCH_TAB_PREFIX "4", ++ ACCEL_PATH_SWITCH_TAB_PREFIX "4", GDK_4, GDK_MOD1_MASK, NULL, FALSE, TRUE }, ++ { N_("Switch to Tab 5"), ++ KEY_SWITCH_TAB_PREFIX "5", ++ ACCEL_PATH_SWITCH_TAB_PREFIX "5", GDK_5, GDK_MOD1_MASK, NULL, FALSE, TRUE }, ++ { N_("Switch to Tab 6"), ++ KEY_SWITCH_TAB_PREFIX "6", ++ ACCEL_PATH_SWITCH_TAB_PREFIX "6", GDK_6, GDK_MOD1_MASK, NULL, FALSE, TRUE }, ++ { N_("Switch to Tab 7"), ++ KEY_SWITCH_TAB_PREFIX "7", ++ ACCEL_PATH_SWITCH_TAB_PREFIX "7", GDK_7, GDK_MOD1_MASK, NULL, FALSE, TRUE }, ++ { N_("Switch to Tab 8"), ++ KEY_SWITCH_TAB_PREFIX "8", ++ ACCEL_PATH_SWITCH_TAB_PREFIX "8", GDK_8, GDK_MOD1_MASK, NULL, FALSE, TRUE }, ++ { N_("Switch to Tab 9"), ++ KEY_SWITCH_TAB_PREFIX "9", ++ ACCEL_PATH_SWITCH_TAB_PREFIX "9", GDK_9, GDK_MOD1_MASK, NULL, FALSE, TRUE }, ++ { N_("Switch to Tab 10"), ++ KEY_SWITCH_TAB_PREFIX "10", ++ ACCEL_PATH_SWITCH_TAB_PREFIX "10", 0, 0, NULL, FALSE, TRUE }, ++ { N_("Switch to Tab 11"), ++ KEY_SWITCH_TAB_PREFIX "11", ++ ACCEL_PATH_SWITCH_TAB_PREFIX "11", 0, 0, NULL, FALSE, TRUE }, ++ { N_("Switch to Tab 12"), ++ KEY_SWITCH_TAB_PREFIX "12", ++ ACCEL_PATH_SWITCH_TAB_PREFIX "12", 0, 0, NULL, FALSE, TRUE } + }; + + static KeyEntry help_entries[] = { +@@ -166,7 +207,7 @@ + { view_entries, G_N_ELEMENTS (view_entries), N_("View") }, + { terminal_entries, G_N_ELEMENTS (terminal_entries), N_("Terminal") }, + { tabs_entries, G_N_ELEMENTS (tabs_entries), N_("Tabs") }, +- { help_entries, G_N_ELEMENTS (help_entries), N_("Help") } ++ { help_entries, G_N_ELEMENTS (help_entries), N_("Help") }, + }; + + enum +diff -Nur -x '*.orig' -x '*~' gnome-terminal-2.24.0/src/terminal-tabs-menu.c gnome-terminal-2.24.0.new/src/terminal-tabs-menu.c +--- gnome-terminal-2.24.0/src/terminal-tabs-menu.c 2008-06-08 12:36:13.000000000 +0100 ++++ gnome-terminal-2.24.0.new/src/terminal-tabs-menu.c 2008-10-13 21:24:06.000000000 +0100 +@@ -30,14 +30,16 @@ + #include "terminal-screen-container.h" + #include "terminal-intl.h" + ++#define TERMINAL_ACCELS_N_TABS_SWITCH (12) ++ + #define LABEL_WIDTH_CHARS 32 + #define ACTION_VERB_FORMAT_PREFIX "JmpTab" +-#define ACTION_VERB_FORMAT_PREFIX_LEN (6) /* strlen (ACTION_VERB_FORMAT_PREFIX) */ +-#define ACTION_VERB_FORMAT ACTION_VERB_FORMAT_PREFIX "%x" ++#define ACTION_VERB_FORMAT_PREFIX_LEN strlen (ACTION_VERB_FORMAT_PREFIX) ++#define ACTION_VERB_FORMAT ACTION_VERB_FORMAT_PREFIX "%u" + #define ACTION_VERB_FORMAT_LENGTH strlen (ACTION_VERB_FORMAT) + 14 + 1 + #define ACTION_VERB_FORMAT_BASE (16) /* %x is hex */ +-#define ACCEL_PATH_FORMAT "/TabsActions/%s" +-#define ACCEL_PATH_FORMAT_LENGTH strlen (ACCEL_PATH_FORMAT) -2 + ACTION_VERB_FORMAT_LENGTH ++#define ACCEL_PATH_FORMAT "/Main/TabsSwitch%u" ++#define ACCEL_PATH_FORMAT_LENGTH strlen (ACCEL_PATH_FORMAT) + 14 + 1 + #define DATA_KEY "TerminalTabsMenu::Action" + + #define UI_PATH "/menubar/Tabs" +@@ -379,7 +381,7 @@ + g_type_class_add_private (object_class, sizeof (TerminalTabsMenuPrivate)); + + /* We don't want to save accels, so skip them */ +- gtk_accel_map_add_filter ("/TabsActions/JmpTab*"); ++ gtk_accel_map_add_filter ("/Main/TabsSwitch*"); + } + + static void +@@ -416,40 +418,19 @@ + guint tab_number, + gboolean is_single_tab) + { +- const char *verb; +- char accel_path[ACCEL_PATH_FORMAT_LENGTH]; +- char accel[7]; +- gint accel_number; +- guint accel_key; +- GdkModifierType accel_mods; +- +- verb = gtk_action_get_name (action); +- +- /* set the accel path for the menu item */ +- g_snprintf (accel_path, sizeof (accel_path), +- ACCEL_PATH_FORMAT, verb); +- gtk_action_set_accel_path (action, accel_path); +- +- /* Only the first ten tabs get accelerators starting from 1 through 0 */ +- if (tab_number < 10 && !is_single_tab) +- { +- accel_key = 0; +- accel_number = (tab_number + 1) % 10; +- +- g_snprintf (accel, sizeof (accel), "%d", accel_number); +- +- gtk_accelerator_parse (accel, &accel_key, &accel_mods); ++ if (!is_single_tab && ++ tab_number < TERMINAL_ACCELS_N_TABS_SWITCH) ++ { ++ char accel_path[ACCEL_PATH_FORMAT_LENGTH]; + +- if (accel_key != 0) +- { +- gtk_accel_map_change_entry (accel_path, accel_key, +- accel_mods, TRUE); +- } +- } +- else +- { +- gtk_accel_map_change_entry (accel_path, 0, 0, TRUE); +- } ++ g_snprintf (accel_path, sizeof (accel_path), ACCEL_PATH_FORMAT, tab_number + 1); ++ gtk_action_set_accel_path (action, accel_path); ++ } ++ else ++ { ++ gtk_action_set_accel_path (action, NULL); ++ return; ++ } + } + + static void