[gnome-music/wip/mschraal/gtk4: 37/69] artistsview: Cleanup gesture & show_all



commit 1f99d16fa97c485f1aa006ce34f8d968a08de74d
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 4c761c35..2a1bcd07 100644
--- a/gnomemusic/views/artistsview.py
+++ b/gnomemusic/views/artistsview.py
@@ -76,7 +76,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)
@@ -84,8 +84,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
@@ -131,7 +129,7 @@ class ArtistsView(BaseView):
     @log
     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]