gimp r27554 - in trunk: . app/display



Author: neo
Date: Tue Nov  4 22:32:15 2008
New Revision: 27554
URL: http://svn.gnome.org/viewvc/gimp?rev=27554&view=rev

Log:
2008-11-04  Sven Neumann  <sven gimp org>

	* app/display/gimpdisplayshell-dnd.c
	(gimp_display_shell_drop_uri_list): when dropping multiple 
images
	to the empty image window, open them as seperate images.



Modified:
   trunk/ChangeLog
   trunk/app/display/gimpdisplayshell-dnd.c

Modified: trunk/app/display/gimpdisplayshell-dnd.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-dnd.c	(original)
+++ trunk/app/display/gimpdisplayshell-dnd.c	Tue Nov  4 22:32:15 2008
@@ -462,9 +462,12 @@
   GimpImage        *image   = shell->display->image;
   GimpContext      *context = gimp_get_user_context (shell->display->gimp);
   GList            *list;
+  gboolean          open_as_layers;
 
   GIMP_LOG (DND, NULL);
 
+  open_as_layers = (shell->display->image != NULL);
+
   for (list = uri_list; list; list = g_list_next (list))
     {
       const gchar       *uri   = list->data;
@@ -472,17 +475,7 @@
       GError            *error = NULL;
       gboolean           warn  = FALSE;
 
-      if (! shell->display->image)
-        {
-          image = file_open_with_display (shell->display->gimp, context,
-                                          GIMP_PROGRESS (shell->display),
-                                          uri, FALSE,
-                                          &status, &error);
-
-          if (! image && status != GIMP_PDB_CANCEL)
-            warn = TRUE;
-        }
-      else
+      if (open_as_layers)
         {
           GList *new_layers;
 
@@ -511,6 +504,30 @@
               warn = TRUE;
             }
         }
+      else if (shell->display->image)
+        {
+          /*  open any subsequent images in a new display  */
+          GimpImage *new_image;
+
+          new_image = file_open_with_display (shell->display->gimp, context,
+                                              NULL,
+                                              uri, FALSE,
+                                              &status, &error);
+
+          if (! new_image && status != GIMP_PDB_CANCEL)
+            warn = TRUE;
+        }
+      else
+        {
+          /*  open the first image in the empty display  */
+          image = file_open_with_display (shell->display->gimp, context,
+                                          GIMP_PROGRESS (shell->display),
+                                          uri, FALSE,
+                                          &status, &error);
+
+          if (! image && status != GIMP_PDB_CANCEL)
+            warn = TRUE;
+        }
 
       if (warn)
         {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]