[gnome-music/wip/jfelder/gtk4-v3: 74/115] discbox: Restore song activation (partial, FIXME)
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/gtk4-v3: 74/115] discbox: Restore song activation (partial, FIXME)
- Date: Tue, 8 Feb 2022 11:39:03 +0000 (UTC)
commit 2abef1b2433afd77ff8ad73a7bd0a1a8e5c2769c
Author: Jean Felder <jfelder src gnome org>
Date: Thu Feb 3 19:20:36 2022 +0100
discbox: Restore song activation (partial, FIXME)
gnomemusic/widgets/discbox.py | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/gnomemusic/widgets/discbox.py b/gnomemusic/widgets/discbox.py
index e38bd39c2..8bb8e10ef 100644
--- a/gnomemusic/widgets/discbox.py
+++ b/gnomemusic/widgets/discbox.py
@@ -111,15 +111,19 @@ class DiscBox(Gtk.ListBoxRow):
song_widget.props.select_click = False
return True
- event = Gtk.get_current_event()
- (_, state) = event.get_state()
- mod_mask = Gtk.accelerator_get_default_mod_mask()
- if ((state & mod_mask) == Gdk.ModifierType.CONTROL_MASK
- and not self.props.selection_mode):
- self.props.selection_mode = True
- song_widget.props.select_click = True
- song_widget.props.coresong.props.selected = True
- return True
+ # FIXME:
+ # With GTK4, the get_current_event api has been removed. Instead,
+ # it relies on getting the event information from the underlying
+ # controller. However, it's not possible to access it.
+ # event = Gtk.get_current_event()
+ # (_, state) = event.get_state()
+ # mod_mask = Gtk.accelerator_get_default_mod_mask()
+ # if ((state & mod_mask) == Gdk.ModifierType.CONTROL_MASK
+ # and not self.props.selection_mode):
+ # self.props.selection_mode = True
+ # song_widget.props.select_click = True
+ # song_widget.props.coresong.props.selected = True
+ # return True
if self.props.selection_mode:
song_widget.props.select_click = True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]