aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRadek Doulik <rodo@ximian.com>2001-05-24 22:42:19 +0800
committerRadek Doulik <rodo@src.gnome.org>2001-05-24 22:42:19 +0800
commit6245eada6fbe3e60eb099af84fe456ba867c1699 (patch)
tree08a6e3dbb9d670e0a355dccac0d83205bc15b642
parent1a9409a95f0eb40e4ec32bcad84ec3c2df62f58a (diff)
downloadgsoc2013-evolution-6245eada6fbe3e60eb099af84fe456ba867c1699.tar
gsoc2013-evolution-6245eada6fbe3e60eb099af84fe456ba867c1699.tar.gz
gsoc2013-evolution-6245eada6fbe3e60eb099af84fe456ba867c1699.tar.bz2
gsoc2013-evolution-6245eada6fbe3e60eb099af84fe456ba867c1699.tar.lz
gsoc2013-evolution-6245eada6fbe3e60eb099af84fe456ba867c1699.tar.xz
gsoc2013-evolution-6245eada6fbe3e60eb099af84fe456ba867c1699.tar.zst
gsoc2013-evolution-6245eada6fbe3e60eb099af84fe456ba867c1699.zip
new callback
2001-05-24 Radek Doulik <rodo@ximian.com> * e-msg-composer.c (menu_edit_delete_all_cb): new callback svn path=/trunk/; revision=9959
-rw-r--r--composer/ChangeLog4
-rw-r--r--composer/e-msg-composer.c24
2 files changed, 28 insertions, 0 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 8962e0b678..6d7988ebcc 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,7 @@
+2001-05-24 Radek Doulik <rodo@ximian.com>
+
+ * e-msg-composer.c (menu_edit_delete_all_cb): new callback
+
2001-05-23 Radek Doulik <rodo@ximian.com>
* e-msg-composer.c (e_msg_composer_set_sig_file): set orig to 0
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 68746715d4..55e32e5325 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1051,6 +1051,28 @@ menu_file_add_attachment_cb (BonoboUIComponent *uic,
}
static void
+menu_edit_delete_all_cb (BonoboUIComponent *uic, void *data, const char *path)
+{
+ CORBA_Environment ev;
+ EMsgComposer *composer;
+
+ composer = E_MSG_COMPOSER (data);
+ CORBA_exception_init (&ev);
+
+ GNOME_GtkHTML_Editor_Engine_undo_begin (composer->editor_engine, "Delete all but signature", "Undelete all", &ev);
+ GNOME_GtkHTML_Editor_Engine_freeze (composer->editor_engine, &ev);
+ GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "select-all", &ev);
+ GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "delete", &ev);
+ GNOME_GtkHTML_Editor_Engine_setParagraphData (composer->editor_engine, "signature", "0", &ev);
+ e_msg_composer_set_sig_file (composer, composer->sig_file);
+ GNOME_GtkHTML_Editor_Engine_thaw (composer->editor_engine, &ev);
+ GNOME_GtkHTML_Editor_Engine_undo_end (composer->editor_engine, &ev);
+
+ CORBA_exception_free (&ev);
+ printf ("delete all\n");
+}
+
+static void
menu_view_attachments_activate_cb (BonoboUIComponent *component,
const char *path,
Bonobo_UIComponent_EventType type,
@@ -1372,6 +1394,8 @@ static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("FileSend", menu_file_send_cb),
BONOBO_UI_VERB ("FileSendLater", menu_file_send_later_cb),
+ BONOBO_UI_VERB ("DeleteAll", menu_edit_delete_all_cb),
+
BONOBO_UI_VERB_END
};