diff src/layout.c @ 368:95fe470440ad

New Go to directory view feature that permits to find and display the directory corresponding to an image view. For example, when you open an image in new window from collection, right clicking on the newly displayed image will let you choose Go to directory view, which would open a new window, with image and directory list. If current directory is the one of the image, menu item is disabled.
author zas_
date Tue, 15 Apr 2008 06:56:25 +0000
parents 77103f3f2cb1
children 5afe77bb563a
line wrap: on
line diff
--- a/src/layout.c	Mon Apr 14 23:47:13 2008 +0000
+++ b/src/layout.c	Tue Apr 15 06:56:25 2008 +0000
@@ -85,6 +85,23 @@
 	return NULL;
 }
 
+LayoutWindow *layout_find_by_image_fd(ImageWindow *imd)
+{
+	GList *work;
+
+	work = layout_window_list;
+	while (work)
+		{
+		LayoutWindow *lw = work->data;
+		work = work->next;
+		if (lw->image->image_fd == imd->image_fd)
+			return lw;
+		
+		}
+
+	return NULL;
+}
+
 /*
  *-----------------------------------------------------------------------------
  * menu, toolbar, and dir view