gimp r27555 - in branches/gimp-2-6: . app/display



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

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

 	Merged from trunk:

	* 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:
   branches/gimp-2-6/ChangeLog
   branches/gimp-2-6/app/display/gimpdisplayshell-dnd.c

Modified: branches/gimp-2-6/app/display/gimpdisplayshell-dnd.c
==============================================================================
--- branches/gimp-2-6/app/display/gimpdisplayshell-dnd.c	(original)
+++ branches/gimp-2-6/app/display/gimpdisplayshell-dnd.c	Tue Nov  4 22:34:45 2008
@@ -461,9 +461,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;
@@ -471,17 +474,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;
 
@@ -510,6 +503,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]