[gtk+] GtkApplication: change the accel prefix we use
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkApplication: change the accel prefix we use
- Date: Mon, 23 Jan 2012 16:17:29 +0000 (UTC)
commit 880daf8bb2d13a8f5188766f5fcdb61ff5552b20
Author: Ryan Lortie <desrt desrt ca>
Date: Fri Jan 20 13:56:02 2012 -0500
GtkApplication: change the accel prefix we use
GtkApplication adds to the global accel map using the prefix <Actions>
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 -- <GAction>/.
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 2f33b92..2b92145 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 ("<Actions>/");
+ s = g_string_new ("<GAction>/");
g_string_append (s, action_name);
if (parameter)
{
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index 4d901d5..fabf8ef 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, "<Actions>/"))
+ if (!g_str_has_prefix (accel_path, "<GAction>/"))
return;
- path = accel_path + strlen ("<Actions>/");
+ path = accel_path + strlen ("<GAction>/");
p = strchr (path, '/');
if (p)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]