[gnome-music/wip/mschraal/gtk4-v2: 33/38] albumsview: Misc fixes: events & deprecated props
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4-v2: 33/38] albumsview: Misc fixes: events & deprecated props
- Date: Tue, 11 May 2021 13:48:17 +0000 (UTC)
commit 3dbb9eabfcf5d45f0a40e49006e323124b84d025
Author: Marinus Schraal <mschraal gnome org>
Date: Wed Apr 14 08:49:32 2021 +0200
albumsview: Misc fixes: events & deprecated props
gnomemusic/views/albumsview.py | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/gnomemusic/views/albumsview.py b/gnomemusic/views/albumsview.py
index c9dd0a4c4..75599881f 100644
--- a/gnomemusic/views/albumsview.py
+++ b/gnomemusic/views/albumsview.py
@@ -134,7 +134,7 @@ class AlbumsView(Gtk.Stack):
covers_col = math.ceil(viewport_w / cover_w)
covers_row = math.ceil(viewport_h / cover_h)
- children = self._flowbox.get_children()
+ children = [child for child in self._flowbox]
retrieve_list = []
for i, albumcover in enumerate(children):
if top_left_cover == albumcover:
@@ -204,14 +204,13 @@ class AlbumsView(Gtk.Stack):
def _set_album_headerbar(self, corealbum):
self._headerbar.props.state = HeaderBar.State.CHILD
- self._headerbar.props.title = corealbum.props.title
- self._headerbar.props.subtitle = corealbum.props.artist
+ # self._headerbar.props.title = corealbum.props.title
+ # self._headerbar.props.subtitle = corealbum.props.artist
@Gtk.Template.Callback()
def _on_flowbox_press_begin(self, gesture, sequence):
- event = gesture.get_last_event(sequence)
- ok, state = event.get_state()
- if ((ok is True
+ state = gesture.get_current_event_state()
+ if ((state
and state == Gdk.ModifierType.CONTROL_MASK)
or self.props.selection_mode is True):
self._flowbox.props.selection_mode = Gtk.SelectionMode.MULTIPLE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]