From 880daf8bb2d13a8f5188766f5fcdb61ff5552b20 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Fri, 20 Jan 2012 13:56:02 -0500 Subject: [PATCH] GtkApplication: change the accel prefix we use GtkApplication adds to the global accel map using the prefix which is also used by GtkAction. This causes GtkApplicationWindow to try to parse GtkAction-added accels as if they were its own (which fails). Switch to a different namespace -- /. https://bugzilla.gnome.org/show_bug.cgi?id=668367 --- gtk/gtkaccelmap.c | 2 +- gtk/gtkapplicationwindow.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk/gtkaccelmap.c b/gtk/gtkaccelmap.c index 2f33b92c66..2b92145156 100644 --- a/gtk/gtkaccelmap.c +++ b/gtk/gtkaccelmap.c @@ -1073,7 +1073,7 @@ _gtk_accel_path_for_action (const gchar *action_name, { GString *s; - s = g_string_new ("/"); + s = g_string_new ("/"); g_string_append (s, action_name); if (parameter) { diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c index 4d901d51ff..fabf8ef6d2 100644 --- a/gtk/gtkapplicationwindow.c +++ b/gtk/gtkapplicationwindow.c @@ -375,10 +375,10 @@ add_accel_closure (gpointer data, if (accel_key == 0) return; - if (!g_str_has_prefix (accel_path, "/")) + if (!g_str_has_prefix (accel_path, "/")) return; - path = accel_path + strlen ("/"); + path = accel_path + strlen ("/"); p = strchr (path, '/'); if (p) {