[gnome-builder] beautifier: don't assume initial views are editors



commit e9f2eb3685f494b20c3e95a748d178b147c0a713
Author: Christian Hergert <chergert redhat com>
Date:   Tue Oct 16 14:31:43 2018 -0700

    beautifier: don't assume initial views are editors
    
    This is necessary once we support restoring more types than just editor
    views.

 src/plugins/beautifier/gb-beautifier-editor-addin.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/beautifier/gb-beautifier-editor-addin.c 
b/src/plugins/beautifier/gb-beautifier-editor-addin.c
index a05b5d9ca..6cdb9b133 100644
--- a/src/plugins/beautifier/gb-beautifier-editor-addin.c
+++ b/src/plugins/beautifier/gb-beautifier-editor-addin.c
@@ -281,7 +281,9 @@ setup_view_cb (GtkWidget               *widget,
   GAction *action;
 
   g_assert (GB_IS_BEAUTIFIER_EDITOR_ADDIN (self));
-  g_assert (IDE_IS_EDITOR_VIEW (view));
+
+  if (!IDE_IS_EDITOR_VIEW (view))
+    return;
 
   actions = gtk_widget_get_action_group (GTK_WIDGET (view), "view");
   g_action_map_add_action_entries (G_ACTION_MAP (actions),


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