[totem] save-file: Use set_accels_for_action()



commit 21e981fede4703af4fabb00b191e09703d3802c8
Author: Bastien Nocera <hadess hadess net>
Date:   Fri May 30 18:05:31 2014 +0200

    save-file: Use set_accels_for_action()
    
    Instead of add_accelerator() and remove_accelerator().

 src/plugins/save-file/totem-save-file.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/save-file/totem-save-file.c b/src/plugins/save-file/totem-save-file.c
index 6fb6f9a..042cdd2 100644
--- a/src/plugins/save-file/totem-save-file.c
+++ b/src/plugins/save-file/totem-save-file.c
@@ -314,6 +314,7 @@ impl_activate (PeasActivatable *plugin)
        GMenuItem *item;
        char *path;
        char *mrl;
+       const char const *accels[] = { "<Primary>S", NULL };
 
        /* make sure nautilus is in the path */
        path = g_find_program_in_path ("nautilus");
@@ -341,10 +342,9 @@ impl_activate (PeasActivatable *plugin)
        g_signal_connect (G_OBJECT (priv->action), "activate",
                          G_CALLBACK (totem_save_file_plugin_copy), plugin);
        g_action_map_add_action (G_ACTION_MAP (priv->totem), G_ACTION (priv->action));
-       gtk_application_add_accelerator (GTK_APPLICATION (priv->totem),
-                                        "<Primary>S",
-                                        "app.save-as",
-                                        NULL);
+       gtk_application_set_accels_for_action (GTK_APPLICATION (priv->totem),
+                                              "app.save-as",
+                                              accels);
        /* FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=695917
        gtk_application_add_accelerator (GTK_APPLICATION (priv->totem),
                                         "Save",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]