<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -70,7 +70,9 @@ var LEFT_SHADOW_INSET       = 3.0,
     
     BOOL            _hasShadow;
     CPView          _shadowView;
-    
+
+    BOOL            _isEditable;
+
     CGRect          _imageRect;
 }
 
@@ -339,11 +341,47 @@ var LEFT_SHADOW_INSET       = 3.0,
     [[self nextResponder] mouseDown:anEvent];
 }
 
+- (void)setEditable:(BOOL)shouldBeEditable
+{
+    if (_isEditable === shouldBeEditable)
+        return _isEditable;
+
+    _isEditable = shouldBeEditable;
+
+    if (_isEditable)
+        [self registerForDraggedTypes:[CPImagesPboardType]];
+
+    else
+    {
+        var draggedTypes = [self registeredDraggedTypes];
+
+        [self unregisterDraggedTypes];
+
+        [draggedTypes removeObjectIdenticalTo:CPImagesPboardType];
+
+        [self registerForDraggedTypes:draggedTypes];
+    }
+}
+
+- (BOOL)isEditable
+{
+    return _isEditable;
+}
+
+- (void)performDragOperation:(CPDraggingInfo)aSender
+{
+    var images = [CPKeyedUnarchiver unarchiveObjectWithData:[[aSender draggingPasteboard] dataForType:CPImagesPboardType]];
+
+    if ([images count])
+        [self setImage:images[0]];
+}
+
 @end
 
 var CPImageViewImageKey         = @&quot;CPImageViewImageKey&quot;,
     CPImageViewImageScalingKey  = @&quot;CPImageViewImageScalingKey&quot;,
-    CPImageViewHasShadowKey     = @&quot;CPImageViewHasShadowKey&quot;;
+    CPImageViewHasShadowKey     = @&quot;CPImageViewHasShadowKey&quot;,
+    CPImageViewIsEditableKey    = @&quot;CPImageViewIsEditableKey&quot;;
 
 @implementation CPImageView (CPCoding)
 
@@ -372,6 +410,9 @@ var CPImageViewImageKey         = @&quot;CPImageViewImageKey&quot;,
 
         [self setHasShadow:[aCoder decodeBoolForKey:CPImageViewHasShadowKey]];
         
+        if ([aCoder decodeBoolForKey:CPImageViewIsEditableKey] || NO)
+            [self setEditable:YES];
+
         [self setNeedsLayout];
         [self setNeedsDisplay:YES];
     }
@@ -402,6 +443,9 @@ var CPImageViewImageKey         = @&quot;CPImageViewImageKey&quot;,
         _subviews = actualSubviews;
     
     [aCoder encodeBool:_hasShadow forKey:CPImageViewHasShadowKey];
+
+    if (_isEditable)
+        [aCoder encodeBool:_isEditable forKey:CPImageViewIsEditableKey];
 }
 
 @end</diff>
      <filename>AppKit/CPImageView.j</filename>
    </modified>
    <modified>
      <diff>@@ -38,8 +38,12 @@ CPFontPboardType        = @&quot;CPFontPboardType&quot;;
 CPHTMLPboardType        = @&quot;CPHTMLPboardType&quot;;
 CPStringPboardType      = @&quot;CPStringPboardType&quot;;
 CPURLPboardType         = @&quot;CPURLPboardType&quot;;
+CPImagesPboardType      = @&quot;CPImagesPboardType&quot;;
+CPVideosPboardType      = @&quot;CPVideosPboardType&quot;;
+
+// Deprecated
 CPImagePboardType       = @&quot;CPImagePboardType&quot;;
-CPVideoPboardType       = @&quot;CPVideoPboardType&quot;;
+
 
 var CPPasteboards = nil;
 </diff>
      <filename>AppKit/CPPasteboard.j</filename>
    </modified>
    <modified>
      <diff>@@ -1465,7 +1465,7 @@ setBoundsOrigin:
 */
 - (void)registerForDraggedTypes:(CPArray)pasteboardTypes
 {
-    if (!pasteboardTypes)
+    if (!pasteboardTypes || ![pasteboardTypes count])
         return;
 
     var theWindow = [self window];</diff>
      <filename>AppKit/CPView.j</filename>
    </modified>
    <modified>
      <diff>@@ -545,6 +545,8 @@ module ObjectiveJ
                         
                         list.each do |fileName|
                         
+                            fileName = File.expand_path(fileName)
+
                             File.open(fileName) do |file|
                             
                                 if fileName.index(platform_absolute_path) == 0</diff>
      <filename>Tools/Rake/lib/objective-j/bundletask.rb</filename>
    </modified>
    <modified>
      <diff>@@ -34,6 +34,7 @@
         var cell = [aCoder decodeObjectForKey:@&quot;NSCell&quot;];
         
         _imageScaling = [cell imageScaling];
+        _isEditable = [cell isEditable];
     }
     
     return self;</diff>
      <filename>Tools/nib2cib/NSImageView.j</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6cab77e005333413f3c6c31e0835c29df8fc3723</id>
    </parent>
  </parents>
  <author>
    <name>Francisco Ryan Tolmasky I</name>
    <email>francisco@280north.com</email>
  </author>
  <url>http://github.com/280north/cappuccino/commit/eab4f4bf780e8d07d82a711f822f8bf70cc18899</url>
  <id>eab4f4bf780e8d07d82a711f822f8bf70cc18899</id>
  <committed-date>2009-06-09T15:36:53-07:00</committed-date>
  <authored-date>2009-06-09T15:36:53-07:00</authored-date>
  <message>Made CPImageView accept image drag and drop.

Reviewed by me.</message>
  <tree>ed3aa024b31b12d8c311a160a890f4fc77f04df6</tree>
  <committer>
    <name>Francisco Ryan Tolmasky I</name>
    <email>francisco@280north.com</email>
  </committer>
</commit>
