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
This commit is contained in:
committed by
Emmanuele Bassi
parent
c7d28a02f5
commit
8b370098ca
@@ -1,3 +1,10 @@
|
||||
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);
|
||||
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);
|
||||
g_slice_free (MenuPopulateData, data);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user