gtk_recent_files_menu_populate(). Patch from upstream SVN by William Pitcock (Closes: #459393).
56 lines
1.6 KiB
Diff
56 lines
1.6 KiB
Diff
diff -urN gtk+2.0-2.12.3/gtk/gtkrecentchoosermenu.c gtk+2.0-2.12.3+fix/gtk/gtkrecentchoosermenu.c
|
|
--- gtk+2.0-2.12.3/gtk/gtkrecentchoosermenu.c 2007-12-04 10:52:08.000000000 -0600
|
|
+++ gtk+2.0-2.12.3+fix/gtk/gtkrecentchoosermenu.c 2008-01-04 23:22:01.000000000 -0600
|
|
@@ -926,8 +926,6 @@
|
|
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 @@
|
|
/* show the placeholder here */
|
|
gtk_widget_show (pdata->placeholder);
|
|
pdata->displayed_items = 1;
|
|
+ priv->populate_id = 0;
|
|
|
|
return FALSE;
|
|
}
|
|
@@ -978,6 +977,8 @@
|
|
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 @@
|
|
{
|
|
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
|
|
|