[gnome-builder] history: leave controls visible but insenstive



commit aa40b84d522e6ff7c7153e481aea550a5da087e4
Author: Christian Hergert <chergert redhat com>
Date:   Sun Dec 17 21:38:25 2017 -0800

    history: leave controls visible but insenstive
    
    This keeps the buttons visible so they don't pop in and out of view. It
    also keeps the title more centered.
    
    Later on, we can add a navigatable interface to make this more generic.

 .../history/gbp-history-layout-stack-addin.c       |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/history/gbp-history-layout-stack-addin.c 
b/src/plugins/history/gbp-history-layout-stack-addin.c
index 5722352..e577990 100644
--- a/src/plugins/history/gbp-history-layout-stack-addin.c
+++ b/src/plugins/history/gbp-history-layout-stack-addin.c
@@ -236,6 +236,8 @@ gbp_history_layout_stack_addin_load (IdeLayoutStackAddin *addin,
 
   self->controls = g_object_new (GTK_TYPE_BOX,
                                  "orientation", GTK_ORIENTATION_HORIZONTAL,
+                                 "sensitive", FALSE,
+                                 "visible", TRUE,
                                  NULL);
   g_signal_connect (self->controls,
                     "destroy",
@@ -310,7 +312,7 @@ gbp_history_layout_stack_addin_set_view (IdeLayoutStackAddin *addin,
   g_assert (GBP_IS_HISTORY_LAYOUT_STACK_ADDIN (self));
   g_assert (!view || IDE_IS_LAYOUT_VIEW (view));
 
-  gtk_widget_set_visible (GTK_WIDGET (self->controls), IDE_IS_EDITOR_VIEW (view));
+  gtk_widget_set_sensitive (GTK_WIDGET (self->controls), IDE_IS_EDITOR_VIEW (view));
 }
 
 static void


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