? gail/stamp-h1
? gail/docs/reference/libgail-util/gail-libgail-util.interfaces
? gail/docs/reference/libgail-util/gail-libgail-util.prerequisites
Index: gail/gail/gailentry.c
===================================================================
RCS file: /cvs/gnome/gail/gail/gailentry.c,v
retrieving revision 1.81
diff -u -r1.81 gailentry.c
--- gail/gail/gailentry.c	13 Aug 2004 09:12:29 -0000	1.81
+++ gail/gail/gailentry.c	23 Feb 2005 15:22:10 -0000
@@ -130,6 +130,7 @@
 /* Callbacks */
 
 static void       gail_entry_notify_insert         (GailEntry            *entry);
+static void       gail_entry_notify_delete         (GailEntry            *entry);
 static void	  _gail_entry_insert_text_cb	   (GtkEntry     	 *entry,
                                                     gchar		 *arg1,
                                                     gint		 arg2,
@@ -245,7 +246,8 @@
 gail_entry_object_init (GailEntry *entry)
 {
   entry->textutil = NULL;
-  entry->signal_name = NULL;
+  entry->signal_name_insert = NULL;
+  entry->signal_name_delete = NULL;
   entry->cursor_position = 0;
   entry->selection_bound = 0;
   entry->activate_description = NULL;
@@ -395,6 +397,11 @@
       g_source_remove (entry->insert_idle_handler);
       entry->insert_idle_handler = 0;
     }
+  if (entry->delete_idle_handler)
+    {
+      g_source_remove (entry->delete_idle_handler);
+      entry->delete_idle_handler = 0;
+    }
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
@@ -1075,15 +1082,16 @@
 static void
 gail_entry_notify_insert (GailEntry *entry)
 {
-  if (entry->signal_name)
+  if (entry->signal_name_insert)
     {
       g_signal_emit_by_name (entry, 
-                             entry->signal_name,
-                             entry->position,
-                             entry->length);
-      entry->signal_name = NULL;
+                             entry->signal_name_insert,
+                             entry->position_insert,
+                             entry->length_insert);
+      entry->signal_name_insert = NULL;
     }
 }
+
 /* Note arg1 returns the character at the start of the insert.
  * arg2 returns the number of characters inserted.
  */
@@ -1099,11 +1107,11 @@
 
   accessible = gtk_widget_get_accessible (GTK_WIDGET (entry));
   gail_entry = GAIL_ENTRY (accessible);
-  if (!gail_entry->signal_name)
+  if (!gail_entry->signal_name_insert)
     {
-      gail_entry->signal_name = "text_changed::insert";
-      gail_entry->position = *position;
-      gail_entry->length = arg2;
+      gail_entry->signal_name_insert = "text_changed::insert";
+      gail_entry->position_insert = *position;
+      gail_entry->length_insert = arg2;
     }
   /*
    * The signal will be emitted when the cursor position is updated.
@@ -1145,6 +1153,29 @@
   return unichar;
 }
 
+static gboolean
+idle_notify_delete (gpointer data)
+{
+  GailEntry *entry = GAIL_ENTRY (data);
+
+  entry->delete_idle_handler = 0;
+  gail_entry_notify_delete (entry);
+  return FALSE;
+}
+
+static void
+gail_entry_notify_delete (GailEntry *entry)
+{
+  if (entry->signal_name_delete)
+    {
+      g_signal_emit_by_name (entry, 
+                             entry->signal_name_delete,
+                             entry->position_delete,
+                             entry->length_delete);
+      entry->signal_name_delete = NULL;
+    }
+}
+
 /* Note arg1 returns the start of the delete range, arg2 returns the
  * end of the delete range if multiple characters are deleted.	
  */
@@ -1154,8 +1185,7 @@
                             gint      arg2)
 {
   AtkObject *accessible;
-
-  accessible = gtk_widget_get_accessible (GTK_WIDGET (entry));
+  GailEntry *gail_entry;
 
   /*
    * Zero length text deleted so ignore
@@ -1163,7 +1193,20 @@
   if (arg2 - arg1 == 0)
     return;
 
-  g_signal_emit_by_name (accessible, "text_changed::delete", arg1, arg2 - arg1);
+  accessible = gtk_widget_get_accessible (GTK_WIDGET (entry));
+  gail_entry = GAIL_ENTRY (accessible);
+  if (!gail_entry->signal_name_delete)
+    {
+      gail_entry->signal_name_delete = "text_changed::delete";
+      gail_entry->position_delete = arg1;
+      gail_entry->length_delete = arg2 - arg2;
+    }
+  /*
+   * The signal will be emitted when the cursor position is updated.
+   * or in an idle handler if it not updated.
+   */
+   if (gail_entry->delete_idle_handler == 0)
+     gail_entry->delete_idle_handler = g_idle_add (idle_notify_delete, gail_entry);
 }
 
 static void
Index: gail/gail/gailentry.h
===================================================================
RCS file: /cvs/gnome/gail/gail/gailentry.h,v
retrieving revision 1.13
diff -u -r1.13 gailentry.h
--- gail/gail/gailentry.h	10 Feb 2004 15:44:42 -0000	1.13
+++ gail/gail/gailentry.h	23 Feb 2005 15:22:11 -0000
@@ -46,9 +46,12 @@
   /*
    * These fields store information about text changed
    */
-  gchar          *signal_name;
-  gint           position;
-  gint           length;
+  gchar          *signal_name_insert;
+  gchar          *signal_name_delete;
+  gint           position_insert;
+  gint           position_delete;
+  gint           length_insert;
+  gint           length_delete;
   gint           cursor_position;
   gint           selection_bound;
 
@@ -56,6 +59,7 @@
   gchar          *activate_keybinding;
   guint          action_idle_handler;
   guint          insert_idle_handler;
+  guint          delete_idle_handler;
 };
 
 GType gail_entry_get_type (void);
