diff options
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; } } |