[gnome-builder] view-grid: don't leak new widget



commit ac8dde510879e45a40d1799f6e8eaf3449c3ae91
Author: Christian Hergert <christian hergert me>
Date:   Tue Jun 9 15:16:06 2015 -0700

    view-grid: don't leak new widget
    
    Not sure why this was ever here, probably so we could try to sink the
    new view ourselves.
    
    We should try to make the move cases unparent/reparent the existing view
    though. That will help in situations where an underlying document isn't
    really possible. (Terminal for example).

 src/views/gb-view-grid.c |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)
---
diff --git a/src/views/gb-view-grid.c b/src/views/gb-view-grid.c
index 7e7dab2..b9ac772 100644
--- a/src/views/gb-view-grid.c
+++ b/src/views/gb-view-grid.c
@@ -267,7 +267,6 @@ gb_view_grid_stack_split (GbViewGrid      *self,
 {
   GbDocument *document;
   GtkWidget *target;
-  GtkWidget *new_view;
 
   g_assert (GB_IS_VIEW (view));
   g_assert (GB_IS_VIEW_GRID (self));
@@ -283,9 +282,6 @@ gb_view_grid_stack_split (GbViewGrid      *self,
       target = gb_view_grid_get_stack_before (self, stack);
       if (target == NULL)
         target = gb_view_grid_add_stack_before (self, stack);
-      new_view = gb_document_create_view (document);
-      if (new_view == NULL)
-        return;
       gb_view_stack_focus_document (GB_VIEW_STACK (target), document);
       break;
 
@@ -293,9 +289,6 @@ gb_view_grid_stack_split (GbViewGrid      *self,
       target = gb_view_grid_get_stack_before (self, stack);
       if (target == NULL)
         target = gb_view_grid_add_stack_before (self, stack);
-      new_view = gb_document_create_view (document);
-      if (new_view == NULL)
-        return;
       gb_view_stack_remove (stack, view);
       gb_view_stack_focus_document (GB_VIEW_STACK (target), document);
       break;
@@ -304,9 +297,6 @@ gb_view_grid_stack_split (GbViewGrid      *self,
       target = gb_view_grid_get_stack_after (self, stack);
       if (target == NULL)
         target = gb_view_grid_add_stack_after (self, stack);
-      new_view = gb_document_create_view (document);
-      if (new_view == NULL)
-        return;
       gb_view_stack_focus_document (GB_VIEW_STACK (target), document);
       break;
 
@@ -314,9 +304,6 @@ gb_view_grid_stack_split (GbViewGrid      *self,
       target = gb_view_grid_get_stack_after (self, stack);
       if (target == NULL)
         target = gb_view_grid_add_stack_after (self, stack);
-      new_view = gb_document_create_view (document);
-      if (new_view == NULL)
-        return;
       gb_view_stack_remove (stack, view);
       gb_view_stack_focus_document (GB_VIEW_STACK (target), document);
       break;


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