diff options
-rw-r--r-- | composer/ChangeLog | 4 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 24 |
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 }; |