network: Show spinner instead of delaying dialog
It's better to respond to the user immediately rather than delay the window opening.
This commit is contained in:
parent
a1e26cdac1
commit
8ded3d956f
7 changed files with 12 additions and 20 deletions
|
@ -74,7 +74,6 @@ struct _NetConnectionEditor
|
|||
NMClientPermissionResult can_modify;
|
||||
|
||||
gboolean title_set;
|
||||
gboolean show_when_initialized;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (NetConnectionEditor, net_connection_editor, GTK_TYPE_DIALOG)
|
||||
|
@ -396,11 +395,9 @@ recheck_initialization (NetConnectionEditor *self)
|
|||
if (!editor_is_initialized (self))
|
||||
return;
|
||||
|
||||
gtk_stack_set_visible_child (self->toplevel_stack, GTK_WIDGET (self->notebook));
|
||||
gtk_notebook_set_current_page (self->notebook, 0);
|
||||
|
||||
if (self->show_when_initialized)
|
||||
gtk_window_present (GTK_WINDOW (self));
|
||||
|
||||
g_idle_add (idle_validate, self);
|
||||
}
|
||||
|
||||
|
@ -814,16 +811,6 @@ net_connection_editor_new (NMConnection *connection,
|
|||
return self;
|
||||
}
|
||||
|
||||
void
|
||||
net_connection_editor_run (NetConnectionEditor *self)
|
||||
{
|
||||
if (!editor_is_initialized (self)) {
|
||||
self->show_when_initialized = TRUE;
|
||||
return;
|
||||
}
|
||||
gtk_window_present (GTK_WINDOW (self));
|
||||
}
|
||||
|
||||
static void
|
||||
forgotten_cb (GObject *source_object,
|
||||
GAsyncResult *res,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue