2006-04-10 Robert Love <rml@novell.com>
* properties/nm-openvpn.c: Report error if writing out of exported configuration fails. The silent treatment might work for me and my wife, but not for failed I/O. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1679 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2006-04-10 Robert Love <rml@novell.com>
|
||||
|
||||
* properties/nm-openvpn.c: Report error if writing out of exported
|
||||
configuration fails. The silent treatment might work for me and my
|
||||
wife, but not for failed I/O.
|
||||
|
||||
2006-03-30 Robert Love <rml@novell.com>
|
||||
|
||||
Patch by Crispin Flowerday <gnome@flowerday.cx>:
|
||||
@@ -14,7 +20,6 @@
|
||||
* configure.in: Added pt_BR to ALL_LINGUAS.
|
||||
|
||||
2006-02-28 Ilkka Tuohela <hile@iki.fi>
|
||||
|
||||
* configure.in: Added fi to ALL_LINGUAS.
|
||||
|
||||
2006-02-16 Francisco Javier F. Serrador <serrador@cvs.gnome.org>
|
||||
|
@@ -1018,7 +1018,7 @@ impl_import_file (NetworkManagerVpnUI *self, const char *path)
|
||||
return import_from_file (impl, path);
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
export_to_file (NetworkManagerVpnUIImpl *impl, const char *path,
|
||||
GSList *properties, GSList *routes, const char *connection_name)
|
||||
{
|
||||
@@ -1037,6 +1037,7 @@ export_to_file (NetworkManagerVpnUIImpl *impl, const char *path,
|
||||
const char *remote_ip = NULL;
|
||||
const char *username = NULL;
|
||||
char *routes_str = NULL;
|
||||
gboolean ret;
|
||||
|
||||
/*printf ("in export_to_file; path='%s'\n", path);*/
|
||||
|
||||
@@ -1129,8 +1130,12 @@ export_to_file (NetworkManagerVpnUIImpl *impl, const char *path,
|
||||
/* X-NM-Routes */ routes_str != NULL ? routes_str : "");
|
||||
|
||||
fclose (f);
|
||||
ret = TRUE;
|
||||
}
|
||||
else
|
||||
ret = FALSE;
|
||||
g_free (routes_str);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -1181,7 +1186,19 @@ impl_export (NetworkManagerVpnUI *self, GSList *properties, GSList *routes, cons
|
||||
response = gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy (dialog);
|
||||
if (response == GTK_RESPONSE_OK)
|
||||
export_to_file (impl, path, properties, routes, connection_name);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user