Changeset 208

Show
Ignore:
Timestamp:
04/28/08 06:49:40 (8 months ago)
Author:
tal
Message:
Write to a property list to the pasteboard during drag instead of a string.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • packages/defconAppKit/trunk/Lib/defconAppKit/views/glyphCellView.py

    r196 r208  
    636636 
    637637    def _beginDrag(self, event): 
    638         s = " ".join([str(i) for i in sorted(self._selection)]) 
     638        indexes = [i for i in sorted(self._selection)] 
    639639        image = _makeGlyphCellDragIcon([self._glyphs[i] for i in self._selection]) 
    640640 
     
    646646        pboard = NSPasteboard.pasteboardWithName_(NSDragPboard) 
    647647        pboard.declareTypes_owner_([DefconAppKitGlyphPboardType], self) 
    648         pboard.setString_forType_(s, DefconAppKitGlyphPboardType) 
     648        pboard.setPropertyList_forType_(indexes, DefconAppKitGlyphPboardType) 
    649649 
    650650        self.dragImage_at_offset_event_pasteboard_source_slideBack_( 
     
    654654 
    655655    def getGlyphsFromDragPasteboard_(self, pboard): 
    656         indexes = pboard.stringForType_(DefconAppKitGlyphPboardType) 
    657         indexes = [int(i) for i in indexes.split(" ")] 
     656        indexes = pboard.propertyListForType_(DefconAppKitGlyphPboardType) 
    658657        glyphs = [self._glyphs[i] for i in indexes] 
    659658        return glyphs