diff src/img-view.c @ 783:d6a7fb4b8e7c

replaced directory path with FileData* dir_fd
author nadvornik
date Tue, 03 Jun 2008 19:44:19 +0000
parents 2d2cca2bceb0
children 799d035b9994
line wrap: on
line diff
--- a/src/img-view.c	Tue Jun 03 15:54:05 2008 +0000
+++ b/src/img-view.c	Tue Jun 03 19:44:19 2008 +0000
@@ -963,7 +963,7 @@
 					 G_CALLBACK(view_window_collection_unref_cb), cd);
 			}
 		}
-	else if (isdir(fd->path) && filelist_read(fd->path, &list, NULL))
+	else if (isdir(fd->path) && filelist_read(fd, &list, NULL))
 		{	
 		list = filelist_sort_path(list);
 		list = filelist_filter(list, FALSE);
@@ -1223,13 +1223,13 @@
 	view_window_close(vw);
 }
 
-static LayoutWindow *view_new_layout_with_path(const gchar *path)
+static LayoutWindow *view_new_layout_with_fd(FileData *fd)
 {
 	LayoutWindow *nw;
 
 	nw = layout_new(NULL, FALSE, FALSE);
 	layout_sort_set(nw, options->file_sort.method, options->file_sort.ascending);
-	layout_set_path(nw, path);
+	layout_set_fd(nw, fd);
 	return nw;
 }
 
@@ -1238,20 +1238,17 @@
 {
 	ViewWindow *vw = data;
 	LayoutWindow *lw;
-	const gchar *path;
 	ImageWindow *imd;
 
 	imd = view_window_active_image(vw);
 
 	if (!imd || !imd->image_fd) return;
-	path = imd->image_fd->path;
-	if (!path) return;
 
 	lw = layout_find_by_image_fd(imd);
 	if (lw)
-		layout_set_path(lw, path);
+		layout_set_fd(lw, imd->image_fd);
 	else
-		view_new_layout_with_path(path);
+		view_new_layout_with_fd(imd->image_fd);
 	view_window_close(vw);
 }
 
@@ -1362,11 +1359,11 @@
 
 				if (recurse)
 					{
-					list = filelist_recursive(fd->path);
+					list = filelist_recursive(fd);
 					}
 				else
 					{ /*FIXME */
-					filelist_read(fd->path, &list, NULL);
+					filelist_read(fd, &list, NULL);
 					list = filelist_sort_path(list);
 					list = filelist_filter(list, FALSE);
 					}