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



commit 4408f5920919af6328ccd8bfd0f56b2c7914dc95
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 e7878463..87d2cef8 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]