Author: ebassi
Date: Wed Feb 13 09:40:10 2008
New Revision: 19555
URL: http://svn.gnome.org/viewvc/gtk+?rev=19555&view=rev

Log:
2008-02-13  Emmanuele Bassi  <[EMAIL PROTECTED]>

        Merge from trunk:

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

Modified:
   branches/gtk-2-12/ChangeLog
   branches/gtk-2-12/gtk/gtkrecentchoosermenu.c

Modified: branches/gtk-2-12/gtk/gtkrecentchoosermenu.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkrecentchoosermenu.c        (original)
+++ branches/gtk-2-12/gtk/gtkrecentchoosermenu.c        Wed Feb 13 09:40:10 2008
@@ -927,8 +927,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));
@@ -937,6 +935,7 @@
           /* show the placeholder here */
           gtk_widget_show (pdata->placeholder);
           pdata->displayed_items = 1;
+          priv->populate_id = 0;
 
          return FALSE;
        }
@@ -978,6 +977,7 @@
     {
       g_list_foreach (pdata->items, (GFunc) gtk_recent_info_unref, NULL);
       g_list_free (pdata->items);
+      priv->populate_id = 0;
 
       retval = FALSE;
     }
@@ -992,14 +992,18 @@
 {
   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
_______________________________________________
SVN-commits-list mailing list (read only)
http://mail.gnome.org/mailman/listinfo/svn-commits-list

Want to limit the commits to a few modules? Go to above URL, log in to edit 
your options and select the modules ('topics') you want.
Module maintainer? It is possible to set the reply-to to your development 
mailing list. Email [EMAIL PROTECTED] if interested.

Reply via email to