[gnome-music] Use accessor for event state
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] Use accessor for event state
- Date: Sat, 11 Aug 2018 22:52:07 +0000 (UTC)
commit d8f30c3f8a90b8112cc3d070124286473a630295
Author: Tyler Garcia <tyler tylergarcia net>
Date: Fri Aug 10 23:40:02 2018 -0700
Use accessor for event state
Fields are deprecated.
Closes: #213
gnomemusic/views/artistsview.py | 2 +-
gnomemusic/views/songsview.py | 2 +-
gnomemusic/widgets/albumcover.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/views/artistsview.py b/gnomemusic/views/artistsview.py
index f8658108..8e7d191b 100644
--- a/gnomemusic/views/artistsview.py
+++ b/gnomemusic/views/artistsview.py
@@ -176,7 +176,7 @@ class ArtistsView(BaseView):
@log
def _on_sidebar_clicked(self, widget, event):
modifiers = Gtk.accelerator_get_default_mod_mask()
- if ((event.state & modifiers) == Gdk.ModifierType.CONTROL_MASK
+ if ((event.get_state() & modifiers) == Gdk.ModifierType.CONTROL_MASK
and not self.props.selection_mode):
self._on_selection_mode_request()
diff --git a/gnomemusic/views/songsview.py b/gnomemusic/views/songsview.py
index 60b319fd..a207f486 100644
--- a/gnomemusic/views/songsview.py
+++ b/gnomemusic/views/songsview.py
@@ -214,7 +214,7 @@ class SongsView(BaseView):
:param Gdk.EventButton event: clicked event
"""
modifiers = Gtk.accelerator_get_default_mod_mask()
- if ((event.state & modifiers) == Gdk.ModifierType.CONTROL_MASK
+ if ((event.get_state() & modifiers) == Gdk.ModifierType.CONTROL_MASK
and not self.props.selection_mode):
self._on_selection_mode_request()
diff --git a/gnomemusic/widgets/albumcover.py b/gnomemusic/widgets/albumcover.py
index f6f4152c..5d7f2a17 100644
--- a/gnomemusic/widgets/albumcover.py
+++ b/gnomemusic/widgets/albumcover.py
@@ -107,7 +107,7 @@ class AlbumCover(Gtk.FlowBoxChild):
@log
def _on_album_event(self, evbox, event, data=None):
modifiers = Gtk.accelerator_get_default_mod_mask()
- if ((event.state & modifiers) == Gdk.ModifierType.CONTROL_MASK
+ if ((event.get_state() & modifiers) == Gdk.ModifierType.CONTROL_MASK
and not self.props.selection_mode):
self.props.selection_mode = True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]