Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2129
diff -u -p -r1.2129 ChangeLog
--- ChangeLog	6 Jul 2005 07:00:09 -0000	1.2129
+++ ChangeLog	6 Jul 2005 10:02:50 -0000
@@ -1,3 +1,16 @@
+2005-07-06  Mengjie Yu  <meng-jie.yu@sun.com>
+
+	* gtkhtml.c: (gtk_html_class_init):
+	* gtkhtml.h:
+	Change the signal name object_deleted to object_delete.
+
+	* htmlengine-edit-cut-and-paste.c: (html_engine_delete):
+        We should emit the object_delete signal before we really delete it
+        since gnopernicus will check them before deleting.
+
+        Fixes #306238
+
+
 2005-07-06  Kaushal Kumar  <kakumar@novell.com>
 
 	* gtkhtml.c (gtk_html_class_init): Fix typo. Fixes bug #309242.
Index: gtkhtml.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml.c,v
retrieving revision 1.604
diff -u -p -r1.604 gtkhtml.c
--- gtkhtml.c	6 Jul 2005 07:00:09 -0000	1.604
+++ gtkhtml.c	6 Jul 2005 10:02:58 -0000
@@ -136,7 +136,7 @@ enum {
 	COMMAND,
 	CURSOR_CHANGED,
 	OBJECT_INSERTED,
-	OBJECT_DELETED,
+	OBJECT_DELETE,
 	/* now only last signal */
 	LAST_SIGNAL
 };
@@ -2983,11 +2983,11 @@ gtk_html_class_init (GtkHTMLClass *klass
 			      G_TYPE_NONE, 2,
 			      G_TYPE_INT, G_TYPE_INT);
 
-	signals [OBJECT_DELETED] = 
-		g_signal_new ("object_deleted",
+	signals [OBJECT_DELETE] = 
+		g_signal_new ("object_delete",
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_FIRST,
-			      G_STRUCT_OFFSET (GtkHTMLClass, object_deleted),
+			      G_STRUCT_OFFSET (GtkHTMLClass, object_delete),
 			      NULL, NULL,
 			      html_g_cclosure_marshal_VOID__INT_INT,
 			      G_TYPE_NONE, 2,
Index: gtkhtml.h
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml.h,v
retrieving revision 1.157
diff -u -p -r1.157 gtkhtml.h
--- gtkhtml.h	17 May 2005 14:17:48 -0000	1.157
+++ gtkhtml.h	6 Jul 2005 10:02:59 -0000
@@ -103,7 +103,7 @@ struct _GtkHTMLClass {
 	gboolean (* command)              (GtkHTML *html, GtkHTMLCommandType com_type);
 	void (* cursor_changed)       (GtkHTML *html);
 	void (* object_inserted)       (GtkHTML *html, int pos, int len);
-	void (* object_deleted)        (GtkHTML *html, int pos, int len);
+	void (* object_delete)        (GtkHTML *html, int pos, int len);
 
 	/* properties */
 	GtkHTMLClassProperties *properties;
Index: htmlengine-edit-cut-and-paste.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlengine-edit-cut-and-paste.c,v
retrieving revision 1.111
diff -u -p -r1.111 htmlengine-edit-cut-and-paste.c
--- htmlengine-edit-cut-and-paste.c	13 Apr 2005 15:35:32 -0000	1.111
+++ htmlengine-edit-cut-and-paste.c	6 Jul 2005 10:03:00 -0000
@@ -1769,6 +1769,10 @@ html_engine_delete (HTMLEngine *e)
 		gint start_position = start->position;
 		gint end_position = end->position;
 
+		if (end_position - start_position > 0) {
+			int len = end_position - start_position;
+			g_signal_emit_by_name (e->widget, "object_delete", start_position, len);
+		}
 
 		while (start->position < end->position) {
 			if (check_for_simple_delete (start->object, end->object)) {
@@ -1815,10 +1819,7 @@ html_engine_delete (HTMLEngine *e)
 			html_cursor_destroy (end);
 		html_cursor_jump_to_position (e->cursor, e, start_position);
 
-		if (end_position - start_position > 0) {
-			int len = end_position - start_position;
-			g_signal_emit_by_name (e->widget, "object_deleted", start_position, len);
-		}
+
 	}
 	html_undo_level_end (e->undo);
 }
