[gnome-calculator/gnome-3-14: 18/19] Use set_accels_for_action().



commit 3967750c679c376df2192d004eb9a49a6de191cd
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Tue Sep 9 05:18:35 2014 +0200

    Use set_accels_for_action().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736300

 src/gnome-calculator.vala |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gnome-calculator.vala b/src/gnome-calculator.vala
index 9b5b9a0..4b9ca88 100644
--- a/src/gnome-calculator.vala
+++ b/src/gnome-calculator.vala
@@ -89,10 +89,10 @@ public class Calculator : Gtk.Application
         var menu = builder.get_object ("appmenu") as MenuModel;
         set_app_menu (menu);
 
-        add_accelerator ("<control>C", "win.copy", null);
-        add_accelerator ("<control>V", "win.paste", null);
-        add_accelerator ("<control>Z", "win.undo", null);
-        add_accelerator ("<control><shift>Z", "win.redo", null);
+        set_accels_for_action ("win.copy", {"<control>C"});
+        set_accels_for_action ("win.paste", {"<control>V"});
+        set_accels_for_action ("win.undo", {"<control>Z"});
+        set_accels_for_action ("win.redo", {"<control><shift>Z"});
     }
 
     protected override void activate ()


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