forked from AuroraMiddleware/gtk
app: don't use deprecated function
gtk_application_add_accelerator() is deprecated, but was still used inside IGNORE_DEPRECATIONS's. https://bugzilla.gnome.org/show_bug.cgi?id=764846
This commit is contained in:
parent
399e8db336
commit
29971b0cc9
@ -810,10 +810,15 @@ extract_accel_from_menu_item (GMenuModel *model,
|
|||||||
}
|
}
|
||||||
g_object_unref (iter);
|
g_object_unref (iter);
|
||||||
|
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|
||||||
if (accel && action)
|
if (accel && action)
|
||||||
gtk_application_add_accelerator (app, accel, action, target);
|
{
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
const gchar *accels[2] = { accel, NULL };
|
||||||
|
gchar *detailed_action_name;
|
||||||
|
|
||||||
|
detailed_action_name = g_action_print_detailed_name (action, target);
|
||||||
|
gtk_application_set_accels_for_action (app, detailed_action_name, accels);
|
||||||
|
g_free (detailed_action_name);
|
||||||
|
}
|
||||||
|
|
||||||
if (target)
|
if (target)
|
||||||
g_variant_unref (target);
|
g_variant_unref (target);
|
||||||
|
Loading…
Reference in New Issue
Block a user