[gnome-builder] layout: hide tab_strip from transient panel



commit 6d6550c437ba83af843e2a9b9b741361e0929ce0
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jul 14 19:48:03 2017 -0700

    layout: hide tab_strip from transient panel
    
    We don't need this because we only show a contextual panel, and
    a single one at that.

 libide/layout/ide-layout-transient-sidebar.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/libide/layout/ide-layout-transient-sidebar.c b/libide/layout/ide-layout-transient-sidebar.c
index 5fad0c5..0646f57 100644
--- a/libide/layout/ide-layout-transient-sidebar.c
+++ b/libide/layout/ide-layout-transient-sidebar.c
@@ -153,6 +153,8 @@ static void
 ide_layout_transient_sidebar_init (IdeLayoutTransientSidebar *self)
 {
   IdeLayoutTransientSidebarPrivate *priv = ide_layout_transient_sidebar_get_instance_private (self);
+  GtkWidget *paned;
+  GtkWidget *stack;
 
   g_weak_ref_init (&priv->view_ref, NULL);
 
@@ -164,6 +166,18 @@ ide_layout_transient_sidebar_init (IdeLayoutTransientSidebar *self)
                                  self, NULL,
                                  G_CONNECT_AFTER | G_CONNECT_SWAPPED);
 
+  if (NULL != (paned = gtk_bin_get_child (GTK_BIN (self))) &&
+      DZL_IS_MULTI_PANED (paned) &&
+      NULL != (stack = dzl_multi_paned_get_nth_child (DZL_MULTI_PANED (paned), 0)) &&
+      DZL_IS_DOCK_STACK (stack))
+    {
+      GtkWidget *tab_strip;
+
+      /* We want to hide the tab strip in the stack for the transient bar */
+      tab_strip = dzl_gtk_widget_find_child_typed (stack, DZL_TYPE_TAB_STRIP);
+      if (tab_strip != NULL)
+        gtk_widget_hide (tab_strip);
+    }
 }
 
 /**


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