From e7b57543abde2b3724d47df5fea4be76074c6a41 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 6 Aug 2006 04:41:31 +0000 Subject: [PATCH] Use G_PRIORITY_DEFAULT_IDLE for the month/year-change timer, so that the 2006-08-06 Matthias Clasen * gtk/gtkcalendar.c (calendar_start_spinning, calendar_timer): Use G_PRIORITY_DEFAULT_IDLE for the month/year-change timer, so that the caller will have a chance to redraw/resize itself between every change. (#348824, Federico Mena Quintero, patch by Michael Meeks) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ gtk/gtkcalendar.c | 14 ++++++++------ 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9b9c40298c..279ebdec24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-08-06 Matthias Clasen + * gtk/gtkcalendar.c (calendar_start_spinning, calendar_timer): + Use G_PRIORITY_DEFAULT_IDLE for the month/year-change timer, + so that the caller will have a chance to redraw/resize itself + between every change. (#348824, Federico Mena Quintero, patch + by Michael Meeks) + * gtk/gtkfontbutton.c (gtk_font_button_update_font_info): Add a missing initialization. (#348787, Leonardo Boshell) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9b9c40298c..279ebdec24 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,11 @@ 2006-08-06 Matthias Clasen + * gtk/gtkcalendar.c (calendar_start_spinning, calendar_timer): + Use G_PRIORITY_DEFAULT_IDLE for the month/year-change timer, + so that the caller will have a chance to redraw/resize itself + between every change. (#348824, Federico Mena Quintero, patch + by Michael Meeks) + * gtk/gtkfontbutton.c (gtk_font_button_update_font_info): Add a missing initialization. (#348787, Leonardo Boshell) diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 01fe262b0f..7e75fd1549 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -2400,9 +2400,10 @@ calendar_timer (gpointer data) g_object_get (settings, "gtk-timeout-repeat", &timeout, NULL); priv->need_timer = FALSE; - priv->timer = g_timeout_add (timeout * SCROLL_DELAY_FACTOR, - (GSourceFunc) calendar_timer, - (gpointer) calendar); + priv->timer = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, + timeout * SCROLL_DELAY_FACTOR, + (GSourceFunc) calendar_timer, + (gpointer) calendar, NULL); } else retval = TRUE; @@ -2430,9 +2431,10 @@ calendar_start_spinning (GtkCalendar *calendar, g_object_get (settings, "gtk-timeout-initial", &timeout, NULL); priv->need_timer = TRUE; - priv->timer = g_timeout_add (timeout, - calendar_timer, - calendar); + priv->timer = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, + timeout, + (GSourceFunc) calendar_timer, + (gpointer) calendar, NULL); } }