[gnome-terminal/gnome-3-8] accels: Add more accel-able tabs



commit 92562d4bec25ba3428dd5cd7d01055d59fa08675
Author: Christian Persch <chpe gnome org>
Date:   Wed Mar 20 20:21:28 2013 +0100

    accels: Add more accel-able tabs
    
    https://bugzilla.gnome.org/show_bug.cgi?id=696123

 src/org.gnome.Terminal.gschema.xml.in |   92 +++++++++++++++++++++++++++++++++
 src/terminal-accels.c                 |   33 +++++++++++-
 src/terminal-tabs-menu.c              |    2 +-
 3 files changed, 123 insertions(+), 4 deletions(-)
---
diff --git a/src/org.gnome.Terminal.gschema.xml.in b/src/org.gnome.Terminal.gschema.xml.in
index 8690b9a..22c648d 100644
--- a/src/org.gnome.Terminal.gschema.xml.in
+++ b/src/org.gnome.Terminal.gschema.xml.in
@@ -454,6 +454,98 @@
       <default>'disabled'</default>
       <_summary>Keyboard shortcut to switch to tab 12</_summary>
     </key>
+    <key name="switch-to-tab-13" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-14" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-15" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-16" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-17" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-18" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-19" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-20" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-21" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-22" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-23" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-24" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-25" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-26" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-27" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-28" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-29" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-30" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-31" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-32" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-33" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-34" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
+    <key name="switch-to-tab-35" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to switch to the numbered tab</summary>
+    </key>
     <key name="help" type="s">
       <default>'F1'</default>
       <_summary>Keyboard shortcut to launch help</_summary>
diff --git a/src/terminal-accels.c b/src/terminal-accels.c
index 5d6468b..620a012 100644
--- a/src/terminal-accels.c
+++ b/src/terminal-accels.c
@@ -197,7 +197,7 @@ static KeyEntry tabs_entries[] =
   { N_("Detach Tab"),
     KEY_DETACH_TAB, ACCEL_PATH_DETACH_TAB, { 0, 0 }, NULL, FALSE, TRUE },
 
-#define SWITCH_TAB_ACCEL(name, num, modifier, key)       \
+#define SWITCH_TAB_ACCEL(name, num, modifier, key) \
   { name, \
     KEY_SWITCH_TAB_PREFIX # num, \
     ACCEL_PATH_SWITCH_TAB_PREFIX # num, \
@@ -206,6 +206,7 @@ static KeyEntry tabs_entries[] =
     FALSE, \
     TRUE \
   }
+#define SWITCH_TAB_ACCEL_HIDDEN(num) SWITCH_TAB_ACCEL (NULL, num, 0, 0)
 
   SWITCH_TAB_ACCEL (N_("Switch to Tab 1"), 1, GDK_MOD1_MASK, GDK_KEY_1),
   SWITCH_TAB_ACCEL (N_("Switch to Tab 2"), 2,  GDK_MOD1_MASK, GDK_KEY_2),
@@ -218,11 +219,34 @@ static KeyEntry tabs_entries[] =
   SWITCH_TAB_ACCEL (N_("Switch to Tab 9"), 9,  GDK_MOD1_MASK, GDK_KEY_9),
   SWITCH_TAB_ACCEL (N_("Switch to Tab 10"), 10, GDK_MOD1_MASK, GDK_KEY_0),
   SWITCH_TAB_ACCEL (N_("Switch to Tab 11"), 11, 0, 0),
-  SWITCH_TAB_ACCEL (N_("Switch to Tab 12"), 12, 0, 0)
+  SWITCH_TAB_ACCEL (N_("Switch to Tab 12"), 12, 0, 0),
+  SWITCH_TAB_ACCEL_HIDDEN (13),
+  SWITCH_TAB_ACCEL_HIDDEN (14),
+  SWITCH_TAB_ACCEL_HIDDEN (15),
+  SWITCH_TAB_ACCEL_HIDDEN (16),
+  SWITCH_TAB_ACCEL_HIDDEN (17),
+  SWITCH_TAB_ACCEL_HIDDEN (18),
+  SWITCH_TAB_ACCEL_HIDDEN (19),
+  SWITCH_TAB_ACCEL_HIDDEN (20),
+  SWITCH_TAB_ACCEL_HIDDEN (21),
+  SWITCH_TAB_ACCEL_HIDDEN (22),
+  SWITCH_TAB_ACCEL_HIDDEN (23),
+  SWITCH_TAB_ACCEL_HIDDEN (24),
+  SWITCH_TAB_ACCEL_HIDDEN (25),
+  SWITCH_TAB_ACCEL_HIDDEN (26),
+  SWITCH_TAB_ACCEL_HIDDEN (27),
+  SWITCH_TAB_ACCEL_HIDDEN (28),
+  SWITCH_TAB_ACCEL_HIDDEN (29),
+  SWITCH_TAB_ACCEL_HIDDEN (30),
+  SWITCH_TAB_ACCEL_HIDDEN (31),
+  SWITCH_TAB_ACCEL_HIDDEN (32),
+  SWITCH_TAB_ACCEL_HIDDEN (33),
+  SWITCH_TAB_ACCEL_HIDDEN (34),
+  SWITCH_TAB_ACCEL_HIDDEN (35)
 };
 
 #undef SWITCH_TAB_ACCEL
-#undef SWITCH_TAB_ACCEL_NO_DEFAULT
+#undef SWITCH_TAB_ACCEL_HIDDEN
 
 static KeyEntry help_entries[] = {
   { N_("Contents"), KEY_HELP, ACCEL_PATH_HELP, { 0, GDK_KEY_F1 }, NULL, FALSE, TRUE }
@@ -766,6 +790,9 @@ terminal_accels_fill_treeview (GtkWidget *tree_view)
          KeyEntry *key_entry = &(all_entries[i].key_entry[j]);
          GtkTreeIter iter;
 
+          if (key_entry->user_visible_name == NULL)
+            continue;
+
           gtk_tree_store_insert_with_values (tree, &iter, &parent_iter, -1,
                                              ACTION_COLUMN, _(key_entry->user_visible_name),
                                              KEYVAL_COLUMN, key_entry,
diff --git a/src/terminal-tabs-menu.c b/src/terminal-tabs-menu.c
index 5536c8a..c2a85fe 100644
--- a/src/terminal-tabs-menu.c
+++ b/src/terminal-tabs-menu.c
@@ -31,7 +31,7 @@
 #include "terminal-screen-container.h"
 #include "terminal-intl.h"
 
-#define TERMINAL_ACCELS_N_TABS_SWITCH (12)
+#define TERMINAL_ACCELS_N_TABS_SWITCH (35) /* keep in sync with terminal-accels.c */
 
 #define LABEL_WIDTH_CHARS 32
 #define ACTION_VERB_FORMAT_PREFIX       "JmpTab"


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