[gnome-music/wip/jfelder/fix-critical-widget-realized: 12/13] artistsview: Do not emit row-activated signal on launch



commit 23c13e5434f3ad889834dd4dbfeecfcc15904751
Author: Jean Felder <jfelder src gnome org>
Date:   Wed Jan 8 17:54:40 2020 +0100

    artistsview: Do not emit row-activated signal on launch
    
    Emitting this signal before the ArtistsView is visible triggers some
    Gtk errors: `Gtk-CRITICAL gtk_widget_event: assertion
    'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed`
    
    Directly calling the associated callback fixes the issue.

 gnomemusic/views/artistsview.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnomemusic/views/artistsview.py b/gnomemusic/views/artistsview.py
index 0708251b..2d05bda0 100644
--- a/gnomemusic/views/artistsview.py
+++ b/gnomemusic/views/artistsview.py
@@ -126,7 +126,7 @@ class ArtistsView(BaseView):
             return
 
         self._sidebar.select_row(first_row)
-        first_row.emit("activate")
+        self._on_artist_activated(self._sidebar, first_row)
 
     @log
     def _setup_view(self):


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