gail r1341 - in branches/gnome-2-22: . gail
- From: liyuan svn gnome org
- To: svn-commits-list gnome org
- Subject: gail r1341 - in branches/gnome-2-22: . gail
- Date: Thu, 3 Apr 2008 07:36:05 +0100 (BST)
Author: liyuan
Date: Thu Apr 3 07:36:05 2008
New Revision: 1341
URL: http://svn.gnome.org/viewvc/gail?rev=1341&view=rev
Log:
2008-04-03 Li Yuan <li yuan sun com>
* gail/gailtextview.c: (_gail_text_view_insert_text_cb),
(_gail_text_view_delete_range_cb), (emit_text_caret_moved),
(insert_handler), (insert_idle_handler):
Patch from Alejandro PiÃeiro Iglesias <apinheiro igalia com>.
Add a function insert_handler which does the work insert_idle_handler
used to do. Now insert_idle_handler is a wrapper, only used as idle
function. Only call GDK_THREADS_ENTER/LEAVE in insert_idle_handler.
Modified:
branches/gnome-2-22/ChangeLog
branches/gnome-2-22/gail/gailtextview.c
Modified: branches/gnome-2-22/gail/gailtextview.c
==============================================================================
--- branches/gnome-2-22/gail/gailtextview.c (original)
+++ branches/gnome-2-22/gail/gailtextview.c Thu Apr 3 07:36:05 2008
@@ -166,6 +166,7 @@
static gint get_selection_bound (GtkTextBuffer *buffer);
static void emit_text_caret_moved (GailTextView *gail_text_view,
gint insert_offset);
+static gint insert_handler (gpointer data);
static gint insert_idle_handler (gpointer data);
static GailWidgetClass *parent_class = NULL;
@@ -1465,7 +1466,7 @@
g_source_remove (gail_text_view->insert_notify_handler);
}
gail_text_view->insert_notify_handler = 0;
- insert_idle_handler (gail_text_view);
+ insert_handler (gail_text_view);
gail_text_view->position = position;
gail_text_view->length = length;
}
@@ -1510,7 +1511,7 @@
return;
}
- insert_idle_handler (gail_text_view);
+ insert_handler (gail_text_view);
}
g_signal_emit_by_name (accessible, "text_changed::delete",
offset, length);
@@ -1658,7 +1659,7 @@
{
g_source_remove (gail_text_view->insert_notify_handler);
gail_text_view->insert_notify_handler = 0;
- insert_idle_handler (gail_text_view);
+ insert_handler (gail_text_view);
}
if (insert_offset != gail_text_view->previous_insert_offset)
@@ -1675,13 +1676,11 @@
}
static gint
-insert_idle_handler (gpointer data)
+insert_handler (gpointer data)
{
GailTextView *gail_text_view;
GtkTextBuffer *buffer;
- GDK_THREADS_ENTER ();
-
gail_text_view = GAIL_TEXT_VIEW (data);
g_signal_emit_by_name (data,
@@ -1703,6 +1702,14 @@
gail_text_view->previous_selection_bound = get_selection_bound (buffer);
}
+ return FALSE;
+}
+
+static gint
+insert_idle_handler (gpointer data)
+{
+ GDK_THREADS_ENTER ();
+ insert_handler (data);
GDK_THREADS_LEAVE ();
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]