[gnome-builder/editor-layout] stack: hide header box when no tabs are visible
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/editor-layout] stack: hide header box when no tabs are visible
- Date: Mon, 1 Dec 2014 02:40:28 +0000 (UTC)
commit 02ed63ba493557b179b55ccafb8d955b790eabf5
Author: Christian Hergert <christian hergert me>
Date: Sun Nov 30 18:40:15 2014 -0800
stack: hide header box when no tabs are visible
src/resources/ui/gb-tab-stack.ui | 4 ++--
src/tabs/gb-tab-stack.c | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/resources/ui/gb-tab-stack.ui b/src/resources/ui/gb-tab-stack.ui
index 37ecb7a..39a0dae 100644
--- a/src/resources/ui/gb-tab-stack.ui
+++ b/src/resources/ui/gb-tab-stack.ui
@@ -4,8 +4,8 @@
<template class="GbTabStack" parent="GtkBox">
<property name="orientation">vertical</property>
<child>
- <object class="GtkBox">
- <property name="visible">true</property>
+ <object class="GtkBox" id="header_box">
+ <property name="visible">false</property>
<property name="orientation">horizontal</property>
<style>
<class name="linked"/>
diff --git a/src/tabs/gb-tab-stack.c b/src/tabs/gb-tab-stack.c
index dbb7aeb..aafae22 100644
--- a/src/tabs/gb-tab-stack.c
+++ b/src/tabs/gb-tab-stack.c
@@ -29,6 +29,7 @@ struct _GbTabStackPrivate
GtkButton *close;
GtkComboBox *combo;
GtkStack *controls;
+ GtkBox *header_box;
GtkMenuButton *stack_menu;
GtkStack *stack;
GtkListStore *store;
@@ -399,6 +400,8 @@ gb_tab_stack_add_tab (GbTabStack *stack,
stack,
G_CONNECT_SWAPPED);
+ gtk_widget_show (GTK_WIDGET (stack->priv->header_box));
+
g_signal_emit (stack, gSignals [CHANGED], 0);
}
@@ -507,6 +510,7 @@ gb_tab_stack_class_init (GbTabStackClass *klass)
gtk_widget_class_bind_template_child_internal_private (widget_class, GbTabStack, controls);
gtk_widget_class_bind_template_child_private (widget_class, GbTabStack, close);
gtk_widget_class_bind_template_child_private (widget_class, GbTabStack, combo);
+ gtk_widget_class_bind_template_child_private (widget_class, GbTabStack, header_box);
gtk_widget_class_bind_template_child_private (widget_class, GbTabStack, stack);
gtk_widget_class_bind_template_child_private (widget_class, GbTabStack, stack_menu);
gtk_widget_class_bind_template_child_private (widget_class, GbTabStack, store);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]