diff options
Diffstat (limited to 'composer/listener.c')
-rw-r--r-- | composer/listener.c | 19 |
1 files changed, 18 insertions, 1 deletions
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 (); |