Commit 8b370098 authored by Emmanuele Bassi's avatar Emmanuele Bassi Committed by Emmanuele Bassi

Fix possible recursion by resetting the idle source id. (#507605, William

2008-01-10  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkrecentchoosermenu.c:
	(idle_populate_func), (idle_populate_clean_up): Fix possible
	recursion by resetting the idle source id. (#507605, William
	Pitcock)

svn path=/trunk/; revision=19339
parent c7d28a02
2008-01-10 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchoosermenu.c:
(idle_populate_func), (idle_populate_clean_up): Fix possible
recursion by resetting the idle source id. (#507605, William
Pitcock)
2008-01-10 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_motion_draw_column_motion_arrow),
......
......@@ -926,8 +926,6 @@ idle_populate_func (gpointer data)
pdata = (MenuPopulateData *) data;
priv = pdata->menu->priv;
priv->populate_id = 0;
if (!pdata->items)
{
pdata->items = gtk_recent_chooser_get_items (GTK_RECENT_CHOOSER (pdata->menu));
......@@ -936,6 +934,7 @@ idle_populate_func (gpointer data)
/* show the placeholder here */
gtk_widget_show (pdata->placeholder);
pdata->displayed_items = 1;
priv->populate_id = 0;
return FALSE;
}
......@@ -978,6 +977,8 @@ check_and_return:
g_list_foreach (pdata->items, (GFunc) gtk_recent_info_unref, NULL);
g_list_free (pdata->items);
priv->populate_id = 0;
retval = FALSE;
}
else
......@@ -991,14 +992,17 @@ idle_populate_clean_up (gpointer data)
{
MenuPopulateData *pdata = data;
/* show the placeholder in case no item survived
* the filtering process in the idle loop
*/
if (!pdata->displayed_items)
gtk_widget_show (pdata->placeholder);
g_object_unref (pdata->placeholder);
g_slice_free (MenuPopulateData, data);
if (pdata->menu->priv->populate_id == 0)
{
/* show the placeholder in case no item survived
* the filtering process in the idle loop
*/
if (!pdata->displayed_items)
gtk_widget_show (pdata->placeholder);
g_object_unref (pdata->placeholder);
g_slice_free (MenuPopulateData, data);
}
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment