~ubuntu-core-dev/gnome-terminal/ubuntu

« back to all changes in this revision

Viewing changes to debian/patches/05_restore_tab_switching_shortcuts.patch

  • Committer: Michael Vogt
  • Date: 2008-10-23 11:06:34 UTC
  • mfrom: (14.1.2 gnome-terminal-2.24.1.1)
  • Revision ID: michael.vogt@ubuntu.com-20081023110634-9my3deah01he0nng
* debian/patches/05_restore_tab_switching_shortcuts.patch:
  - Re-add patch dropped by upstream due to missing commit in stable branch
    and crasher regression. Fix for crasher is already in 2.24.1.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Description: Restore removed tab switching keybindings
 
3
# Upstream: http://bugzilla.gnome.org/show_bug.cgi?id=548600
 
4
# Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/272199
 
5
#
 
6
diff -Nur -x '*.orig' -x '*~' gnome-terminal-2.24.1.1/src/gnome-terminal.schemas.in gnome-terminal-2.24.1.1.new/src/gnome-terminal.schemas.in
 
7
--- gnome-terminal-2.24.1.1/src/gnome-terminal.schemas.in       2008-10-22 21:30:50.000000000 +0100
 
8
+++ gnome-terminal-2.24.1.1.new/src/gnome-terminal.schemas.in   2008-10-22 22:45:01.000000000 +0100
 
9
@@ -916,6 +916,210 @@
 
10
     </schema>
 
11
 
 
12
     <schema>
 
13
+      <key>/schemas/apps/gnome-terminal/keybindings/switch_to_tab_1</key>
 
14
+      <applyto>/apps/gnome-terminal/keybindings/switch_to_tab_1</applyto>
 
15
+      <owner>gnome-terminal</owner>
 
16
+      <type>string</type>
 
17
+      <default>&lt;Alt&gt;1</default>
 
18
+      <locale name="C">
 
19
+         <short>Keyboard shortcut to switch to tab 1</short>
 
20
+         <long>
 
21
+          Keyboard shortcut key for switch to tab 1. Expressed as a string
 
22
+          in the same format used for GTK+ resource files.
 
23
+          If you set the option to the special string "disabled", then there
 
24
+          will be no keyboard shortcut for this action.
 
25
+         </long>
 
26
+      </locale>
 
27
+    </schema>
 
28
+
 
29
+    <schema>
 
30
+      <key>/schemas/apps/gnome-terminal/keybindings/switch_to_tab_2</key>
 
31
+      <applyto>/apps/gnome-terminal/keybindings/switch_to_tab_2</applyto>
 
32
+      <owner>gnome-terminal</owner>
 
33
+      <type>string</type>
 
34
+      <default>&lt;Alt&gt;2</default>
 
35
+      <locale name="C">
 
36
+         <short>Keyboard shortcut to switch to tab 2</short>
 
37
+         <long>
 
38
+          Keyboard shortcut key for switch to tab 2. Expressed as a string
 
39
+          in the same format used for GTK+ resource files.
 
40
+          If you set the option to the special string "disabled", then there
 
41
+          will be no keyboard shortcut for this action.
 
42
+         </long>
 
43
+      </locale>
 
44
+    </schema>
 
45
+
 
46
+    <schema>
 
47
+      <key>/schemas/apps/gnome-terminal/keybindings/switch_to_tab_3</key>
 
48
+      <applyto>/apps/gnome-terminal/keybindings/switch_to_tab_3</applyto>
 
49
+      <owner>gnome-terminal</owner>
 
50
+      <type>string</type>
 
51
+      <default>&lt;Alt&gt;3</default>
 
52
+      <locale name="C">
 
53
+         <short>Keyboard shortcut to switch to tab 3</short>
 
54
+         <long>
 
55
+          Keyboard shortcut key for switch to tab 3. Expressed as a string
 
56
+          in the same format used for GTK+ resource files.
 
57
+          If you set the option to the special string "disabled", then there
 
58
+          will be no keyboard shortcut for this action.
 
59
+         </long>
 
60
+      </locale>
 
61
+    </schema>
 
62
+
 
63
+    <schema>
 
64
+      <key>/schemas/apps/gnome-terminal/keybindings/switch_to_tab_4</key>
 
65
+      <applyto>/apps/gnome-terminal/keybindings/switch_to_tab_4</applyto>
 
66
+      <owner>gnome-terminal</owner>
 
67
+      <type>string</type>
 
68
+      <default>&lt;Alt&gt;4</default>
 
69
+      <locale name="C">
 
70
+         <short>Keyboard shortcut to switch to tab 4</short>
 
71
+         <long>
 
72
+          Keyboard shortcut key for switch to tab 4. Expressed as a string
 
73
+          in the same format used for GTK+ resource files.
 
74
+          If you set the option to the special string "disabled", then there
 
75
+          will be no keyboard shortcut for this action.
 
76
+         </long>
 
77
+      </locale>
 
78
+    </schema>
 
79
+
 
80
+    <schema>
 
81
+      <key>/schemas/apps/gnome-terminal/keybindings/switch_to_tab_5</key>
 
82
+      <applyto>/apps/gnome-terminal/keybindings/switch_to_tab_5</applyto>
 
83
+      <owner>gnome-terminal</owner>
 
84
+      <type>string</type>
 
85
+      <default>&lt;Alt&gt;5</default>
 
86
+      <locale name="C">
 
87
+         <short>Keyboard shortcut to switch to tab 5</short>
 
88
+         <long>
 
89
+          Keyboard shortcut key for switch to tab 5. Expressed as a string
 
90
+          in the same format used for GTK+ resource files.
 
91
+          If you set the option to the special string "disabled", then there
 
92
+          will be no keyboard shortcut for this action.
 
93
+         </long>
 
94
+      </locale>
 
95
+    </schema>
 
96
+
 
97
+    <schema>
 
98
+      <key>/schemas/apps/gnome-terminal/keybindings/switch_to_tab_6</key>
 
99
+      <applyto>/apps/gnome-terminal/keybindings/switch_to_tab_6</applyto>
 
100
+      <owner>gnome-terminal</owner>
 
101
+      <type>string</type>
 
102
+      <default>&lt;Alt&gt;6</default>
 
103
+      <locale name="C">
 
104
+         <short>Keyboard shortcut to switch to tab 6</short>
 
105
+         <long>
 
106
+          Keyboard shortcut key for switch to tab 6. Expressed as a string
 
107
+          in the same format used for GTK+ resource files.
 
108
+          If you set the option to the special string "disabled", then there
 
109
+          will be no keyboard shortcut for this action.
 
110
+         </long>
 
111
+      </locale>
 
112
+    </schema>
 
113
+
 
114
+    <schema>
 
115
+      <key>/schemas/apps/gnome-terminal/keybindings/switch_to_tab_7</key>
 
116
+      <applyto>/apps/gnome-terminal/keybindings/switch_to_tab_7</applyto>
 
117
+      <owner>gnome-terminal</owner>
 
118
+      <type>string</type>
 
119
+      <default>&lt;Alt&gt;7</default>
 
120
+      <locale name="C">
 
121
+         <short>Keyboard shortcut to switch to tab 7</short>
 
122
+         <long>
 
123
+          Keyboard shortcut key for switch to tab 7. Expressed as a string
 
124
+          in the same format used for GTK+ resource files.
 
125
+          If you set the option to the special string "disabled", then there
 
126
+          will be no keyboard shortcut for this action.
 
127
+         </long>
 
128
+      </locale>
 
129
+    </schema>
 
130
+
 
131
+    <schema>
 
132
+      <key>/schemas/apps/gnome-terminal/keybindings/switch_to_tab_8</key>
 
133
+      <applyto>/apps/gnome-terminal/keybindings/switch_to_tab_8</applyto>
 
134
+      <owner>gnome-terminal</owner>
 
135
+      <type>string</type>
 
136
+      <default>&lt;Alt&gt;8</default>
 
137
+      <locale name="C">
 
138
+         <short>Keyboard shortcut to switch to tab 8</short>
 
139
+         <long>
 
140
+          Keyboard shortcut key for switch to tab 8. Expressed as a string
 
141
+          in the same format used for GTK+ resource files.
 
142
+          If you set the option to the special string "disabled", then there
 
143
+          will be no keyboard shortcut for this action.
 
144
+         </long>
 
145
+      </locale>
 
146
+    </schema>
 
147
+
 
148
+    <schema>
 
149
+      <key>/schemas/apps/gnome-terminal/keybindings/switch_to_tab_9</key>
 
150
+      <applyto>/apps/gnome-terminal/keybindings/switch_to_tab_9</applyto>
 
151
+      <owner>gnome-terminal</owner>
 
152
+      <type>string</type>
 
153
+      <default>&lt;Alt&gt;9</default>
 
154
+      <locale name="C">
 
155
+         <short>Keyboard shortcut to switch to tab 9</short>
 
156
+         <long>
 
157
+          Keyboard shortcut key for switch to tab 9. Expressed as a string
 
158
+          in the same format used for GTK+ resource files.
 
159
+          If you set the option to the special string "disabled", then there
 
160
+          will be no keyboard shortcut for this action.
 
161
+         </long>
 
162
+      </locale>
 
163
+    </schema>
 
164
+
 
165
+    <schema>
 
166
+      <key>/schemas/apps/gnome-terminal/keybindings/switch_to_tab_10</key>
 
167
+      <applyto>/apps/gnome-terminal/keybindings/switch_to_tab_10</applyto>
 
168
+      <owner>gnome-terminal</owner>
 
169
+      <type>string</type>
 
170
+<!-- no default -->
 
171
+      <locale name="C">
 
172
+         <short>Keyboard shortcut to switch to tab 10</short>
 
173
+         <long>
 
174
+          Keyboard shortcut key for switch to tab 10. Expressed as a string
 
175
+          in the same format used for GTK+ resource files.
 
176
+          If you set the option to the special string "disabled", then there
 
177
+          will be no keyboard shortcut for this action.
 
178
+         </long>
 
179
+      </locale>
 
180
+    </schema>
 
181
+
 
182
+    <schema>
 
183
+      <key>/schemas/apps/gnome-terminal/keybindings/switch_to_tab_11</key>
 
184
+      <applyto>/apps/gnome-terminal/keybindings/switch_to_tab_11</applyto>
 
185
+      <owner>gnome-terminal</owner>
 
186
+      <type>string</type>
 
187
+<!-- no default -->
 
188
+      <locale name="C">
 
189
+         <short>Keyboard shortcut to switch to tab 11</short>
 
190
+         <long>
 
191
+          Keyboard shortcut key for switch to tab 11. Expressed as a string
 
192
+          in the same format used for GTK+ resource files.
 
193
+          If you set the option to the special string "disabled", then there
 
194
+          will be no keyboard shortcut for this action.
 
195
+         </long>
 
196
+      </locale>
 
197
+    </schema>
 
198
+
 
199
+    <schema>
 
200
+      <key>/schemas/apps/gnome-terminal/keybindings/switch_to_tab_12</key>
 
201
+      <applyto>/apps/gnome-terminal/keybindings/switch_to_tab_12</applyto>
 
202
+      <owner>gnome-terminal</owner>
 
203
+      <type>string</type>
 
204
+<!-- no default -->
 
205
+      <locale name="C">
 
206
+         <short>Keyboard shortcut to switch to tab 12</short>
 
207
+         <long>
 
208
+          Keyboard shortcut key for switch to tab 12. Expressed as a string
 
209
+          in the same format used for GTK+ resource files.
 
210
+          If you set the option to the special string "disabled", then there
 
211
+          will be no keyboard shortcut for this action.
 
212
+         </long>
 
213
+      </locale>
 
214
+    </schema>
 
215
+
 
216
+    <schema>
 
217
       <key>/schemas/apps/gnome-terminal/keybindings/help</key>
 
218
       <applyto>/apps/gnome-terminal/keybindings/help</applyto>
 
219
       <owner>gnome-terminal</owner>
 
220
diff -Nur -x '*.orig' -x '*~' gnome-terminal-2.24.1.1/src/terminal-accels.c gnome-terminal-2.24.1.1.new/src/terminal-accels.c
 
221
--- gnome-terminal-2.24.1.1/src/terminal-accels.c       2008-10-22 21:30:50.000000000 +0100
 
222
+++ gnome-terminal-2.24.1.1.new/src/terminal-accels.c   2008-10-22 22:45:01.000000000 +0100
 
223
@@ -20,11 +20,14 @@
 
224
 
 
225
 #include <string.h>
 
226
 
 
227
+#include <gdk/gdkkeysyms.h>
 
228
+
 
229
 #include "terminal-accels.h"
 
230
 #include "terminal-app.h"
 
231
 #include "terminal-intl.h"
 
232
 #include "terminal-profile.h"
 
233
 #include "terminal-util.h"
 
234
+#include "terminal-accels.h"
 
235
 
 
236
 #ifdef DEBUG_ACCELS
 
237
 #define D(x) x
 
238
@@ -71,6 +74,7 @@
 
239
 #define ACCEL_PATH_MOVE_TAB_LEFT        ACCEL_PATH_ROOT "TabsMoveLeft"
 
240
 #define ACCEL_PATH_MOVE_TAB_RIGHT       ACCEL_PATH_ROOT "TabsMoveRight"
 
241
 #define ACCEL_PATH_DETACH_TAB           ACCEL_PATH_ROOT "TabsDetach"
 
242
+#define ACCEL_PATH_SWITCH_TAB_PREFIX    ACCEL_PATH_ROOT "TabsSwitch"
 
243
 
 
244
 #define KEY_CLOSE_TAB           CONF_KEYS_PREFIX "/close_tab"
 
245
 #define KEY_CLOSE_WINDOW        CONF_KEYS_PREFIX "/close_window"
 
246
@@ -93,6 +97,7 @@
 
247
 #define KEY_ZOOM_IN             CONF_KEYS_PREFIX "/zoom_in"
 
248
 #define KEY_ZOOM_NORMAL         CONF_KEYS_PREFIX "/zoom_normal"
 
249
 #define KEY_ZOOM_OUT            CONF_KEYS_PREFIX "/zoom_out"
 
250
+#define KEY_SWITCH_TAB_PREFIX   CONF_KEYS_PREFIX "/switch_to_tab_"
 
251
 
 
252
 typedef struct
 
253
 {
 
254
@@ -173,6 +178,42 @@
 
255
     KEY_MOVE_TAB_RIGHT, ACCEL_PATH_MOVE_TAB_RIGHT, 0, 0, NULL, FALSE, TRUE },
 
256
   { N_("Detach Tab"),
 
257
     KEY_DETACH_TAB, ACCEL_PATH_DETACH_TAB, 0, 0, NULL, FALSE, TRUE },
 
258
+  { N_("Switch to Tab 1"),
 
259
+    KEY_SWITCH_TAB_PREFIX "1",
 
260
+    ACCEL_PATH_SWITCH_TAB_PREFIX "1", GDK_1, GDK_MOD1_MASK, NULL, FALSE, TRUE },
 
261
+  { N_("Switch to Tab 2"),
 
262
+    KEY_SWITCH_TAB_PREFIX "2",
 
263
+    ACCEL_PATH_SWITCH_TAB_PREFIX "2", GDK_2, GDK_MOD1_MASK, NULL, FALSE, TRUE },
 
264
+  { N_("Switch to Tab 3"),
 
265
+    KEY_SWITCH_TAB_PREFIX "3",
 
266
+    ACCEL_PATH_SWITCH_TAB_PREFIX "3", GDK_3, GDK_MOD1_MASK, NULL, FALSE, TRUE },
 
267
+  { N_("Switch to Tab 4"),
 
268
+    KEY_SWITCH_TAB_PREFIX "4",
 
269
+    ACCEL_PATH_SWITCH_TAB_PREFIX "4", GDK_4, GDK_MOD1_MASK, NULL, FALSE, TRUE },
 
270
+  { N_("Switch to Tab 5"),
 
271
+    KEY_SWITCH_TAB_PREFIX "5",
 
272
+    ACCEL_PATH_SWITCH_TAB_PREFIX "5", GDK_5, GDK_MOD1_MASK, NULL, FALSE, TRUE },
 
273
+  { N_("Switch to Tab 6"),
 
274
+    KEY_SWITCH_TAB_PREFIX "6",
 
275
+    ACCEL_PATH_SWITCH_TAB_PREFIX "6", GDK_6, GDK_MOD1_MASK, NULL, FALSE, TRUE },
 
276
+  { N_("Switch to Tab 7"),
 
277
+    KEY_SWITCH_TAB_PREFIX "7",
 
278
+    ACCEL_PATH_SWITCH_TAB_PREFIX "7", GDK_7, GDK_MOD1_MASK, NULL, FALSE, TRUE },
 
279
+  { N_("Switch to Tab 8"),
 
280
+    KEY_SWITCH_TAB_PREFIX "8",
 
281
+    ACCEL_PATH_SWITCH_TAB_PREFIX "8", GDK_8, GDK_MOD1_MASK, NULL, FALSE, TRUE },
 
282
+  { N_("Switch to Tab 9"),
 
283
+    KEY_SWITCH_TAB_PREFIX "9",
 
284
+    ACCEL_PATH_SWITCH_TAB_PREFIX "9", GDK_9, GDK_MOD1_MASK, NULL, FALSE, TRUE },
 
285
+  { N_("Switch to Tab 10"),
 
286
+    KEY_SWITCH_TAB_PREFIX "10",
 
287
+    ACCEL_PATH_SWITCH_TAB_PREFIX "10", 0, 0, NULL, FALSE, TRUE },
 
288
+  { N_("Switch to Tab 11"),
 
289
+    KEY_SWITCH_TAB_PREFIX "11",
 
290
+    ACCEL_PATH_SWITCH_TAB_PREFIX "11", 0, 0, NULL, FALSE, TRUE },
 
291
+  { N_("Switch to Tab 12"),
 
292
+    KEY_SWITCH_TAB_PREFIX "12",
 
293
+    ACCEL_PATH_SWITCH_TAB_PREFIX "12", 0, 0, NULL, FALSE, TRUE }
 
294
 };
 
295
 
 
296
 static KeyEntry help_entries[] = {
 
297
@@ -186,7 +227,7 @@
 
298
   { view_entries, G_N_ELEMENTS (view_entries), N_("View") },
 
299
   { terminal_entries, G_N_ELEMENTS (terminal_entries), N_("Terminal") },
 
300
   { tabs_entries, G_N_ELEMENTS (tabs_entries), N_("Tabs") },
 
301
-  { help_entries, G_N_ELEMENTS (help_entries), N_("Help") }
 
302
+  { help_entries, G_N_ELEMENTS (help_entries), N_("Help") },
 
303
 };
 
304
 
 
305
 enum