[gedit] plugin/spell : change deprecated accels methods
- From: Sebastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] plugin/spell : change deprecated accels methods
- Date: Sun, 3 Aug 2014 11:10:23 +0000 (UTC)
commit 7a5d1f8a3240a6d772735ecad893fab9ad0c5fc1
Author: Sebastien Lafargue <slafargue gnome org>
Date: Sun Aug 3 12:34:18 2014 +0200
plugin/spell : change deprecated accels methods
gtk_application_add_accelerator() and gtk_application_remove_accelerator()
are deprecated and replaced by gtk_application_set_accels_for_action.
plugins/spell/gedit-spell-app-activatable.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-app-activatable.c b/plugins/spell/gedit-spell-app-activatable.c
index f617c1f..56cef64 100644
--- a/plugins/spell/gedit-spell-app-activatable.c
+++ b/plugins/spell/gedit-spell-app-activatable.c
@@ -129,7 +129,8 @@ gedit_spell_app_activatable_activate (GeditAppActivatable *activatable)
GeditSpellAppActivatablePrivate *priv = gedit_spell_app_activatable_get_instance_private
(app_activatable);
GMenuItem *item;
- gtk_application_add_accelerator (GTK_APPLICATION (priv->app), "<Shift>F7", "win.check-spell", NULL);
+ const gchar *accels[] = { "<Shift>F7", NULL };
+ gtk_application_set_accels_for_action (GTK_APPLICATION (priv->app),"win.check-spell", accels);
priv->menu_ext = gedit_app_activatable_extend_menu (activatable, "spell-section");
item = g_menu_item_new (_("_Check Spelling..."), "win.check-spell");
@@ -151,7 +152,8 @@ gedit_spell_app_activatable_deactivate (GeditAppActivatable *activatable)
GeditSpellAppActivatable *app_activatable = GEDIT_SPELL_APP_ACTIVATABLE (activatable);
GeditSpellAppActivatablePrivate *priv = gedit_spell_app_activatable_get_instance_private
(app_activatable);
- gtk_application_remove_accelerator (GTK_APPLICATION (priv->app), "win.check-spell", NULL);
+ const gchar *accels[] = { NULL };
+ gtk_application_set_accels_for_action (GTK_APPLICATION (priv->app),"win.check-spell", accels);
g_clear_object (&priv->menu_ext);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]