[gedit/wip/tabs] Show accels
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/tabs] Show accels
- Date: Thu, 11 Jul 2013 15:38:18 +0000 (UTC)
commit 66bcb9477b23904e6086c5b8873bb684fbf9593f
Author: Ignacio Casal Quinteiro <ignacio casal nice-software com>
Date: Thu Jul 11 17:38:05 2013 +0200
Show accels
gedit/gedit-notebook.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-notebook.c b/gedit/gedit-notebook.c
index e7762e4..6b18a97 100644
--- a/gedit/gedit-notebook.c
+++ b/gedit/gedit-notebook.c
@@ -583,6 +583,7 @@ populate_menu (GeditNotebook *notebook)
GMenuItem *item;
gchar *tab_name;
gchar *name;
+ gchar *key_binding;
tab_name = _gedit_tab_get_name (GEDIT_TAB (tab));
name = gedit_utils_escape_underscores (tab_name, -1);
@@ -590,8 +591,16 @@ populate_menu (GeditNotebook *notebook)
item = g_menu_item_new (name, NULL);
g_free (name);
+
g_menu_item_set_action_and_target (item, "notebook.page", "i", i);
+ if (i < 9)
+ {
+ key_binding = g_strdup_printf ("<Alt>%d", i + 1);
+ g_menu_item_set_attribute (item, "accel", "s", key_binding);
+ g_free (key_binding);
+ }
+
g_menu_append_item (priv->documents_menu, item);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]