[gnome-music/wip/mschraal/gtk4: 75/102] playlistswidget: Disable ctrlr
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4: 75/102] playlistswidget: Disable ctrlr
- Date: Mon, 8 Jun 2020 23:44:23 +0000 (UTC)
commit b47e03c5079fbef8ee7e4ffe18b640bc89420936
Author: Marinus Schraal <mschraal gnome org>
Date: Wed Apr 29 01:48:18 2020 +0200
playlistswidget: Disable ctrlr
data/ui/PlaylistsWidget.ui | 2 ++
gnomemusic/widgets/playlistswidget.py | 29 +++++++++++++++--------------
2 files changed, 17 insertions(+), 14 deletions(-)
---
diff --git a/data/ui/PlaylistsWidget.ui b/data/ui/PlaylistsWidget.ui
index 629f35ca..6357ea82 100644
--- a/data/ui/PlaylistsWidget.ui
+++ b/data/ui/PlaylistsWidget.ui
@@ -29,10 +29,12 @@
</object>
</child>
</template>
+<!--
<object class="GtkGestureMultiPress" id="_songs_list_ctrlr">
<property name="widget">_songs_list</property>
<property name="propagation-phase">capture</property>
<property name="button">3</property>
<signal name="pressed" handler="_songs_list_right_click" swapped="no"/>
</object>
+-->
</interface>
diff --git a/gnomemusic/widgets/playlistswidget.py b/gnomemusic/widgets/playlistswidget.py
index 084b42e7..cfdc0d40 100644
--- a/gnomemusic/widgets/playlistswidget.py
+++ b/gnomemusic/widgets/playlistswidget.py
@@ -22,7 +22,8 @@
# code, but you are not obligated to do so. If you do not wish to do so,
# delete this exception statement from your version.
-from gi.repository import Gdk, GObject, Gtk
+# from gi.repository import Gdk, GObject, Gtk
+from gi.repository import GObject, Gtk
from gnomemusic.player import PlayerPlaylist
from gnomemusic.widgets.notificationspopup import PlaylistNotification
@@ -40,7 +41,7 @@ class PlaylistsWidget(Gtk.Box):
_pl_ctrls = Gtk.Template.Child()
_songs_list = Gtk.Template.Child()
- _songs_list_ctrlr = Gtk.Template.Child()
+ # _songs_list_ctrlr = Gtk.Template.Child()
def __init__(self, application, playlists_view):
"""Initialize the PlaylistsWidget.
@@ -133,20 +134,20 @@ class PlaylistsWidget(Gtk.Box):
and current_playlist.props.is_smart):
current_playlist.update()
- @Gtk.Template.Callback()
- def _songs_list_right_click(self, gesture, n_press, x, y):
- requested_row = self._songs_list.get_row_at_y(y)
- self._songs_list.select_row(requested_row)
+ # @Gtk.Template.Callback()
+ # def _songs_list_right_click(self, gesture, n_press, x, y):
+ # requested_row = self._songs_list.get_row_at_y(y)
+ # self._songs_list.select_row(requested_row)
- _, y0 = requested_row.translate_coordinates(self._songs_list, 0, 0)
- row_height = requested_row.get_allocated_height()
- rect = Gdk.Rectangle()
- rect.x = x
- rect.y = y0 + 0.5 * row_height
+ # _, y0 = requested_row.translate_coordinates(self._songs_list, 0, 0)
+ # row_height = requested_row.get_allocated_height()
+ # rect = Gdk.Rectangle()
+ # rect.x = x
+ # rect.y = y0 + 0.5 * row_height
- self._song_popover.props.relative_to = self._songs_list
- self._song_popover.props.pointing_to = rect
- self._song_popover.popup()
+ # self._song_popover.props.relative_to = self._songs_list
+ # self._song_popover.props.pointing_to = rect
+ # self._song_popover.popup()
def _play_song(self, menuitem, data=None):
selected_row = self._songs_list.get_selected_row()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]