[gnome-music/wip/jfelder/playlistview-random-song: 5/6] playlistview: Simplify row-activated signal emissions



commit d5a0888bff6642a35985e531cae4fb3f213ced31
Author: Jean Felder <jfelder src gnome org>
Date:   Thu Apr 18 17:12:15 2019 +0200

    playlistview: Simplify row-activated signal emissions
    
    The column parameter is not used. So, it can be None.

 gnomemusic/views/playlistview.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/views/playlistview.py b/gnomemusic/views/playlistview.py
index 4d964ad4..d280e259 100644
--- a/gnomemusic/views/playlistview.py
+++ b/gnomemusic/views/playlistview.py
@@ -436,8 +436,7 @@ class PlaylistView(BaseView):
     def _play_song(self, menuitem, data=None):
         model, _iter = self._view.get_selection().get_selected()
         path = model.get_path(_iter)
-        cols = self._view.get_columns()
-        self._view.emit('row-activated', path, cols[0])
+        self._view.emit('row-activated', path, None)
 
     @log
     def _add_song_to_playlist(self, menuitem, data=None):
@@ -603,8 +602,7 @@ class PlaylistView(BaseView):
 
     @log
     def _on_play_activate(self, menuitem, data=None):
-        cols = self._view.get_columns()
-        self._view.emit('row-activated', None, cols[0])
+        self._view.emit('row-activated', None, None)
 
     @log
     def _current_playlist_is_protected(self):


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