[gnome-music/wip/mschraal/gtk4: 110/141] artistsview: Cleanup gesture & show_all



commit 0c7ab447ad8f7b68a688ce3b682c1e598c36116c
Author: Marinus Schraal <mschraal gnome org>
Date:   Thu Oct 31 15:35:37 2019 +0100

    artistsview: Cleanup gesture & show_all

 gnomemusic/views/artistsview.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/views/artistsview.py b/gnomemusic/views/artistsview.py
index a5454ae5..fa5687e1 100644
--- a/gnomemusic/views/artistsview.py
+++ b/gnomemusic/views/artistsview.py
@@ -69,7 +69,7 @@ class ArtistsView(BaseView):
         self._sidebar.props.selection_mode = Gtk.SelectionMode.SINGLE
         self._sidebar.connect('row-activated', self._on_artist_activated)
 
-        self._ctrl = Gtk.GestureMultiPress().new(self._sidebar)
+        self._ctrl = Gtk.GestureClick().new()
         self._ctrl.props.propagation_phase = Gtk.PropagationPhase.CAPTURE
         self._ctrl.props.button = Gdk.BUTTON_PRIMARY
         self._ctrl.connect("released", self._on_sidebar_clicked)
@@ -77,8 +77,6 @@ class ArtistsView(BaseView):
         self._loaded_artists = []
         self._loading_id = 0
 
-        self.show_all()
-
     def _create_widget(self, coreartist):
         row = ArtistTile(coreartist)
         row.props.text = coreartist.props.artist
@@ -123,7 +121,7 @@ class ArtistsView(BaseView):
 
     def _setup_view(self):
         self._view_container = Gtk.ScrolledWindow(hexpand=True, vexpand=True)
-        self._box.pack_start(self._view_container, True, True, 0)
+        self._box.add(self._view_container)
 
         self._view = Gtk.Stack(
             transition_type=Gtk.StackTransitionType.CROSSFADE,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]