[gnome-builder] workbench: hide switcher until we leave "early state"
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] workbench: hide switcher until we leave "early state"
- Date: Tue, 28 Jun 2016 00:02:41 +0000 (UTC)
commit fb7720be612188d79b7d646d520a653e7692bb51
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 20 15:14:25 2016 -0700
workbench: hide switcher until we leave "early state"
libide/workbench/ide-workbench-private.h | 2 ++
libide/workbench/ide-workbench.c | 4 ++++
libide/workbench/ide-workbench.ui | 4 ++--
3 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/libide/workbench/ide-workbench-private.h b/libide/workbench/ide-workbench-private.h
index b106405..4b613bf 100644
--- a/libide/workbench/ide-workbench-private.h
+++ b/libide/workbench/ide-workbench-private.h
@@ -22,6 +22,7 @@
#include <libpeas/peas.h>
#include "workbench/ide-perspective.h"
+#include "workbench/ide-perspective-menu-button.h"
#include "workbench/ide-workbench.h"
#include "workbench/ide-workbench-header-bar.h"
@@ -43,6 +44,7 @@ struct _IdeWorkbench
GListStore *perspectives;
IdeWorkbenchHeaderBar *header_bar;
+ IdePerspectiveMenuButton *perspective_menu_button;
GtkStack *perspectives_stack;
GtkSizeGroup *header_size_group;
diff --git a/libide/workbench/ide-workbench.c b/libide/workbench/ide-workbench.c
index f18f839..551ca2f 100644
--- a/libide/workbench/ide-workbench.c
+++ b/libide/workbench/ide-workbench.c
@@ -367,6 +367,7 @@ ide_workbench_class_init (IdeWorkbenchClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/ui/ide-workbench.ui");
gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, header_bar);
gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, header_size_group);
+ gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, perspective_menu_button);
gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, perspectives_stack);
}
@@ -763,6 +764,9 @@ ide_workbench_set_visible_perspective (IdeWorkbench *self,
/* TODO: Possibly remove some perspectives */
+ gtk_widget_set_visible (GTK_WIDGET (self->perspective_menu_button),
+ !ide_perspective_is_early (perspective));
+
if (self->addins != NULL)
peas_extension_set_foreach (self->addins,
ide_workbench_notify_perspective_set,
diff --git a/libide/workbench/ide-workbench.ui b/libide/workbench/ide-workbench.ui
index 2c5454a..2596b96 100644
--- a/libide/workbench/ide-workbench.ui
+++ b/libide/workbench/ide-workbench.ui
@@ -8,9 +8,9 @@
<child internal-child="left">
<object class="EggPriorityBox">
<child>
- <object class="IdePerspectiveMenuButton">
+ <object class="IdePerspectiveMenuButton" id="perspective_menu_button">
<property name="stack">perspectives_stack</property>
- <property name="visible">true</property>
+ <property name="visible">false</property>
</object>
<packing>
<property name="priority">-100000</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]