mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 16:50:35 +01:00
Nice code.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1680 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
c91717e1bf
commit
35fba3778f
1 changed files with 18 additions and 15 deletions
|
|
@ -1167,7 +1167,7 @@ impl_export (NetworkManagerVpnUI *self, GSList *properties, GSList *routes, cons
|
|||
/*printf ("User selected '%s'\n", path);*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
|
||||
if (path != NULL) {
|
||||
|
|
@ -1185,23 +1185,26 @@ impl_export (NetworkManagerVpnUI *self, GSList *properties, GSList *routes, cons
|
|||
_("Do you want to replace it with the one you are saving?"));
|
||||
response = gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy (dialog);
|
||||
if (response == GTK_RESPONSE_OK)
|
||||
if (!export_to_file (impl, path, properties, routes, connection_name)) {
|
||||
GtkWidget *dialog;
|
||||
if (response != GTK_RESPONSE_OK)
|
||||
goto out;
|
||||
}
|
||||
|
||||
dialog = gtk_message_dialog_new (NULL,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_WARNING,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
_("Failed to export configuration"));
|
||||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
|
||||
_("Failed to save file %s"), path);
|
||||
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
if (!export_to_file (impl, path, properties, routes, connection_name)) {
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (NULL,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_WARNING,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
_("Failed to export configuration"));
|
||||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
|
||||
_("Failed to save file %s"), path);
|
||||
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
g_free (path);
|
||||
|
||||
return TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue