[gnome-builder] color-picker: handle non-IdeEditorView views



commit c7c987ce03a758a1a2e2fac562078899aab8ff55
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jul 18 00:03:08 2016 -0700

    color-picker: handle non-IdeEditorView views
    
    Views can be of various types, so we need to be a bit more liberal in
    assertions.

 .../color-picker/gb-color-picker-workbench-addin.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/plugins/color-picker/gb-color-picker-workbench-addin.c 
b/plugins/color-picker/gb-color-picker-workbench-addin.c
index de07518..dcb2260 100644
--- a/plugins/color-picker/gb-color-picker-workbench-addin.c
+++ b/plugins/color-picker/gb-color-picker-workbench-addin.c
@@ -430,20 +430,20 @@ static void
 view_removed_cb (GbColorPickerWorkbenchAddin *self,
                  GtkWidget                   *widget)
 {
-  IdeEditorView *view = (IdeEditorView *)widget;
+  IdeLayoutView *view = (IdeLayoutView *)widget;
   ViewState *view_state;
 
   g_assert (GB_IS_COLOR_PICKER_WORKBENCH_ADDIN (self));
-  g_assert (IDE_IS_EDITOR_VIEW (view));
+  g_assert (IDE_IS_LAYOUT_VIEW (view));
 
-  if (!IDE_IS_EDITOR_VIEW (widget))
+  if (!IDE_IS_EDITOR_VIEW (view))
     return;
 
   view_state = g_hash_table_lookup (self->views, view);
   if (view != NULL && view_state->state)
     {
-      view_clear (self, view, FALSE);
-      view_remove_dock (self, view);
+      view_clear (self, IDE_EDITOR_VIEW (view), FALSE);
+      view_remove_dock (self, IDE_EDITOR_VIEW (view));
     }
 
   g_hash_table_remove (self->views, view);


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