From 2a136e56b8e0603a3bd26f426bbf252380db8367 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 17 Dec 2003 22:23:32 +0000 Subject: [PATCH] Add missing GDK_THREADS_ENTER()/GDK_THREADS_LEAVE(). Cast second argument Wed Dec 17 23:20:23 2003 Matthias Clasen * gtk/gtkexpander.c (gtk_expander_animation_timeout): Add missing GDK_THREADS_ENTER()/GDK_THREADS_LEAVE(). * gtk/gtkcalendar.c, gtk/gtkclist.c, gtk/gtkexpander.c, gtk/gtklist.c, gtk/gtknotebook.c, gtk/gtkselection.c, gtk/gtkspinbutton.c: Cast second argument to g_timeout_add() to GSourceFunc instead of GtkFunction. (#129525, Olexiy Avramchenko) --- ChangeLog | 9 +++++++++ ChangeLog.pre-2-10 | 9 +++++++++ ChangeLog.pre-2-4 | 9 +++++++++ ChangeLog.pre-2-6 | 9 +++++++++ ChangeLog.pre-2-8 | 9 +++++++++ gtk/gtkcalendar.c | 2 +- gtk/gtkclist.c | 4 ++-- gtk/gtkexpander.c | 4 ++++ gtk/gtklist.c | 4 ++-- gtk/gtknotebook.c | 4 ++-- gtk/gtkselection.c | 4 ++-- gtk/gtkspinbutton.c | 4 ++-- 12 files changed, 60 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57fbcb5ce..1489c7b5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Wed Dec 17 23:20:23 2003 Matthias Clasen + + * gtk/gtkexpander.c (gtk_expander_animation_timeout): Add missing + GDK_THREADS_ENTER()/GDK_THREADS_LEAVE(). + * gtk/gtkcalendar.c, gtk/gtkclist.c, gtk/gtkexpander.c, + gtk/gtklist.c, gtk/gtknotebook.c, gtk/gtkselection.c, + gtk/gtkspinbutton.c: Cast second argument to g_timeout_add() to + GSourceFunc instead of GtkFunction. (#129525, Olexiy Avramchenko) + Wed Dec 17 23:16:45 2003 Kristian Rietveld * gtk/gtktreeview.c (gtk_tree_view_button_press): fix compile warning. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 57fbcb5ce..1489c7b5d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +Wed Dec 17 23:20:23 2003 Matthias Clasen + + * gtk/gtkexpander.c (gtk_expander_animation_timeout): Add missing + GDK_THREADS_ENTER()/GDK_THREADS_LEAVE(). + * gtk/gtkcalendar.c, gtk/gtkclist.c, gtk/gtkexpander.c, + gtk/gtklist.c, gtk/gtknotebook.c, gtk/gtkselection.c, + gtk/gtkspinbutton.c: Cast second argument to g_timeout_add() to + GSourceFunc instead of GtkFunction. (#129525, Olexiy Avramchenko) + Wed Dec 17 23:16:45 2003 Kristian Rietveld * gtk/gtktreeview.c (gtk_tree_view_button_press): fix compile warning. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 57fbcb5ce..1489c7b5d 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +Wed Dec 17 23:20:23 2003 Matthias Clasen + + * gtk/gtkexpander.c (gtk_expander_animation_timeout): Add missing + GDK_THREADS_ENTER()/GDK_THREADS_LEAVE(). + * gtk/gtkcalendar.c, gtk/gtkclist.c, gtk/gtkexpander.c, + gtk/gtklist.c, gtk/gtknotebook.c, gtk/gtkselection.c, + gtk/gtkspinbutton.c: Cast second argument to g_timeout_add() to + GSourceFunc instead of GtkFunction. (#129525, Olexiy Avramchenko) + Wed Dec 17 23:16:45 2003 Kristian Rietveld * gtk/gtktreeview.c (gtk_tree_view_button_press): fix compile warning. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 57fbcb5ce..1489c7b5d 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +Wed Dec 17 23:20:23 2003 Matthias Clasen + + * gtk/gtkexpander.c (gtk_expander_animation_timeout): Add missing + GDK_THREADS_ENTER()/GDK_THREADS_LEAVE(). + * gtk/gtkcalendar.c, gtk/gtkclist.c, gtk/gtkexpander.c, + gtk/gtklist.c, gtk/gtknotebook.c, gtk/gtkselection.c, + gtk/gtkspinbutton.c: Cast second argument to g_timeout_add() to + GSourceFunc instead of GtkFunction. (#129525, Olexiy Avramchenko) + Wed Dec 17 23:16:45 2003 Kristian Rietveld * gtk/gtktreeview.c (gtk_tree_view_button_press): fix compile warning. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 57fbcb5ce..1489c7b5d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +Wed Dec 17 23:20:23 2003 Matthias Clasen + + * gtk/gtkexpander.c (gtk_expander_animation_timeout): Add missing + GDK_THREADS_ENTER()/GDK_THREADS_LEAVE(). + * gtk/gtkcalendar.c, gtk/gtkclist.c, gtk/gtkexpander.c, + gtk/gtklist.c, gtk/gtknotebook.c, gtk/gtkselection.c, + gtk/gtkspinbutton.c: Cast second argument to g_timeout_add() to + GSourceFunc instead of GtkFunction. (#129525, Olexiy Avramchenko) + Wed Dec 17 23:16:45 2003 Kristian Rietveld * gtk/gtktreeview.c (gtk_tree_view_button_press): fix compile warning. diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index d838b3dfb..8fbfe84a0 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -2703,7 +2703,7 @@ calendar_timer (gpointer data) { private_data->need_timer = FALSE; private_data->timer = g_timeout_add (CALENDAR_TIMER_DELAY, - (GtkFunction) calendar_timer, + (GSourceFunc) calendar_timer, (gpointer) calendar); } else diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c index 78d48c844..fe02be59d 100644 --- a/gtk/gtkclist.c +++ b/gtk/gtkclist.c @@ -5288,7 +5288,7 @@ gtk_clist_motion (GtkWidget *widget, return FALSE; clist->htimer = g_timeout_add - (SCROLL_TIME, (GtkFunction) horizontal_timeout, clist); + (SCROLL_TIME, (GSourceFunc) horizontal_timeout, clist); if (!((x < 0 && clist->hadjustment->value == 0) || (x >= clist->clist_window_width && @@ -5320,7 +5320,7 @@ gtk_clist_motion (GtkWidget *widget, return FALSE; clist->vtimer = g_timeout_add (SCROLL_TIME, - (GtkFunction) vertical_timeout, clist); + (GSourceFunc) vertical_timeout, clist); if (clist->drag_button && ((y < 0 && clist->focus_row == 0) || diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c index f8cc5c7bd..bff45399f 100644 --- a/gtk/gtkexpander.c +++ b/gtk/gtkexpander.c @@ -1160,6 +1160,8 @@ gtk_expander_animation_timeout (GtkExpander *expander) GdkRectangle area; gboolean finish = FALSE; + GDK_THREADS_ENTER(); + if (GTK_WIDGET_REALIZED (expander)) { get_expander_bounds (expander, &area); @@ -1199,6 +1201,8 @@ gtk_expander_animation_timeout (GtkExpander *expander) gtk_widget_queue_resize (GTK_WIDGET (expander)); } + GDK_THREADS_LEAVE(); + return !finish; } diff --git a/gtk/gtklist.c b/gtk/gtklist.c index 1ec1471dc..59240ca61 100644 --- a/gtk/gtklist.c +++ b/gtk/gtklist.c @@ -553,7 +553,7 @@ gtk_list_motion_notify (GtkWidget *widget, if (list->htimer == 0) { list->htimer = g_timeout_add - (SCROLL_TIME, (GtkFunction) gtk_list_horizontal_timeout, widget); + (SCROLL_TIME, (GSourceFunc) gtk_list_horizontal_timeout, widget); if (!((x < adj->value && adj->value <= 0) || (x > adj->value + adj->page_size && @@ -601,7 +601,7 @@ gtk_list_motion_notify (GtkWidget *widget, if (!((y < 0 && focus_row == 0) || (y > widget->allocation.height && focus_row >= length - 1))) list->vtimer = g_timeout_add (SCROLL_TIME, - (GtkFunction) gtk_list_vertical_timeout, + (GSourceFunc) gtk_list_vertical_timeout, list); if (row != focus_row) diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 3a1b74ec1..9e1c31765 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -1711,7 +1711,7 @@ gtk_notebook_arrow_button_press (GtkNotebook *notebook, if (!notebook->timer) { notebook->timer = g_timeout_add (NOTEBOOK_INIT_SCROLL_DELAY, - (GtkFunction) gtk_notebook_timer, + (GSourceFunc) gtk_notebook_timer, (gpointer) notebook); notebook->need_timer = TRUE; } @@ -2552,7 +2552,7 @@ gtk_notebook_timer (GtkNotebook *notebook) { notebook->need_timer = FALSE; notebook->timer = g_timeout_add (NOTEBOOK_SCROLL_DELAY, - (GtkFunction) gtk_notebook_timer, + (GSourceFunc) gtk_notebook_timer, (gpointer) notebook); } else diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c index 96fb6d495..6d976896e 100644 --- a/gtk/gtkselection.c +++ b/gtk/gtkselection.c @@ -748,7 +748,7 @@ gtk_selection_convert (GtkWidget *widget, current_retrievals = g_list_append (current_retrievals, info); gdk_selection_convert (widget->window, selection, target, time); - g_timeout_add (1000, (GtkFunction) gtk_selection_retrieval_timeout, info); + g_timeout_add (1000, (GSourceFunc) gtk_selection_retrieval_timeout, info); return TRUE; } @@ -1275,7 +1275,7 @@ _gtk_selection_request (GtkWidget *widget, gdk_window_get_events (info->requestor) | GDK_PROPERTY_CHANGE_MASK); current_incrs = g_list_append (current_incrs, info); - g_timeout_add (1000, (GtkFunction)gtk_selection_incr_timeout, info); + g_timeout_add (1000, (GSourceFunc) gtk_selection_incr_timeout, info); } /* If it was a MULTIPLE request, set the property to indicate which diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index cf4565ecf..64b0df7ba 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -1039,7 +1039,7 @@ start_spinning (GtkSpinButton *spin, spin->timer_step = step; spin->need_timer = TRUE; spin->timer = g_timeout_add (SPIN_BUTTON_INITIAL_TIMER_DELAY, - (GtkFunction) gtk_spin_button_timer, + (GSourceFunc) gtk_spin_button_timer, (gpointer) spin); } @@ -1190,7 +1190,7 @@ gtk_spin_button_timer (GtkSpinButton *spin_button) { spin_button->need_timer = FALSE; spin_button->timer = g_timeout_add (SPIN_BUTTON_TIMER_DELAY, - (GtkFunction) gtk_spin_button_timer, + (GSourceFunc) gtk_spin_button_timer, (gpointer) spin_button); } else