gtk+ r22408 - trunk/modules/other/gail
- From: liyuan svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r22408 - trunk/modules/other/gail
- Date: Thu, 26 Feb 2009 02:28:13 +0000 (UTC)
Author: liyuan
Date: Thu Feb 26 02:28:12 2009
New Revision: 22408
URL: http://svn.gnome.org/viewvc/gtk+?rev=22408&view=rev
Log:
2009-02-26 Li Yuan <li yuan sun com>
* gailbutton.c: (idle_do_action):
Bug #561631. Patch from Yue Wang. Ref the button in the idle
function to prevent the button being finalized.
Modified:
trunk/modules/other/gail/ChangeLog
trunk/modules/other/gail/gailbutton.c
Modified: trunk/modules/other/gail/gailbutton.c
==============================================================================
--- trunk/modules/other/gail/gailbutton.c (original)
+++ trunk/modules/other/gail/gailbutton.c Thu Feb 26 02:28:12 2009
@@ -503,15 +503,20 @@
tmp_event.button.send_event = TRUE;
tmp_event.button.time = GDK_CURRENT_TIME;
tmp_event.button.axes = NULL;
-
+
+ g_object_ref (gail_button);
+
if (widget == NULL /* State is defunct */ ||
!GTK_WIDGET_IS_SENSITIVE (widget) || !GTK_WIDGET_VISIBLE (widget))
- return FALSE;
+ {
+ g_object_unref (gail_button);
+ return FALSE;
+ }
else
gtk_widget_event (widget, &tmp_event);
button = GTK_BUTTON (widget);
- while (g_queue_get_length(gail_button->action_queue) != 0)
+ while (!g_queue_is_empty (gail_button->action_queue))
{
gint action_number = (gint) g_queue_pop_head (gail_button->action_queue);
if (gail_button->default_is_press)
@@ -572,7 +577,7 @@
break;
}
}
-
+ g_object_unref (gail_button);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]