[gnome-music] songwidget: Use accessor for event button
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] songwidget: Use accessor for event button
- Date: Sat, 11 Aug 2018 22:51:56 +0000 (UTC)
commit f6f2c82ca034e067e99f66b95d59a142ae314b59
Author: Tyler Garcia <tyler tylergarcia net>
Date: Fri Aug 10 22:32:57 2018 -0700
songwidget: Use accessor for event button
Event fields are deprecated
Closes: #213
gnomemusic/widgets/songwidget.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/widgets/songwidget.py b/gnomemusic/widgets/songwidget.py
index 3dfa792c..c4b2e434 100644
--- a/gnomemusic/widgets/songwidget.py
+++ b/gnomemusic/widgets/songwidget.py
@@ -133,7 +133,8 @@ class SongWidget(Gtk.EventBox):
@Gtk.Template.Callback()
@log
def _on_star_toggle(self, widget, event):
- if event.button != Gdk.BUTTON_PRIMARY:
+ (_, button) = event.get_button()
+ if button != Gdk.BUTTON_PRIMARY:
return False
favorite = not self._star_image.favorite
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]