r13756 - in /desktop/unstable/nautilus/debian: changelog patches/16_missing_thumbnails.patch patches/series

joss at users.alioth.debian.org joss at users.alioth.debian.org
Wed Dec 5 12:32:33 UTC 2007


Author: joss
Date: Wed Dec  5 12:32:33 2007
New Revision: 13756

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=13756
Log:
* 16_missing_thumbnails.patch: stolen from upstream's SVN. Fixes 
  disappearing thumnails. Closes: #453525.

Added:
    desktop/unstable/nautilus/debian/patches/16_missing_thumbnails.patch
Modified:
    desktop/unstable/nautilus/debian/changelog
    desktop/unstable/nautilus/debian/patches/series

Modified: desktop/unstable/nautilus/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/nautilus/debian/changelog?rev=13756&op=diff
==============================================================================
--- desktop/unstable/nautilus/debian/changelog (original)
+++ desktop/unstable/nautilus/debian/changelog Wed Dec  5 12:32:33 2007
@@ -9,6 +9,10 @@
 
   [ Sebastien Bacher ]
   * New nautilus-connect-server manpage from Fernando Ribeiro (Ubuntu: #61299)
+
+  [ Josselin Mouette ]
+  * 16_missing_thumbnails.patch: stolen from upstream's SVN. Fixes 
+    disappearing thumnails. Closes: #453525.
 
  -- Josselin Mouette <joss at debian.org>  Wed, 28 Nov 2007 12:23:02 +0100
 

Added: desktop/unstable/nautilus/debian/patches/16_missing_thumbnails.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/nautilus/debian/patches/16_missing_thumbnails.patch?rev=13756&op=file
==============================================================================
--- desktop/unstable/nautilus/debian/patches/16_missing_thumbnails.patch (added)
+++ desktop/unstable/nautilus/debian/patches/16_missing_thumbnails.patch Wed Dec  5 12:32:33 2007
@@ -1,0 +1,137 @@
+Debian #453525
+GNOME #480608, fixed in SVN r13249
+Index: nautilus-2.20.0/libnautilus-private/nautilus-directory-async.c
+===================================================================
+--- nautilus-2.20.0.orig/libnautilus-private/nautilus-directory-async.c	2007-12-05 13:29:07.059571886 +0100
++++ nautilus-2.20.0/libnautilus-private/nautilus-directory-async.c	2007-12-05 13:29:19.852300903 +0100
+@@ -594,7 +594,7 @@ mime_db_changed_callback (GnomeVFSMIMEMo
+ 		NAUTILUS_FILE_ATTRIBUTE_FILE_TYPE |
+ 		NAUTILUS_FILE_ATTRIBUTE_DIRECTORY_ITEM_MIME_TYPES;
+ 
+-	nautilus_directory_invalidate_file_attributes (dir, attrs);
++	nautilus_directory_force_reload_internal (dir, attrs);
+ }
+ 
+ void
+Index: nautilus-2.20.0/libnautilus-private/nautilus-icon-factory.c
+===================================================================
+--- nautilus-2.20.0.orig/libnautilus-private/nautilus-icon-factory.c	2007-12-05 13:30:14.475413696 +0100
++++ nautilus-2.20.0/libnautilus-private/nautilus-icon-factory.c	2007-12-05 13:30:24.035958521 +0100
+@@ -200,7 +200,7 @@ static CacheIcon *get_icon_from_cache   
+ 							  const char               *modifier,
+ 							  guint                     nominal_size,
+ 							  gboolean		    force_nominal);
+-static void nautilus_icon_factory_clear                  (void);
++static void nautilus_icon_factory_clear                  (gboolean                  clear_pathnames);
+ 
+ GNOME_CLASS_BOILERPLATE (NautilusIconFactory,
+ 			 nautilus_icon_factory,
+@@ -270,7 +270,7 @@ icon_theme_changed_callback (GnomeIconTh
+ {
+ 	NautilusIconFactory *factory;
+ 
+-	nautilus_icon_factory_clear ();
++	nautilus_icon_factory_clear (FALSE);
+ 
+ 	factory = user_data;
+ 
+@@ -714,9 +714,23 @@ remove_all (gpointer key, gpointer value
+         return TRUE;
+ }
+ 
+-/* Reset the cache to the default state. */
++static gboolean
++remove_non_pathnames (gpointer _key, gpointer value, gpointer user_data)
++{
++	CacheKey *key = _key;
++	
++	if (key->name && key->name[0] == '/') {
++		return FALSE;
++	}
++	    
++        return TRUE; /* Tell the caller to remove the hash table entry. */
++}
++
++/* Reset the cache to the default state.
++   Clear pathnames can be set to FALSE which means we only clear icon names, not
++   absolute pathnames. This is useful to avoid throwing away all loaded thumbnails. */
+ static void
+-nautilus_icon_factory_clear (void)
++nautilus_icon_factory_clear (gboolean clear_pathnames)
+ {
+ 	NautilusIconFactory *factory;
+ 	CircularList *head;
+@@ -724,24 +738,25 @@ nautilus_icon_factory_clear (void)
+ 	factory = get_icon_factory ();
+ 
+         g_hash_table_foreach_remove (factory->icon_cache,
+-				     remove_all,
++				     clear_pathnames ? remove_all : remove_non_pathnames,
+                                      NULL);
+ 	
+ 	/* Empty out the recently-used list. */
+ 	head = &factory->recently_used_dummy_head;
+ 
+-	/* fallback_icon hangs around, but we don't know if it
+-	 * was ever inserted in the list
+-	 */
+-	g_assert (factory->recently_used_count == 0 ||
+-		  factory->recently_used_count == 1);
+-
+-	if (factory->recently_used_count == 1) {
+-		/* make sure this one is the fallback_icon */
+-		g_assert (head->next == head->prev);
+-		g_assert (&factory->fallback_icon->recently_used_node == head->next);
++	if (clear_pathnames) {
++		/* fallback_icon hangs around, but we don't know if it
++		 * was ever inserted in the list
++		 */
++		g_assert (factory->recently_used_count == 0 ||
++			  factory->recently_used_count == 1);
++		if (factory->recently_used_count == 1) {
++			/* make sure this one is the fallback_icon */
++			g_assert (head->next == head->prev);
++			g_assert (&factory->fallback_icon->recently_used_node == head->next);
++		}
+ 	}
+-
++		
+ }
+ 
+ static void
+@@ -794,7 +809,7 @@ thumbnail_limit_changed_callback (gpoint
+ 	 * signal to mean only "thumbnails might have changed" if this ends up being slow
+ 	 * for some reason.
+ 	 */
+-	nautilus_icon_factory_clear ();
++	nautilus_icon_factory_clear (TRUE);
+ 	g_signal_emit (global_icon_factory,
+ 			 signals[ICONS_CHANGED], 0);
+ }
+@@ -808,7 +823,7 @@ thumbnail_size_changed_callback (gpointe
+ 	 * signal to mean only "thumbnails might have changed" if this ends up being slow
+ 	 * for some reason.
+ 	 */
+-	nautilus_icon_factory_clear ();
++	nautilus_icon_factory_clear (TRUE);
+ 	g_signal_emit (global_icon_factory,
+ 			 signals[ICONS_CHANGED], 0);
+ }
+@@ -818,7 +833,7 @@ show_thumbnails_changed_callback (gpoint
+ {
+ 	show_image_thumbs = eel_preferences_get_enum (NAUTILUS_PREFERENCES_SHOW_IMAGE_FILE_THUMBNAILS);
+ 
+-	nautilus_icon_factory_clear ();
++	nautilus_icon_factory_clear (TRUE);
+ 	/* If the user disabled thumbnailing, remove all outstanding thumbnails */ 
+ 	if (show_image_thumbs == NAUTILUS_SPEED_TRADEOFF_NEVER) {
+ 		nautilus_thumbnail_remove_all_from_queue ();
+@@ -836,7 +851,7 @@ mime_type_data_changed_callback (GnomeVF
+ 	/* We don't know which data changed, so we have to assume that
+ 	 * any or all icons might have changed.
+ 	 */
+-	nautilus_icon_factory_clear ();
++	nautilus_icon_factory_clear (FALSE);
+ 	g_signal_emit (get_icon_factory (), 
+ 			 signals[ICONS_CHANGED], 0);
+ }				 

Modified: desktop/unstable/nautilus/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/nautilus/debian/patches/series?rev=13756&op=diff
==============================================================================
--- desktop/unstable/nautilus/debian/patches/series (original)
+++ desktop/unstable/nautilus/debian/patches/series Wed Dec  5 12:32:33 2007
@@ -10,6 +10,7 @@
 12_list-view_expand.patch
 14_sidebar_network-protocol.patch
 15_tracker_check.patch
+16_missing_thumbnails.patch
 20_upstream_nautilus-dnd-user-owned.patch -p0
 21_nautilus_xmp.patch
 23_thumbnails_add-border.patch




More information about the pkg-gnome-commits mailing list