[gnome-music/gnome-3-12] Add select all accel to app.



commit 7b26a8d3c82ee7ca16d24a52ec43163ddd083b01
Author: Sai Suman Prayaga <suman sai14 gmail com>
Date:   Mon Apr 7 20:26:25 2014 +0530

    Add select all accel to app.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727522

 gnomemusic/window.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index b7ccba7..8ce7933 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -64,6 +64,7 @@ class Window(Gtk.ApplicationWindow):
         self.settings = Gio.Settings.new('org.gnome.Music')
         self.add_action(self.settings.create_action('repeat'))
         selectAll = Gio.SimpleAction.new('selectAll', None)
+        app.add_accelerator('<Primary>a', 'win.selectAll', None)
         selectAll.connect('activate', self._on_select_all)
         self.add_action(selectAll)
         selectNone = Gio.SimpleAction.new('selectNone', None)
@@ -243,6 +244,8 @@ class Window(Gtk.ApplicationWindow):
 
     @log
     def _on_select_all(self, action, param):
+        if self.toolbar._selectionMode is False:
+            return
         if self.toolbar._state != ToolbarState.SINGLE:
             model = self._stack.get_visible_child()._model
         else:


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