aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRadek Doulik <rodo@ximian.com>2001-08-07 00:46:10 +0800
committerRadek Doulik <rodo@src.gnome.org>2001-08-07 00:46:10 +0800
commit2b450081f656a1fc7ab986ed1746c90003a9809e (patch)
tree21f050f5d2d253959d0a3c1ec257da445b41908c
parentc4ea7875dc2905496ad07b493ef21242d3443ef8 (diff)
downloadgsoc2013-evolution-2b450081f656a1fc7ab986ed1746c90003a9809e.tar.gz
gsoc2013-evolution-2b450081f656a1fc7ab986ed1746c90003a9809e.tar.zst
gsoc2013-evolution-2b450081f656a1fc7ab986ed1746c90003a9809e.zip
handle delete event
2001-08-06 Radek Doulik <rodo@ximian.com> * listener.c (impl_event): handle delete event svn path=/trunk/; revision=11700
-rw-r--r--composer/ChangeLog4
-rw-r--r--composer/listener.c19
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 ();