[gedit-plugins/remove-deprecated] Remove deprecated gtk_application_add_accelerator
- From: Jordi Mas <jmas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins/remove-deprecated] Remove deprecated gtk_application_add_accelerator
- Date: Sun, 28 Apr 2019 09:03:18 +0000 (UTC)
commit d3621fabe2b4ed8a110db67e0fd2bba2d2004692
Author: Jordi Mas <jmas softcatala org>
Date: Sun Apr 28 11:03:01 2019 +0200
Remove deprecated gtk_application_add_accelerator
plugins/bookmarks/gedit-bookmarks-app-activatable.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/plugins/bookmarks/gedit-bookmarks-app-activatable.c
b/plugins/bookmarks/gedit-bookmarks-app-activatable.c
index aac6270..02c8255 100644
--- a/plugins/bookmarks/gedit-bookmarks-app-activatable.c
+++ b/plugins/bookmarks/gedit-bookmarks-app-activatable.c
@@ -132,10 +132,13 @@ gedit_bookmarks_app_activatable_activate (GeditAppActivatable *activatable)
GeditBookmarksAppActivatable *app_activatable = GEDIT_BOOKMARKS_APP_ACTIVATABLE (activatable);
GeditBookmarksAppActivatablePrivate *priv = gedit_bookmarks_app_activatable_get_instance_private
(app_activatable);
GMenuItem *item;
+ const gchar *toggle_accel[] = {"<Primary><Alt>B", NULL};
+ const gchar *next_others_accel[] = {"<Primary>B", NULL};
+ const gchar *prev_accel[] = {"<Primary><Shift>B", NULL};
- gtk_application_add_accelerator (GTK_APPLICATION (priv->app), "<Primary><Alt>B",
"win.bookmark-toggle", NULL);
- gtk_application_add_accelerator (GTK_APPLICATION (priv->app), "<Primary>B", "win.bookmark-next",
NULL);
- gtk_application_add_accelerator (GTK_APPLICATION (priv->app), "<Primary><Shift>B",
"win.bookmark-prev", NULL);
+ gtk_application_set_accels_for_action (GTK_APPLICATION (priv->app), "win.bookmark-toggle",
toggle_accel);
+ gtk_application_set_accels_for_action (GTK_APPLICATION (priv->app), "win.bookmark-next",
next_others_accel);
+ gtk_application_set_accels_for_action (GTK_APPLICATION (priv->app), "win.bookmark-prev", prev_accel);
priv->menu_ext = gedit_app_activatable_extend_menu (activatable, "search-section");
item = g_menu_item_new (_("Toggle Bookmark"), "win.bookmark-toggle");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]