shell: start in the right size

When starting up with a single panel, we don't want to show the full-height
window initially.
This commit is contained in:
Matthias Clasen 2010-11-19 15:08:23 -05:00
parent 1865429130
commit d7b2e3144d
2 changed files with 9 additions and 3 deletions

View file

@ -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

View file

@ -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)));
}