[gnome-builder] view-stack: keep views list visible, but insensitive
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] view-stack: keep views list visible, but insensitive
- Date: Wed, 16 Sep 2015 06:21:13 +0000 (UTC)
commit c57ba5ee6fcbc169b6ab1a6387304032a9c5e0c4
Author: Christian Hergert <christian hergert me>
Date: Tue Sep 15 23:21:02 2015 -0700
view-stack: keep views list visible, but insensitive
When there are no views open, keep the view stack list visible, just
insensitive. This makes the open/close state much more predictable
looking.
data/ui/gb-view-stack.ui | 3 ++-
src/views/gb-view-stack.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/data/ui/gb-view-stack.ui b/data/ui/gb-view-stack.ui
index 299c03f..37e0138 100644
--- a/data/ui/gb-view-stack.ui
+++ b/data/ui/gb-view-stack.ui
@@ -25,9 +25,10 @@
<property name="margin-top">3</property>
<child>
<object class="GtkMenuButton" id="views_button">
- <property name="visible">false</property>
+ <property name="visible">true</property>
<property name="focus-on-click">false</property>
<property name="popover">views_popover</property>
+ <property name="sensitive">false</property>
<style>
<class name="image-button"/>
<class name="flat"/>
diff --git a/src/views/gb-view-stack.c b/src/views/gb-view-stack.c
index 476790c..7637a78 100644
--- a/src/views/gb-view-stack.c
+++ b/src/views/gb-view-stack.c
@@ -161,7 +161,7 @@ gb_view_stack_add (GtkContainer *container,
gtk_widget_set_sensitive (GTK_WIDGET (self->close_button), TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (self->document_button), TRUE);
- gtk_widget_set_visible (GTK_WIDGET (self->views_button), TRUE);
+ gtk_widget_set_sensitive (GTK_WIDGET (self->views_button), TRUE);
self->focus_history = g_list_prepend (self->focus_history, child);
controls = gb_view_get_controls (GB_VIEW (child));
@@ -271,7 +271,7 @@ gb_view_stack_real_empty (GbViewStack *self)
gtk_widget_set_sensitive (GTK_WIDGET (self->close_button), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (self->document_button), FALSE);
gtk_widget_set_visible (GTK_WIDGET (self->modified_label), FALSE);
- gtk_widget_set_visible (GTK_WIDGET (self->views_button), FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (self->views_button), FALSE);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]