[gnome-control-center] region: Set a sensible height on the input chooser



commit 6434213a8970360624dcd82a2b40b5c55105fd5a
Author: Rui Matos <tiagomatos gmail com>
Date:   Wed Aug 12 17:38:19 2015 +0200

    region: Set a sensible height on the input chooser
    
    On systems that have only a few locales installed we might end up
    starting with an awkwardly small height. To avoid that we can set our
    initial height to be the same as the main window.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753537

 panels/region/cc-input-chooser.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/panels/region/cc-input-chooser.c b/panels/region/cc-input-chooser.c
index 63945c1..2a62b99 100644
--- a/panels/region/cc-input-chooser.c
+++ b/panels/region/cc-input-chooser.c
@@ -1059,7 +1059,7 @@ cc_input_chooser_new (GtkWindow    *main_window,
   GtkBuilder *builder;
   GtkWidget *chooser;
   CcInputChooserPrivate *priv;
-  gint width;
+  gint width, height;
   GError *error = NULL;
 
   builder = gtk_builder_new ();
@@ -1105,9 +1105,9 @@ cc_input_chooser_new (GtkWindow    *main_window,
 #endif  /* HAVE_IBUS */
   show_locale_rows (chooser);
 
-  /* Try to come up with a sensible width */
-  gtk_window_get_size (main_window, &width, NULL);
-  gtk_widget_set_size_request (chooser, width * MAIN_WINDOW_WIDTH_RATIO, -1);
+  /* Try to come up with a sensible size */
+  gtk_window_get_size (main_window, &width, &height);
+  gtk_widget_set_size_request (chooser, width * MAIN_WINDOW_WIDTH_RATIO, height);
   gtk_window_set_resizable (GTK_WINDOW (chooser), TRUE);
 
   gtk_window_set_transient_for (GTK_WINDOW (chooser), main_window);


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