[gnome-music/wip/mschraal/gtk4-v2: 22/38] playlistswidget: Fix popover positioning (?)
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4-v2: 22/38] playlistswidget: Fix popover positioning (?)
- Date: Tue, 11 May 2021 13:48:16 +0000 (UTC)
commit 7b16e9cd90b311dee3f9ee1b63b9a980e65145d0
Author: Marinus Schraal <mschraal gnome org>
Date: Mon Apr 12 00:20:41 2021 +0200
playlistswidget: Fix popover positioning (?)
gnomemusic/widgets/playlistcontextmenu.py | 4 +---
gnomemusic/widgets/playlistswidget.py | 3 +--
2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gnomemusic/widgets/playlistcontextmenu.py b/gnomemusic/widgets/playlistcontextmenu.py
index 27efbe2e5..c52b1603c 100644
--- a/gnomemusic/widgets/playlistcontextmenu.py
+++ b/gnomemusic/widgets/playlistcontextmenu.py
@@ -32,17 +32,15 @@ class PlaylistContextMenu(Gtk.Popover):
_song_menu = Gtk.Template.Child()
- def __init__(self, application, view):
+ def __init__(self, application):
"""Initialize
:param GtkApplication application: The Application object
- :param GtkListBox view: The view the popup is relative to
"""
super().__init__()
window = application.props.window
- self.props.relative_to = view
self.bind_model(self._song_menu, None)
add_song = Gio.SimpleAction.new("add_song_to_playlist", None)
diff --git a/gnomemusic/widgets/playlistswidget.py b/gnomemusic/widgets/playlistswidget.py
index 5db216071..25eab8814 100644
--- a/gnomemusic/widgets/playlistswidget.py
+++ b/gnomemusic/widgets/playlistswidget.py
@@ -69,7 +69,7 @@ class PlaylistsWidget(Gtk.Box):
self._pl_ctrls.props.application = application
- self._song_popover = PlaylistContextMenu(application, self._songs_list)
+ self._song_popover = PlaylistContextMenu(application)
play_song = self._window.lookup_action("play_song")
play_song.connect("activate", self._play_song)
@@ -152,7 +152,6 @@ class PlaylistsWidget(Gtk.Box):
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()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]