[gnome-control-center] universal-access: Fix empty panel with newer GTK+



commit 82fce2e0ff11f494cc1e5815733d912c17fd8852
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Mar 1 16:17:08 2016 +0100

    universal-access: Fix empty panel with newer GTK+
    
    There's very few chances that the universal-access will fit in the
    minimum height of the shell for panels, so just nuke that.
    
    This also fixes the panel taking 1px in height until we switch away from
    it and back to it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761939

 panels/universal-access/cc-ua-panel.c |   19 +------------------
 1 files changed, 1 insertions(+), 18 deletions(-)
---
diff --git a/panels/universal-access/cc-ua-panel.c b/panels/universal-access/cc-ua-panel.c
index 71ce67b..0a138f9 100644
--- a/panels/universal-access/cc-ua-panel.c
+++ b/panels/universal-access/cc-ua-panel.c
@@ -853,22 +853,6 @@ cc_ua_panel_init_mouse (CcUaPanel *self)
 }
 
 static void
-on_content_size_changed (GtkWidget *content, GtkAllocation *allocation, GtkWidget *panel)
-{
-  if (allocation->height < SCROLL_HEIGHT)
-    {
-      gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (panel),
-                                      GTK_POLICY_NEVER, GTK_POLICY_NEVER);
-    }
-  else
-    {
-      gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (panel),
-                                      GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
-      gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (panel), SCROLL_HEIGHT);
-    }
-}
-
-static void
 cc_ua_panel_init (CcUaPanel *self)
 {
   CcUaPanelPrivate *priv;
@@ -905,8 +889,7 @@ cc_ua_panel_init (CcUaPanel *self)
   panel = WID ("universal_access_panel");
   content = WID ("universal_access_content");
 
-  g_signal_connect (content, "size-allocate",
-                    G_CALLBACK (on_content_size_changed), panel);
+  gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (panel), SCROLL_HEIGHT);
 
   priv->focus_adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (panel));
   gtk_container_set_focus_vadjustment (GTK_CONTAINER (content), priv->focus_adjustment);


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