diff options
author | Li Yuan <li.yuan@sun.com> | 2009-02-26 02:28:12 +0000 |
---|---|---|
committer | Li Yuan <liyuan@src.gnome.org> | 2009-02-26 02:28:12 +0000 |
commit | 6bcbd9eb4dc78fbfb5188606ad8c96241080e0ba (patch) | |
tree | ee5a33bf2bcc0139a19cc9da62f8897b3eb87140 /modules/other | |
parent | 7871e095605332ce1cfb15e19a06f36b05604d0b (diff) | |
download | gtk+-6bcbd9eb4dc78fbfb5188606ad8c96241080e0ba.tar.gz |
Bug #561631. Patch from Yue Wang. Ref the button in the idle function to
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.
svn path=/trunk/; revision=22408
Diffstat (limited to 'modules/other')
-rw-r--r-- | modules/other/gail/ChangeLog | 6 | ||||
-rw-r--r-- | modules/other/gail/gailbutton.c | 13 |
2 files changed, 15 insertions, 4 deletions
diff --git a/modules/other/gail/ChangeLog b/modules/other/gail/ChangeLog index 8551fb8e8d..a4449dd585 100644 --- a/modules/other/gail/ChangeLog +++ b/modules/other/gail/ChangeLog @@ -1,3 +1,9 @@ +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. + 2009-02-25 Li Yuan <li.yuan@sun.com> * gailtreeview.c: (gail_tree_view_ref_accessible_at_point): diff --git a/modules/other/gail/gailbutton.c b/modules/other/gail/gailbutton.c index 3226ecd4c2..01c6778f4b 100644 --- a/modules/other/gail/gailbutton.c +++ b/modules/other/gail/gailbutton.c @@ -503,15 +503,20 @@ idle_do_action (gpointer data) 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 @@ idle_do_action (gpointer data) break; } } - + g_object_unref (gail_button); return FALSE; } |