[gnome-control-center/gnome-3-20] mouse: Fix initial widget visibility



commit dbd5441c8d58d87763d23fe3f044a4e89d677f9b
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Apr 4 19:51:38 2016 +0200

    mouse: Fix initial widget visibility
    
    We're showing all widgets on panel start up instead of selectively
    hiding non-relevant widgets since the gtk_widget_show_all() on the
    stack after creating the panel widget and adding it to the stack
    overrides the visibility decisions done while constructing the panel.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=764257

 panels/mouse/cc-mouse-panel.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/panels/mouse/cc-mouse-panel.c b/panels/mouse/cc-mouse-panel.c
index f88b70f..c365480 100644
--- a/panels/mouse/cc-mouse-panel.c
+++ b/panels/mouse/cc-mouse-panel.c
@@ -102,14 +102,16 @@ cc_mouse_panel_init (CcMousePanel *self)
   g_resources_register (cc_mouse_get_resource ());
 
   prefs_widget = cc_mouse_properties_new ();
+  gtk_widget_show (prefs_widget);
   test_widget = cc_mouse_test_new ();
+  gtk_widget_show (test_widget);
 
   priv->stack = gtk_stack_new ();
+  gtk_widget_show (priv->stack);
   gtk_stack_add_named (GTK_STACK (priv->stack), prefs_widget, "prefs_widget");
   gtk_stack_add_named (GTK_STACK (priv->stack), test_widget, "test_widget");
 
   gtk_container_add (GTK_CONTAINER (self), priv->stack);
-  gtk_widget_show_all (priv->stack);
 }
 
 static void


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