Commit 8cc5caf8 authored by Matthias Clasen's avatar Matthias Clasen Committed by Bastien Nocera
Browse files

network: Avoid jumping dialogs

The connection editor window is shown before all of its pages are
initialized, causing it to jump when it gets its final size. Avoid
that by not showing it before it is ready.

https://bugzilla.gnome.org/show_bug.cgi?id=693781
parent f01aff60
......@@ -392,6 +392,9 @@ recheck_initialization (NetConnectionEditor *editor)
notebook = GTK_NOTEBOOK (gtk_builder_get_object (editor->builder, "details_notebook"));
gtk_notebook_set_current_page (notebook, 0);
if (editor->show_when_initialized)
gtk_window_present (GTK_WINDOW (editor->window));
g_idle_add (idle_validate, editor);
}
......@@ -930,6 +933,10 @@ net_connection_editor_new (GtkWindow *parent_window,
void
net_connection_editor_present (NetConnectionEditor *editor)
{
if (!editor_is_initialized (editor)) {
editor->show_when_initialized = TRUE;
return;
}
gtk_window_present (GTK_WINDOW (editor->window));
}
......
......@@ -66,6 +66,7 @@ struct _NetConnectionEditor
NMClientPermissionResult can_modify;
gboolean title_set;
gboolean show_when_initialized;
};
struct _NetConnectionEditorClass
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment