summaryrefslogtreecommitdiff
path: root/modules/other
diff options
context:
space:
mode:
authorLi Yuan <li.yuan@sun.com>2009-02-25 09:45:37 +0000
committerLi Yuan <liyuan@src.gnome.org>2009-02-25 09:45:37 +0000
commit7eff2404d07c7d53af3743b78acbaf5bf3f7bd5b (patch)
tree10780b42e7373002ab26d94607e304292a911572 /modules/other
parent6336e980828688deca8c027ea1759a909bfbad2f (diff)
downloadgtk+-7eff2404d07c7d53af3743b78acbaf5bf3f7bd5b.tar.gz
Bug #520395. Notify the insert signal in the idle function. Let text_util
2009-02-25 Li Yuan <li.yuan@sun.com> * gailentry.c: (gail_entry_real_notify_gtk), (gail_entry_idle_notify_insert), (_gail_entry_insert_text_cb): Bug #520395. Notify the insert signal in the idle function. Let text_util has chance to update cache. svn path=/trunk/; revision=22404
Diffstat (limited to 'modules/other')
-rw-r--r--modules/other/gail/ChangeLog7
-rw-r--r--modules/other/gail/gailentry.c11
2 files changed, 14 insertions, 4 deletions
diff --git a/modules/other/gail/ChangeLog b/modules/other/gail/ChangeLog
index 6b69abacc1..1057cd83c1 100644
--- a/modules/other/gail/ChangeLog
+++ b/modules/other/gail/ChangeLog
@@ -1,5 +1,12 @@
2009-02-25 Li Yuan <li.yuan@sun.com>
+ * gailentry.c: (gail_entry_real_notify_gtk),
+ (gail_entry_idle_notify_insert), (_gail_entry_insert_text_cb):
+ Bug #520395. Notify the insert signal in the idle function. Let
+ text_util has chance to update cache.
+
+2009-02-25 Li Yuan <li.yuan@sun.com>
+
* gailtreeview.c: (is_cell_showing):
Bug #571001. Set the cell's showing state based on bin_window
coordinates.
diff --git a/modules/other/gail/gailentry.c b/modules/other/gail/gailentry.c
index e1f2331811..f426f5639f 100644
--- a/modules/other/gail/gailentry.c
+++ b/modules/other/gail/gailentry.c
@@ -131,6 +131,7 @@ static void gail_entry_paste_received (GtkClipboard *clipboard,
/* Callbacks */
+static gboolean gail_entry_idle_notify_insert (gpointer data);
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,
@@ -252,7 +253,8 @@ gail_entry_real_notify_gtk (GObject *obj,
if (strcmp (pspec->name, "cursor-position") == 0)
{
- gail_entry_notify_insert (entry);
+ if (entry->insert_idle_handler == 0)
+ entry->insert_idle_handler = gdk_threads_add_idle (gail_entry_idle_notify_insert, entry);
if (check_for_selection_change (entry, gtk_entry))
g_signal_emit_by_name (atk_obj, "text_selection_changed");
@@ -264,7 +266,8 @@ gail_entry_real_notify_gtk (GObject *obj,
}
else if (strcmp (pspec->name, "selection-bound") == 0)
{
- gail_entry_notify_insert (entry);
+ if (entry->insert_idle_handler == 0)
+ entry->insert_idle_handler = gdk_threads_add_idle (gail_entry_idle_notify_insert, entry);
if (check_for_selection_change (entry, gtk_entry))
g_signal_emit_by_name (atk_obj, "text_selection_changed");
@@ -1001,7 +1004,7 @@ gail_entry_paste_received (GtkClipboard *clipboard,
/* Callbacks */
static gboolean
-idle_notify_insert (gpointer data)
+gail_entry_idle_notify_insert (gpointer data)
{
GailEntry *entry;
@@ -1051,7 +1054,7 @@ _gail_entry_insert_text_cb (GtkEntry *entry,
* or in an idle handler if it not updated.
*/
if (gail_entry->insert_idle_handler == 0)
- gail_entry->insert_idle_handler = gdk_threads_add_idle (idle_notify_insert, gail_entry);
+ gail_entry->insert_idle_handler = gdk_threads_add_idle (gail_entry_idle_notify_insert, gail_entry);
}
static gunichar