[gnome-music/wip/mschraal/gtk4-pre-squash-backup: 135/254] discbox: Restore song activation (partial, FIXME)
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4-pre-squash-backup: 135/254] discbox: Restore song activation (partial, FIXME)
- Date: Thu, 17 Feb 2022 11:35:41 +0000 (UTC)
commit c6e125776a3a34c0d800e9ddad44bddcb9552b1f
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 | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
---
diff --git a/gnomemusic/widgets/discbox.py b/gnomemusic/widgets/discbox.py
index e38bd39c2..318615159 100644
--- a/gnomemusic/widgets/discbox.py
+++ b/gnomemusic/widgets/discbox.py
@@ -26,7 +26,7 @@ from __future__ import annotations
from gettext import gettext as _
import typing
-from gi.repository import Gdk, Gio, GObject, Gtk
+from gi.repository import Gio, GObject, Gtk
from gnomemusic.widgets.songwidget import SongWidget
from gnomemusic.widgets.songwidgetmenu import SongWidgetMenu
@@ -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]