gimp r26864 - trunk/app/display



Author: neo
Date: Thu Sep  4 15:45:23 2008
New Revision: 26864
URL: http://svn.gnome.org/viewvc/gimp?rev=26864&view=rev

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

	* app/display/gimpdisplayshell-dnd.c
	(gimp_display_shell_drop_drawable) 
(gimp_display_shell_drop_pixbuf):
	handle drops on the empty image window.



Modified:
   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	Thu Sep  4 15:45:23 2008
@@ -187,7 +187,14 @@
     return;
 
   if (! image)
-    return;
+    {
+      image = gimp_image_new (shell->display->gimp,
+                              gimp_item_width (GIMP_ITEM (viewable)),
+                              gimp_item_height (GIMP_ITEM (viewable)),
+                              GIMP_RGB);
+
+      gimp_create_display (image->gimp, image, GIMP_UNIT_PIXEL, 1.0);
+    }
 
   if (GIMP_IS_LAYER (viewable))
     new_type = G_TYPE_FROM_INSTANCE (viewable);
@@ -560,7 +567,14 @@
     return;
 
   if (! image)
-    return;
+    {
+      image = gimp_image_new (shell->display->gimp,
+                              gdk_pixbuf_get_width (pixbuf),
+                              gdk_pixbuf_get_height (pixbuf),
+                              GIMP_RGB);
+      
+      gimp_create_display (image->gimp, image, GIMP_UNIT_PIXEL, 1.0);
+    }
 
   new_layer =
     gimp_layer_new_from_pixbuf (pixbuf, image,



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