Use G_PRIORITY_DEFAULT_IDLE for the month/year-change timer, so that the

2006-08-06  Matthias Clasen  <mclasen@redhat.com>

	* 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)
This commit is contained in:
Matthias Clasen
2006-08-06 04:41:31 +00:00
committed by Matthias Clasen
parent 9c1f72ca48
commit e7b57543ab
3 changed files with 20 additions and 6 deletions

View File

@ -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);
}
}