diff src/layout_image.c @ 1724:5276dabe836f

consider sidecars in layout_image popup menu
author nadvornik
date Mon, 28 Sep 2009 09:57:06 +0000
parents c029adbabb70
children
line wrap: on
line diff
--- a/src/layout_image.c	Sat Sep 26 08:47:28 2009 +0000
+++ b/src/layout_image.c	Mon Sep 28 09:57:06 2009 +0000
@@ -33,6 +33,7 @@
 #include "ui_menu.h"
 #include "uri_utils.h"
 #include "utilops.h"
+#include "view_file.h"
 
 #include <gdk/gdkkeysyms.h> /* for keyboard values */
 
@@ -461,7 +462,13 @@
 	FileData *fd = layout_image_get_fd(lw);
 
 	if (fd)
-		list = g_list_append(NULL, file_data_ref(fd));
+		{
+		if (lw->vf)
+			/* optionally include sidecars if the filelist entry is not expanded */
+			list = vf_selection_get_one(lw->vf, fd);
+		else
+			list = g_list_append(NULL, file_data_ref(fd));
+		}
 	
 	return list;
 }