[gnome-music] selectiontoolbar: Fix partial playlist button removal
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] selectiontoolbar: Fix partial playlist button removal
- Date: Mon, 29 Jan 2018 19:04:43 +0000 (UTC)
commit 34c905dcf8d4bb9a73d17dd66e2b73c018d39e3b
Author: Jean Felder <jean felder gmail com>
Date: Mon Jan 29 19:19:43 2018 +0100
selectiontoolbar: Fix partial playlist button removal
Remove all remaining calls to _remove_from_playlist_button
Commit d19b0e3a removed obsolete "Remove from playlist button" but
there were still remaining references all over the code.
gnomemusic/player.py | 1 -
gnomemusic/views/baseview.py | 4 ----
gnomemusic/window.py | 1 -
3 files changed, 6 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index e0f98e5..ca35d9a 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -1113,5 +1113,4 @@ class SelectionToolbar():
self._ui.add_from_resource('/org/gnome/Music/SelectionToolbar.ui')
self.actionbar = self._ui.get_object('actionbar')
self._add_to_playlist_button = self._ui.get_object('button1')
- self._remove_from_playlist_button = self._ui.get_object('button2')
self.actionbar.set_visible(False)
diff --git a/gnomemusic/views/baseview.py b/gnomemusic/views/baseview.py
index 7f5489c..8048bf9 100644
--- a/gnomemusic/views/baseview.py
+++ b/gnomemusic/views/baseview.py
@@ -151,7 +151,6 @@ class BaseView(Gtk.Stack):
select_toolbar = self._selection_toolbar
select_toolbar.actionbar.set_visible(True)
select_toolbar._add_to_playlist_button.set_sensitive(False)
- select_toolbar._remove_from_playlist_button.set_sensitive(False)
else:
self._header_bar.set_selection_mode(False)
track_playing = self.player.currentTrack is not None
@@ -190,7 +189,6 @@ class BaseView(Gtk.Stack):
"""Updates header during item selection."""
select_toolbar = self._selection_toolbar
select_toolbar._add_to_playlist_button.set_sensitive(n_items > 0)
- select_toolbar._remove_from_playlist_button.set_sensitive(n_items > 0)
if n_items > 0:
self._header_bar._selection_menu_label.set_text(
ngettext("Selected {} item",
@@ -287,7 +285,6 @@ class BaseView(Gtk.Stack):
if count > 0:
select_toolbar = self._selection_toolbar
select_toolbar._add_to_playlist_button.set_sensitive(True)
- select_toolbar._remove_from_playlist_button.set_sensitive(True)
self.update_header_from_selection(count)
self._view.queue_draw()
@@ -298,7 +295,6 @@ class BaseView(Gtk.Stack):
self._set_selection(False)
select_toolbar = self._selection_toolbar
select_toolbar._add_to_playlist_button.set_sensitive(False)
- select_toolbar._remove_from_playlist_button.set_sensitive(False)
self._header_bar._selection_menu_label.set_text(
_("Click on items to select them"))
self.queue_draw()
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 292df8a..91840a3 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -555,7 +555,6 @@ class Window(Gtk.ApplicationWindow):
child = self._stack.get_visible_child()
in_playlist = (child == self.views[View.PLAYLIST])
self.selection_toolbar._add_to_playlist_button.set_visible(not in_playlist)
- self.selection_toolbar._remove_from_playlist_button.set_visible(in_playlist)
@log
def _on_add_to_playlist_button_clicked(self, widget):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]