[gnome-music/wip/jfelder/remove-playlist-right-click: 1/2] playlistswidget: Remove context menu
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/remove-playlist-right-click: 1/2] playlistswidget: Remove context menu
- Date: Wed, 2 Feb 2022 17:15:23 +0000 (UTC)
commit ed9ef74c75c688df4735fdb10214bec123721ae6
Author: Jean Felder <jfelder src gnome org>
Date: Wed Feb 2 14:22:30 2022 +0100
playlistswidget: Remove context menu
A menu button has been providing the same menu since the last design
iteration. It is not needed anymore.
data/ui/PlaylistsWidget.ui | 6 ------
gnomemusic/widgets/playlistswidget.py | 20 +-------------------
2 files changed, 1 insertion(+), 25 deletions(-)
---
diff --git a/data/ui/PlaylistsWidget.ui b/data/ui/PlaylistsWidget.ui
index 026dc4015..721e89b55 100644
--- a/data/ui/PlaylistsWidget.ui
+++ b/data/ui/PlaylistsWidget.ui
@@ -38,10 +38,4 @@
</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 930ec0c90..2e4748d47 100644
--- a/gnomemusic/widgets/playlistswidget.py
+++ b/gnomemusic/widgets/playlistswidget.py
@@ -25,7 +25,7 @@
from __future__ import annotations
import typing
-from gi.repository import Gdk, GObject, Gtk
+from gi.repository import GObject, Gtk
from gnomemusic.widgets.playlistcontrols import PlaylistControls # noqa: F401
from gnomemusic.widgets.songwidget import SongWidget
@@ -45,7 +45,6 @@ class PlaylistsWidget(Gtk.Box):
_pl_ctrls = Gtk.Template.Child()
_songs_list = Gtk.Template.Child()
- _songs_list_ctrlr = Gtk.Template.Child()
def __init__(
self, application: Application,
@@ -128,23 +127,6 @@ 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):
- song_widget = self._songs_list.get_row_at_y(y)
-
- _, y0 = song_widget.translate_coordinates(self._songs_list, 0, 0)
- row_height = song_widget.get_allocated_height()
- rect = Gdk.Rectangle()
- rect.x = x
- rect.y = y0 + 0.5 * row_height
-
- current_playlist = self._playlists_view.props.current_playlist
- song_context_menu = SongWidgetMenu(
- self._application, song_widget, current_playlist)
- song_context_menu.props.relative_to = self._songs_list
- song_context_menu.props.pointing_to = rect
- song_context_menu.popup()
-
def _on_play_playlist(self, menuitem, data=None):
self._play()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]