diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-08-14 04:57:04 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-08-14 04:57:04 +0800 |
commit | 953f044bace474c003edc8db63d0dbd3386a9bba (patch) | |
tree | e1e93a819a95af0c46f7df9b207f26d68cab3042 /composer | |
parent | 818312e89242a30a8b85796f4c6355bff7177ca3 (diff) | |
download | gsoc2013-evolution-953f044bace474c003edc8db63d0dbd3386a9bba.tar.gz gsoc2013-evolution-953f044bace474c003edc8db63d0dbd3386a9bba.tar.zst gsoc2013-evolution-953f044bace474c003edc8db63d0dbd3386a9bba.zip |
Make the warning dialog display the message subject so that it is more
2002-08-13 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (do_exit): Make the warning dialog display the
message subject so that it is more clear which composer the dialog
is referring to. Fixes bug #25467.
svn path=/trunk/; revision=17772
Diffstat (limited to 'composer')
-rw-r--r-- | composer/ChangeLog | 6 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 34 |
2 files changed, 28 insertions, 12 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 930dc464cf..17b9dd2636 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,9 @@ +2002-08-13 Jeffrey Stedfast <fejj@ximian.com> + + * e-msg-composer.c (do_exit): Make the warning dialog display the + message subject so that it is more clear which composer the dialog + is referring to. Fixes bug #25467. + 2002-08-12 Jeffrey Stedfast <fejj@ximian.com> * e-msg-composer-select-file.c (create_file_selection): Set the diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index c5e7fb6de6..2a6180c21e 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -937,9 +937,7 @@ encode_signature_name (const gchar *name) s ++; } *e = 0; - - printf ("name: '%s'\nencoded name: '%s'\n", name, ename); - + return ename; } @@ -1503,37 +1501,49 @@ menu_file_save_draft_cb (BonoboUIComponent *uic, void *data, const char *path) static void do_exit (EMsgComposer *composer) { + char *subject, *subject_utf8, *label; GtkWidget *dialog; - gint button; + int button; - if (! e_msg_composer_is_dirty (composer)) { + if (!e_msg_composer_is_dirty (composer)) { gtk_widget_destroy (GTK_WIDGET (composer)); return; } - + gdk_window_raise (GTK_WIDGET (composer)->window); - - dialog = gnome_message_box_new (_("This message has not been sent.\n\nDo you wish to save your changes?"), - GNOME_MESSAGE_BOX_QUESTION, + + subject_utf8 = e_msg_composer_hdrs_get_subject (E_MSG_COMPOSER_HDRS (composer->hdrs)); + subject = e_utf8_to_locale_string (subject_utf8); + g_free (subject_utf8); + + label = g_strdup_printf (("The message \"%s\" has not been sent.\n\nDo you wish to save your changes?"), subject); + g_free (subject); + + dialog = gnome_message_box_new (label, GNOME_MESSAGE_BOX_QUESTION, GNOME_STOCK_BUTTON_YES, /* Save */ GNOME_STOCK_BUTTON_NO, /* Don't save */ GNOME_STOCK_BUTTON_CANCEL, /* Cancel */ NULL); + g_free (label); + gtk_window_set_title (GTK_WINDOW (dialog), _("Warning: Modified Message")); gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (composer)); gnome_dialog_set_default (GNOME_DIALOG (dialog), 0); button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); switch (button) { - case 0: /* Save */ + case 0: + /* Save */ gtk_signal_emit (GTK_OBJECT (composer), signals[SAVE_DRAFT], TRUE); e_msg_composer_unset_changed (composer); break; - case 1: /* Don't save */ + case 1: + /* Don't save */ gtk_widget_destroy (GTK_WIDGET (composer)); break; - default: /* Cancel */ + default: + /* Cancel */ break; } } |