File nautilus-2.12.2-location-bar-dir-deleted.patch of Package nautilus

--- nau_old/src/nautilus-pathbar.c	2007-06-04 12:54:44.000000000 +0800
+++ nau_new/src/nautilus-pathbar.c	2007-06-04 12:53:24.000000000 +0800
@@ -1432,6 +1432,20 @@ nautilus_path_bar_check_parent_path (Nau
 			current_path = list;
 		  	break;
 		}
+/* add extra check to see whether some sub dirs were changed */
+/* is there anyway to do rename thing? */		
+		GnomeVFSURI *uri;
+		uri = gnome_vfs_uri_new (button_data->path);
+		if (uri == NULL || gnome_vfs_uri_exists (uri) == FALSE) {
+			if (uri)
+				gnome_vfs_uri_unref (uri);
+			nautilus_path_bar_remove_1 (path_bar, button_data->button);
+			path_bar->button_list = g_list_remove_link (path_bar->button_list, list);
+			g_list_free (list);
+			break;
+		} else if (uri)
+			gnome_vfs_uri_unref (uri);
+
 		if (list == path_bar->fake_root) {
 			need_new_fake_root = TRUE;
 		}
--- nau_old/src/nautilus-window-manage-views.c	2007-06-04 12:54:44.000000000 +0800
+++ nau_new/src/nautilus-window-manage-views.c	2007-06-04 12:52:36.000000000 +0800
@@ -345,30 +345,28 @@ viewed_file_changed_callback (NautilusFi
                                                            window->details->location)) {
                         g_free (window->details->location);
                         window->details->location = new_location;
-			
+		} else {
+			g_free (new_location);
+		}
                         /* Check if we can go up. */
-                        update_up_button (window);
+                update_up_button (window);
 #if !NEW_UI_COMPLETE
-                        if (NAUTILUS_IS_NAVIGATION_WINDOW (window)) {
+                if (NAUTILUS_IS_NAVIGATION_WINDOW (window)) {
                                 /* Change the location bar and path bar to match the current location. */
-                                nautilus_navigation_bar_set_location
-                                        (NAUTILUS_NAVIGATION_BAR (NAUTILUS_NAVIGATION_WINDOW (window)->navigation_bar),
-                                         window->details->location);
-				nautilus_path_bar_set_path (NAUTILUS_PATH_BAR (NAUTILUS_NAVIGATION_WINDOW (window)->path_bar),
-					    window->details->location);
-                        }                  
-                        if (NAUTILUS_IS_SPATIAL_WINDOW (window)) {
+                        nautilus_navigation_bar_set_location
+                	        (NAUTILUS_NAVIGATION_BAR (NAUTILUS_NAVIGATION_WINDOW (window)->navigation_bar),
+                        	window->details->location);
+			nautilus_path_bar_set_path (NAUTILUS_PATH_BAR (NAUTILUS_NAVIGATION_WINDOW (window)->path_bar),
+				window->details->location);
+                }                  
+                if (NAUTILUS_IS_SPATIAL_WINDOW (window)) {
                                 /* Change the location button to match the current location. */
-                                nautilus_spatial_window_set_location_button
-                                        (NAUTILUS_SPATIAL_WINDOW (window),
-                                         window->details->location);
-                        }                  
+                        nautilus_spatial_window_set_location_button
+                                (NAUTILUS_SPATIAL_WINDOW (window),
+                                 window->details->location);
+                }                  
 #endif
 
-                } else {
-                        g_free (new_location);
-                }
-
                 nautilus_window_update_title (window);
 		nautilus_window_update_icon (window);
         }
openSUSE Build Service is sponsored by