[gnome-music] PlaylistDialog: accept response on row-activated



commit 043eb57c5fb48cff7001f26541a3ed9a09dfe1a9
Author: Gaurav Narula <gnarula94 gmail com>
Date:   Mon Apr 18 15:09:56 2016 +0530

    PlaylistDialog: accept response on row-activated
    
    Allows selecting playlist by all keybindings that emit row-activated
    https://bugzilla.gnome.org/show_bug.cgi?id=744820

 gnomemusic/widgets.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
index c2c4eeb..f6c8492 100644
--- a/gnomemusic/widgets.py
+++ b/gnomemusic/widgets.py
@@ -739,6 +739,7 @@ class PlaylistDialog():
         self.dialog_box.set_transient_for(parent)
 
         self.view = self.ui.get_object('treeview1')
+        self.view.set_activate_on_single_click(False)
         self.selection = self.ui.get_object('treeview-selection1')
         self.selection.connect('changed', self._on_selection_changed)
         self._add_list_renderers()
@@ -827,6 +828,8 @@ class PlaylistDialog():
         _iter = self.model.get_iter(path)
         if self.model.get_value(_iter, 1):
             self.view.set_cursor(path, column, True)
+        else:
+            self.dialog_box.response(Gtk.ResponseType.ACCEPT)
 
     @log
     def _on_selection_changed(self, selection):


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