diff options
Diffstat (limited to 'composer')
-rw-r--r-- | composer/ChangeLog | 4 | ||||
-rw-r--r-- | composer/listener.c | 19 |
2 files changed, 22 insertions, 1 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index b84bada467..c8f0dd3845 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,7 @@ +2001-08-06 Radek Doulik <rodo@ximian.com> + + * listener.c (impl_event): handle delete event + 2001-07-31 Peter Williams <peterw@ximian.com> * e-msg-composer.c (setup_ui): Set the config path for the composer so diff --git a/composer/listener.c b/composer/listener.c index c3cc8f4e76..d9141befaf 100644 --- a/composer/listener.c +++ b/composer/listener.c @@ -81,7 +81,6 @@ reply_indent (EditorListener *l, CORBA_Environment * ev) GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "insert-paragraph", ev); return; } - } GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "style-normal", ev); @@ -141,6 +140,24 @@ impl_event (PortableServer_Servant _servant, /* printf ("new url: %s\n", url); */ g_free (url); } + } else if (!strcmp (name, "delete")) { + CORBA_char *orig; + + if (GNOME_GtkHTML_Editor_Engine_isParagraphEmpty (l->composer->editor_engine, ev)) { + orig = GNOME_GtkHTML_Editor_Engine_getParagraphData (l->composer->editor_engine, "orig", ev); + if (ev->_major == CORBA_NO_EXCEPTION) { + if (orig && *orig == '1') { + GNOME_GtkHTML_Editor_Engine_setParagraphData (l->composer->editor_engine, "orig", "0", ev); + + GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "indent-zero", ev); + GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "style-normal", ev); + GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "text-default-color", ev); + GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "italic-off", ev); + GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "insert-paragraph", ev); + GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "delete-back", ev); + } + } + } } return rv ? rv : get_any_null (); |