diff options
-rw-r--r-- | composer/e-msg-composer.c | 23 | ||||
-rw-r--r-- | composer/e-msg-composer.h | 2 |
2 files changed, 18 insertions, 7 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 5f7d692578..d13e34fc3a 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1286,7 +1286,7 @@ do_exit (EMsgComposer *composer) GtkWidget *dialog; gint button; - if (TRUE || e_msg_composer_is_dirty (composer)) { + if (e_msg_composer_is_dirty (composer)) { dialog = gnome_message_box_new (_("This message has not been sent.\n\nDo you wish to save your changes?"), GNOME_MESSAGE_BOX_QUESTION, GNOME_STOCK_BUTTON_YES, /* Save */ @@ -3952,12 +3952,13 @@ gboolean e_msg_composer_is_dirty (EMsgComposer *composer) { CORBA_Environment ev; - gboolean dirty = composer->has_changed; - CORBA_exception_init (&ev); - - dirty = dirty || Bonobo_PersistStream_isDirty (composer->persist_stream_interface, &ev); + gboolean rv; - return dirty; + CORBA_exception_init (&ev); + rv = composer->has_changed || GNOME_GtkHTML_Editor_Engine_isDirty (composer->editor_engine, &ev); + CORBA_exception_free (&ev); + + return rv; } void @@ -4025,3 +4026,13 @@ e_msg_composer_ignore (EMsgComposer *composer, const gchar *str) } CORBA_exception_free (&ev); } + +void +e_msg_composer_drop_editor_undo (EMsgComposer *composer) +{ + CORBA_Environment ev; + + CORBA_exception_init (&ev); + GNOME_GtkHTML_Editor_Engine_dropUndo (composer->editor_engine, &ev); + CORBA_exception_free (&ev); +} diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h index 4e8cfd1288..cb679107b8 100644 --- a/composer/e-msg-composer.h +++ b/composer/e-msg-composer.h @@ -187,7 +187,7 @@ void e_msg_composer_add_message_attachments (EMsgCo gboolean just_inlines); void e_msg_composer_ignore (EMsgComposer *composer, const gchar *str); - +void e_msg_composer_drop_editor_undo (EMsgComposer *composer); #ifdef __cplusplus } #endif /* __cplusplus */ |