[gnome-music] selectiontoolbar: Remove obsolete playlist button



commit d19b0e3ab4ff85fe65bd878c3d05299a139a00a6
Author: Jean Felder <jean felder gmail com>
Date:   Sun Jan 28 22:45:33 2018 +0100

    selectiontoolbar: Remove obsolete playlist button
    
    "Remove from playlist" button is not used anymore. Song removal from a
    playlist is now handled by a context menu.

 data/SelectionToolbar.ui | 12 ------------
 gnomemusic/window.py     | 17 -----------------
 2 files changed, 29 deletions(-)
---
diff --git a/data/SelectionToolbar.ui b/data/SelectionToolbar.ui
index b889df7..bf4600a 100644
--- a/data/SelectionToolbar.ui
+++ b/data/SelectionToolbar.ui
@@ -16,17 +16,5 @@
         </style>
       </object>
     </child>
-    <child>
-      <object class="GtkButton" id="button2">
-        <property name="label" translatable="yes">_Remove from Playlist</property>
-        <property name="use_underline">True</property>
-        <property name="visible">True</property>
-        <property name="can_focus">True</property>
-        <property name="receives_default">True</property>
-        <style>
-          <class name="text-button"/>
-        </style>
-      </object>
-    </child>
   </object>
 </interface>
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index d5074b8..292df8a 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -292,8 +292,6 @@ class Window(Gtk.ApplicationWindow):
         self.toolbar.connect('selection-mode-changed', self._on_selection_mode_changed)
         self.selection_toolbar._add_to_playlist_button.connect(
             'clicked', self._on_add_to_playlist_button_clicked)
-        self.selection_toolbar._remove_from_playlist_button.connect(
-            'clicked', self._on_remove_from_playlist_button_clicked)
 
         self.toolbar.set_state(ToolbarState.MAIN)
         self.toolbar.header_bar.show()
@@ -578,21 +576,6 @@ class Window(Gtk.ApplicationWindow):
 
         self._stack.get_visible_child().get_selected_songs(callback)
 
-    @log
-    def _on_remove_from_playlist_button_clicked(self, widget):
-        if self._stack.get_visible_child() != self.views[View.PLAYLIST]:
-            return
-
-        def callback(selected_songs):
-            if len(selected_songs) < 1:
-                return
-
-            playlist.remove_from_playlist(
-                self.views[View.PLAYLIST].current_playlist, selected_songs)
-            self.toolbar.set_selection_mode(False)
-
-        self._stack.get_visible_child().get_selected_songs(callback)
-
     @log
     def push_loading_notification(self):
         """ Increases the counter of loading notification triggers


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