[gnome-music/wip/mschraal/baseview-cleanup: 1/7] songsview: Move StarHandlerWidget here
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/baseview-cleanup: 1/7] songsview: Move StarHandlerWidget here
- Date: Wed, 17 Jul 2019 18:53:21 +0000 (UTC)
commit d4608fe9cacc2cfb334e3a1488cd290e09f0e416
Author: Marinus Schraal <mschraal gnome org>
Date: Wed Jul 17 16:50:59 2019 +0200
songsview: Move StarHandlerWidget here
It is only used by SongsView at this point.
gnomemusic/views/baseview.py | 2 --
gnomemusic/views/searchview.py | 3 +--
gnomemusic/views/songsview.py | 2 ++
3 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/views/baseview.py b/gnomemusic/views/baseview.py
index 05ed09f3..ce0583a0 100644
--- a/gnomemusic/views/baseview.py
+++ b/gnomemusic/views/baseview.py
@@ -25,7 +25,6 @@
from gi.repository import GObject, Gtk
from gnomemusic import log
-from gnomemusic.widgets.starhandlerwidget import StarHandlerWidget
class BaseView(Gtk.Stack):
@@ -63,7 +62,6 @@ class BaseView(Gtk.Stack):
self._grid.add(self._box)
- self._star_handler = StarHandlerWidget(self, 6)
self._window = window
self._headerbar = window._headerbar
diff --git a/gnomemusic/views/searchview.py b/gnomemusic/views/searchview.py
index 2dec8844..497364db 100644
--- a/gnomemusic/views/searchview.py
+++ b/gnomemusic/views/searchview.py
@@ -268,8 +268,7 @@ class SearchView(BaseView):
and not self.props.selection_mode):
self.props.selection_mode = True
- if (self.selection_mode
- and not self._star_handler.star_renderer_click):
+ if self.props.selection_mode:
path, col, cell_x, cell_y = self._view.get_path_at_pos(x, y)
iter_ = self.model.get_iter(path)
self.model[iter_][6] = not self.model[iter_][6]
diff --git a/gnomemusic/views/songsview.py b/gnomemusic/views/songsview.py
index 616ef3a2..3012761b 100644
--- a/gnomemusic/views/songsview.py
+++ b/gnomemusic/views/songsview.py
@@ -30,6 +30,7 @@ from gnomemusic import log
from gnomemusic.coresong import CoreSong
from gnomemusic.player import PlayerPlaylist
from gnomemusic.views.baseview import BaseView
+from gnomemusic.widgets.starhandlerwidget import StarHandlerWidget
logger = logging.getLogger(__name__)
@@ -133,6 +134,7 @@ class SongsView(BaseView):
"Duration", duration_renderer, text=5)
self._view.append_column(column_duration)
+ self._star_handler = StarHandlerWidget(self, 6)
column_star = Gtk.TreeViewColumn()
self._view.append_column(column_star)
self._star_handler.add_star_renderers(column_star)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]