Reset the state on dispose.

2007-05-18  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkrecentchooserdefault.c:
	(gtk_recent_chooser_default_dispose): Reset the state on dispose.

	(cleanup_after_load): load_id != 0 && load_state == LOAD_EMPTY
	is a valid state, if the main loop never had the chance to
	properly spin at least once. (#438671)

svn path=/trunk/; revision=17866
This commit is contained in:
Emmanuele Bassi 2007-05-18 15:56:05 +00:00 committed by Emmanuele Bassi
parent 963067da78
commit 52119349f6
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,12 @@
2007-05-18 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchooserdefault.c:
(gtk_recent_chooser_default_dispose): Reset the state on dispose.
(cleanup_after_load): load_id != 0 && load_state == LOAD_EMPTY
is a valid state, if the main loop never had the chance to
properly spin at least once. (#438671)
2007-05-18 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchooserdefault.c (recent_meta_data_func): Mark

View File

@ -590,6 +590,7 @@ gtk_recent_chooser_default_dispose (GObject *object)
if (impl->load_id)
{
g_source_remove (impl->load_id);
impl->load_state = LOAD_EMPTY;
impl->load_id = 0;
}
@ -839,7 +840,8 @@ cleanup_after_load (gpointer user_data)
if (impl->load_id != 0)
{
g_assert ((impl->load_state == LOAD_PRELOAD) ||
g_assert ((impl->load_state == LOAD_EMPTY) ||
(impl->load_state == LOAD_PRELOAD) ||
(impl->load_state == LOAD_LOADING) ||
(impl->load_state == LOAD_FINISHED));