[Xfce4-commits] [apps/xfce4-terminal] 01/01: Create Alt+digit shortcuts if they haven't been loaded from config file
noreply at xfce.org
noreply at xfce.org
Fri Aug 5 17:00:03 CEST 2016
This is an automated email from the git hooks/post-receive script.
f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.
commit a15b5cfe560960c2ce9a93f05c22ecf7e96cb2dd
Author: Igor <f2404 at yandex.ru>
Date: Fri Aug 5 17:59:08 2016 +0300
Create Alt+digit shortcuts if they haven't been loaded from config file
Fixes https://bugzilla.xfce.org/show_bug.cgi?id=10639
---
terminal/terminal-app.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/terminal/terminal-app.c b/terminal/terminal-app.c
index 6985892..437d5e4 100644
--- a/terminal/terminal-app.c
+++ b/terminal/terminal-app.c
@@ -262,6 +262,7 @@ static gboolean
terminal_app_accel_map_load (gpointer user_data)
{
TerminalApp *app = TERMINAL_APP (user_data);
+ GtkAccelKey key;
gchar *path;
gchar name[50];
guint i;
@@ -275,21 +276,20 @@ terminal_app_accel_map_load (gpointer user_data)
gtk_accel_map_load (path);
g_free (path);
}
- else
- {
- /* create default Alt+N accelerators */
- for (i = 1; i < 10; i++)
- {
- g_snprintf (name, sizeof (name), "<Actions>/terminal-window/goto-tab-%d", i);
- gtk_accel_map_change_entry (name, GDK_KEY_0 + i, GDK_MOD1_MASK, FALSE);
- }
- }
/* watch for changes */
app->accel_map = gtk_accel_map_get ();
g_signal_connect_swapped (G_OBJECT (app->accel_map), "changed",
G_CALLBACK (terminal_app_accel_map_changed), app);
+ /* check and create default Alt+N accelerators */
+ for (i = 1; i < 10; i++)
+ {
+ g_snprintf (name, sizeof (name), "<Actions>/terminal-window/goto-tab-%d", i);
+ if (!gtk_accel_map_lookup_entry (name, &key) || key.accel_key == 0)
+ gtk_accel_map_change_entry (name, GDK_KEY_0 + i, GDK_MOD1_MASK, FALSE);
+ }
+
return FALSE;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list