Revision: 1267
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1267&view=rev
Author:   zas_
Date:     2008-11-22 22:43:18 +0000 (Sat, 22 Nov 2008)

Log Message:
-----------
When more than one image is selected, Split Horizontal, Vertical and Quad will 
use selected images when initialized.

Modified Paths:
--------------
    trunk/src/layout_image.c

Modified: trunk/src/layout_image.c
===================================================================
--- trunk/src/layout_image.c    2008-11-22 22:10:10 UTC (rev 1266)
+++ trunk/src/layout_image.c    2008-11-22 22:43:18 UTC (rev 1267)
@@ -1596,14 +1596,39 @@
        for (i = 0; i < n; i++)
                if (!lw->split_images[i])
                        {
+                       FileData *img_fd = NULL;
+                       double zoom = 0.0;
+
                        layout_image_new(lw, i);
                        image_set_frame(lw->split_images[i], frame);
                        image_set_selectable(lw->split_images[i], 1);
-                       if (lw->image)
+
+                       if (layout_selection_count(lw, 0) > 1)
                                {
+                               GList *work = layout_selection_list(lw);
+                               gint j = 0;
+
+                               while (work && j < i)
+                                       {
+                                       FileData *fd = work->data;
+                                       work = work->next;
+                                       
+                                       j++;
+                                       if (!fd || !*fd->path) continue;
+                                       img_fd = fd;
+                                       }
+                               }
+
+                       if (!img_fd && lw->image)
+                               {
+                               img_fd = image_get_fd(lw->image);
+                               zoom = image_zoom_get(lw->image);
+                               }
+
+                       if (img_fd)
+                               {
                                gdouble sx, sy;
-                               image_change_fd(lw->split_images[i],
-                                       image_get_fd(lw->image), 
image_zoom_get(lw->image));
+                               image_change_fd(lw->split_images[i], img_fd, 
zoom);
                                image_get_scroll_center(lw->image, &sx, &sy);
                                image_set_scroll_center(lw->split_images[i], 
sx, sy);
                                }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn

Reply via email to