aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorRadek Doulik <rodo@src.gnome.org>2002-02-12 05:48:51 +0800
committerRadek Doulik <rodo@src.gnome.org>2002-02-12 05:48:51 +0800
commit0b4478e5df5f78c8d18297774f3ed34c755df7fb (patch)
treeff1ed331ac3be341aba1222fe1b6dfdde48b8c7a /composer
parentb9c3cab040a8f77e9629eece7aa398f1364ec453 (diff)
downloadgsoc2013-evolution-0b4478e5df5f78c8d18297774f3ed34c755df7fb.tar.gz
gsoc2013-evolution-0b4478e5df5f78c8d18297774f3ed34c755df7fb.tar.zst
gsoc2013-evolution-0b4478e5df5f78c8d18297774f3ed34c755df7fb.zip
use editor is_dirty and reset undo
svn path=/trunk/; revision=15677
Diffstat (limited to 'composer')
-rw-r--r--composer/e-msg-composer.c23
-rw-r--r--composer/e-msg-composer.h2
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 */