aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/mail-account-gui.c26
2 files changed, 27 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index fc6eea85b9..e9e5a842b2 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2001-09-11 Larry Ewing <lewing@ximian.com>
+
+ * mail-account-gui.c (menu_file_save_cb): call menu_file_save_error
+ when there is an exception while saving.
+ (menu_file_save_error): pop up a dialog telling the user the file
+ has not been saved.
+
2001-09-10 <NotZed@Ximian.com>
* mail-local.c (mail_local_reconfigure_folder): Dynamically create
@@ -31,6 +38,7 @@
2001-09-10 Jeffrey Stedfast <fejj@ximian.com>
+>>>>>>> 1.1671
* mail-account-gui.c (mail_account_gui_new): Hide the S/MIME frame
if we don't support S/MIME.
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index c08538e55c..b65398731d 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -940,6 +940,15 @@ destroy_editor (ESignatureEditor *editor)
}
static void
+menu_file_save_error (BonoboUIComponent *uic, CORBA_Environment *ev) {
+ e_notice (GTK_WINDOW (uic), GNOME_MESSAGE_BOX_ERROR,
+ _("Could not save signature file."));
+
+ g_warning ("Exception while saving signature (%s)",
+ bonobo_exception_get_text (ev));
+}
+
+static void
menu_file_save_cb (BonoboUIComponent *uic,
void *data,
const char *path)
@@ -955,8 +964,10 @@ menu_file_save_cb (BonoboUIComponent *uic,
pfile_iface = bonobo_object_client_query_interface (bonobo_widget_get_server (BONOBO_WIDGET (editor->control)),
"IDL:Bonobo/PersistFile:1.0", NULL);
Bonobo_PersistFile_save (pfile_iface, editor->filename, &ev);
+
if (ev._major != CORBA_NO_EXCEPTION)
- g_warning ("Cannot save.");
+ menu_file_save_error (uic, &ev);
+
CORBA_exception_free (&ev);
} else {
BonoboStream *stream;
@@ -967,16 +978,17 @@ menu_file_save_cb (BonoboUIComponent *uic,
stream = bonobo_stream_open (BONOBO_IO_DRIVER_FS, editor->filename,
Bonobo_Storage_WRITE | Bonobo_Storage_CREATE, 0);
+
pstream_iface = bonobo_object_client_query_interface
(bonobo_widget_get_server (BONOBO_WIDGET (editor->control)),
"IDL:Bonobo/PersistStream:1.0", NULL);
- Bonobo_PersistStream_save (pstream_iface, (Bonobo_Stream) bonobo_object_corba_objref (BONOBO_OBJECT (stream)),
+
+ Bonobo_PersistStream_save (pstream_iface,
+ (Bonobo_Stream) bonobo_object_corba_objref (BONOBO_OBJECT (stream)),
"text/plain", &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception while saving signature (%s)",
- bonobo_exception_get_text (&ev));
- return;
- }
+
+ if (ev._major != CORBA_NO_EXCEPTION)
+ menu_file_save_error (uic, &ev);
CORBA_exception_free (&ev);
bonobo_object_unref (BONOBO_OBJECT (stream));