]> Pileus Git - ~andy/gtk/commitdiff
Show non existing resources by default. (recent_meta_data_func): Do not
authorEmmanuele Bassi <ebassi@gnome.org>
Sun, 6 Aug 2006 23:44:46 +0000 (23:44 +0000)
committerEmmanuele Bassi <ebassi@src.gnome.org>
Sun, 6 Aug 2006 23:44:46 +0000 (23:44 +0000)
2006-08-07  Emmanuele Bassi  <ebassi@gnome.org>

* gtk/gtkrecentchooserdefault.c:
(_gtk_recent_chooser_default_init): Show non existing
resources by default.
(recent_meta_data_func): Do not mark non existing
resources as insensitive.

* gtk/gtkrecentchoosermenu.c:
(gtk_recent_chooser_menu_init): Show non existing
resources by default.
(gtk_recent_chooser_menu_create_item): Do not mark
non existing resources as insensitive.

ChangeLog
ChangeLog.pre-2-10
gtk/gtkrecentchooserdefault.c
gtk/gtkrecentchoosermenu.c

index 8870fced5a785b4c4e9da91ea2e8c643b812d69a..2d847b49a390dae00e99a35a82b14c347f6bac19 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2006-08-07  Emmanuele Bassi  <ebassi@gnome.org>
+
+       * gtk/gtkrecentchooserdefault.c:
+       (_gtk_recent_chooser_default_init): Show non existing
+       resources by default.
+       (recent_meta_data_func): Do not mark non existing
+       resources as insensitive.
+
+       * gtk/gtkrecentchoosermenu.c:
+       (gtk_recent_chooser_menu_init): Show non existing
+       resources by default.
+       (gtk_recent_chooser_menu_create_item): Do not mark
+       non existing resources as insensitive.
+
 2006-08-06  Matthias Clasen  <mclasen@redhat.com>
 
        * gdk/x11/gdkkeys-x11.c (gdk_keymap_x11_finalize): Free
index 8870fced5a785b4c4e9da91ea2e8c643b812d69a..2d847b49a390dae00e99a35a82b14c347f6bac19 100644 (file)
@@ -1,3 +1,17 @@
+2006-08-07  Emmanuele Bassi  <ebassi@gnome.org>
+
+       * gtk/gtkrecentchooserdefault.c:
+       (_gtk_recent_chooser_default_init): Show non existing
+       resources by default.
+       (recent_meta_data_func): Do not mark non existing
+       resources as insensitive.
+
+       * gtk/gtkrecentchoosermenu.c:
+       (gtk_recent_chooser_menu_init): Show non existing
+       resources by default.
+       (gtk_recent_chooser_menu_create_item): Do not mark
+       non existing resources as insensitive.
+
 2006-08-06  Matthias Clasen  <mclasen@redhat.com>
 
        * gdk/x11/gdkkeys-x11.c (gdk_keymap_x11_finalize): Free
index 46df22555a683b70c9a72c7451609e8c8df10ff0..de89c664d6db566cd2a4755e43b9f29626aa57b8 100644 (file)
@@ -341,7 +341,7 @@ _gtk_recent_chooser_default_init (GtkRecentChooserDefault *impl)
 
   impl->show_icons = TRUE;
   impl->show_private = FALSE;
-  impl->show_not_found = FALSE;
+  impl->show_not_found = TRUE;
   impl->show_tips = TRUE;
   impl->select_multiple = FALSE;
   impl->local_only = TRUE;
@@ -1010,7 +1010,6 @@ recent_meta_data_func (GtkTreeViewColumn *tree_column,
   
   g_object_set (cell,
                 "markup", data->str,
-                "sensitive", gtk_recent_info_exists (info),
                 NULL);
   
   g_string_free (data, TRUE);
@@ -1341,9 +1340,6 @@ gtk_recent_chooser_default_get_items (GtkRecentChooser *chooser)
       
       clamp = g_list_nth (items, limit - 1);
       
-      if (!clamp)
-        return items;
-      
       l = clamp->next;
       clamp->next = NULL;
     
index ae5a0149c201fcbf0dc1ae6de3d5ef0bd497a0e7..54ee86302eb3a3ea1d2236fc17e68e1d9d94976e 100644 (file)
@@ -225,7 +225,7 @@ gtk_recent_chooser_menu_init (GtkRecentChooserMenu *menu)
   priv->show_icons= TRUE;
   priv->show_numbers = FALSE;
   priv->show_tips = FALSE;
-  priv->show_not_found = FALSE;
+  priv->show_not_found = TRUE;
   priv->show_private = FALSE;
   priv->local_only = TRUE;
   
@@ -636,12 +636,12 @@ gtk_recent_chooser_menu_get_items (GtkRecentChooser *chooser)
   
   if (compare_func)  
     items = g_list_sort_with_data (items, compare_func, menu);
-  
   length = g_list_length (items);
   if ((limit != -1) && (length > limit))
     {
       GList *clamp, *l;
-      
+
       clamp = g_list_nth (items, limit - 1);
 
       l = clamp->next;
@@ -650,7 +650,7 @@ gtk_recent_chooser_menu_get_items (GtkRecentChooser *chooser)
       g_list_foreach (l, (GFunc) gtk_recent_info_unref, NULL);
       g_list_free (l);
     }
-  
+
   return items;
 }
 
@@ -888,14 +888,7 @@ gtk_recent_chooser_menu_create_item (GtkRecentChooserMenu *menu,
       image = gtk_image_new_from_pixbuf (icon);
       gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
     }
-  
-  if (!gtk_recent_info_exists (info))
-    {
-      gtk_widget_set_sensitive (item, FALSE);
-      
-      goto out;
-    }
-  
+
   g_signal_connect (item, "activate",
                    G_CALLBACK (item_activate_cb),
                    menu);
@@ -994,21 +987,31 @@ idle_populate_func (gpointer data)
   priv = pdata->menu->priv;
 
   /* skip non-local items on request */
-  if (priv->local_only && !gtk_recent_info_is_local (info))
-    goto check_and_return;
+  if (priv->local_only &&
+      !gtk_recent_info_is_local (info))
+    {
+      goto check_and_return;
+    }
       
   /* skip private items on request */
-  if (!priv->show_private && gtk_recent_info_get_private_hint (info))
-    goto check_and_return;
-      
-  /* skip non-existing items on request */
-  if (!priv->show_not_found && !gtk_recent_info_exists (info))
-    goto check_and_return;
+  if (!priv->show_private &&
+      gtk_recent_info_get_private_hint (info))
+    {
+      goto check_and_return;
+    }
 
+  /* skip non-existing items on request */
+  if (!priv->show_not_found &&
+      !gtk_recent_info_exists (info))
+    {
+      goto check_and_return;
+    }
   /* filter items based on the currently set filter object */
   if (get_is_recent_filtered (pdata->menu, info))
-    goto check_and_return;
+    {
+      goto check_and_return;
+    }
+
   item = gtk_recent_chooser_menu_create_item (pdata->menu,
                                               info,
                                              pdata->loaded_items);
@@ -1037,7 +1040,7 @@ idle_populate_func (gpointer data)
   g_object_set_data_full (G_OBJECT (item), "gtk-recent-info",
                          gtk_recent_info_ref (info),
                          (GDestroyNotify) gtk_recent_info_unref);
-
+  
 check_and_return:
   pdata->loaded_items += 1;