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
This commit is contained in:
parent
e34589ddea
commit
880daf8bb2
@ -1073,7 +1073,7 @@ _gtk_accel_path_for_action (const gchar *action_name,
|
|||||||
{
|
{
|
||||||
GString *s;
|
GString *s;
|
||||||
|
|
||||||
s = g_string_new ("<Actions>/");
|
s = g_string_new ("<GAction>/");
|
||||||
g_string_append (s, action_name);
|
g_string_append (s, action_name);
|
||||||
if (parameter)
|
if (parameter)
|
||||||
{
|
{
|
||||||
|
@ -375,10 +375,10 @@ add_accel_closure (gpointer data,
|
|||||||
if (accel_key == 0)
|
if (accel_key == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!g_str_has_prefix (accel_path, "<Actions>/"))
|
if (!g_str_has_prefix (accel_path, "<GAction>/"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
path = accel_path + strlen ("<Actions>/");
|
path = accel_path + strlen ("<GAction>/");
|
||||||
p = strchr (path, '/');
|
p = strchr (path, '/');
|
||||||
if (p)
|
if (p)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user