[gnome-control-center] shell: start in the right size



commit d7b2e3144d488101c31ec8d6c83f05f7a77a8f46
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Nov 19 15:08:23 2010 -0500

    shell: start in the right size
    
    When starting up with a single panel, we don't want to show the full-height
    window initially.

 shell/control-center.c       |   10 ++++++++--
 shell/gnome-control-center.c |    2 +-
 2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/shell/control-center.c b/shell/control-center.c
index c3322c4..ae9a12b 100644
--- a/shell/control-center.c
+++ b/shell/control-center.c
@@ -38,6 +38,8 @@ application_command_line_cb (GApplication  *application,
   char **argv;
   int retval = 0;
 
+  gnome_control_center_show (shell, GTK_APPLICATION (application));
+
   argv = g_application_command_line_get_arguments (command_line, &argc);
   if (argc == 2)
     {
@@ -58,6 +60,9 @@ application_command_line_cb (GApplication  *application,
             }
         }
     }
+
+  gnome_control_center_present (shell);
+
   g_strfreev (argv);
   return retval;
 }
@@ -66,8 +71,9 @@ static void
 application_startup_cb (GApplication       *application,
 			GnomeControlCenter *shell)
 {
-  gnome_control_center_show (shell, GTK_APPLICATION (application));
-  gnome_control_center_present (shell);
+  /* nothing to do here, we don't want to show a window before
+   * we've looked at the commandline
+   */
 }
 
 int
diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
index 4ea6a78..0f79f52 100644
--- a/shell/gnome-control-center.c
+++ b/shell/gnome-control-center.c
@@ -1007,5 +1007,5 @@ gnome_control_center_show (GnomeControlCenter *center,
 			   GtkApplication     *app)
 {
   gtk_window_set_application (GTK_WINDOW (center->priv->window), app);
-  gtk_widget_show_all (center->priv->window);
+  gtk_widget_show_all (gtk_bin_get_child (GTK_BIN (center->priv->window)));
 }



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