Changeset 4180

Show
Ignore:
Timestamp:
06/02/06 17:30:31 (2 years ago)
Author:
morris
Message:

Allow dragging from files window to the finder, thanks sdz

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredClient/trunk/English.lproj/Files.nib/classes.nib

    r3985 r4180  
    6565            SUPERCLASS = WCConnectionController;  
    6666        },  
     67        {CLASS = WCFilesTableView; LANGUAGE = ObjC; SUPERCLASS = WITableView; },  
    6768        { 
    6869            ACTIONS = {showViewOptions = id; };  
  • WiredClient/trunk/English.lproj/Files.nib/info.nib

    r4146 r4180  
    88        <dict> 
    99                <key>161</key> 
    10                 <string>519 158 104 99 0 0 1280 1002 </string> 
     10                <string>801 189 104 99 0 0 1920 1178 </string> 
    1111                <key>190</key> 
    1212                <string>844 570 190 49 0 0 1920 1178 </string> 
     
    1818        <key>IBOpenObjects</key> 
    1919        <array> 
     20                <integer>52</integer> 
     21                <integer>161</integer> 
    2022                <integer>5</integer> 
    21                 <integer>161</integer> 
    22                 <integer>52</integer> 
    2323        </array> 
    2424        <key>IBSystem Version</key> 
  • WiredClient/trunk/English.lproj/ReleaseNotes.rtf

    r4170 r4180  
    22{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} 
    33{\colortbl;\red255\green255\blue255;\red126\green126\blue126;} 
    4 \vieww9000\viewh8400\viewkind0 
    54\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural 
    65 
     
    3635- Can now save chat as RTF, and select encoding when saving as plain text\ 
    3736- Add option to show a dialog for messages and broadcasts\ 
     37- Can now drag from the files window directly to the Finder\ 
    3838- Show tooltips in user list\ 
    3939- Make sure find panel is enabled for all relevant text views\ 
  • WiredClient/trunk/French.lproj/Files.nib/classes.nib

    r4147 r4180  
    6565            SUPERCLASS = WCConnectionController;  
    6666        },  
     67        {CLASS = WCFilesTableView; LANGUAGE = ObjC; SUPERCLASS = WITableView; },  
    6768        { 
    6869            ACTIONS = {showViewOptions = id; };  
  • WiredClient/trunk/Japanese.lproj/Files.nib/classes.nib

    r4143 r4180  
    6565            SUPERCLASS = WCConnectionController;  
    6666        },  
     67        {CLASS = WCFilesTableView; LANGUAGE = ObjC; SUPERCLASS = WITableView; },  
    6768        { 
    6869            ACTIONS = {showViewOptions = id; };  
  • WiredClient/trunk/Japanese.lproj/Files.nib/info.nib

    r4146 r4180  
    1616        <key>IBOldestOS</key> 
    1717        <integer>3</integer> 
     18        <key>IBOpenObjects</key> 
     19        <array> 
     20                <integer>5</integer> 
     21        </array> 
    1822        <key>IBSystem Version</key> 
    1923        <string>8I127</string> 
  • WiredClient/trunk/WCFiles.m

    r4104 r4180  
    12341234 
    12351235        [pasteboard declareTypes:[NSArray arrayWithObjects: 
    1236                 WCFilePboardType, NSStringPboardType, NULL] owner:NULL]; 
     1236                WCFilePboardType, NSStringPboardType, NSFilesPromisePboardType, NULL] owner:NULL]; 
    12371237        [pasteboard setData:[NSArchiver archivedDataWithRootObject:sources] forType:WCFilePboardType]; 
    12381238        [pasteboard setString:string forType:NSStringPboardType]; 
     1239        [pasteboard setPropertyList:[NSArray arrayWithObject:NSFileTypeForHFSTypeCode('\0\0\0\0')] forType:NSFilesPromisePboardType]; 
    12391240 
    12401241        return YES; 
  • WiredClient/trunk/WCTransfers.h

    r3598 r4180  
    6060+ (id)transfersWithConnection:(WCServerConnection *)connection; 
    6161 
    62 - (void)downloadFile:(WCFile *)file; 
    63 - (void)previewFile:(WCFile *)file; 
    64 - (void)uploadPath:(NSString *)path toFolder:(WCFile *)destination; 
     62- (BOOL)downloadFile:(WCFile *)file; 
     63- (BOOL)downloadFile:(WCFile *)file toFolder:(NSString *)destination; 
     64- (BOOL)previewFile:(WCFile *)file; 
     65- (BOOL)uploadPath:(NSString *)path toFolder:(WCFile *)destination; 
    6566 
    6667- (IBAction)start:(id)sender; 
  • WiredClient/trunk/WCTransfers.m

    r4084 r4180  
    7272- (void)_finishTransfer:(WCTransfer *)transfer; 
    7373 
    74 - (void)_downloadFile:(WCFile *)file preview:(BOOL)preview; 
    75 - (void)_uploadPath:(NSString *)path toFolder:(WCFile *)destination; 
     74- (BOOL)_downloadFile:(WCFile *)file toFolder:(NSString *)destination preview:(BOOL)preview; 
     75- (BOOL)_uploadPath:(NSString *)path toFolder:(WCFile *)destination; 
    7676 
    7777- (void)_runDownload:(WCTransfer *)transfer; 
     
    501501#pragma mark - 
    502502 
    503 - (void)_downloadFile:(WCFile *)file preview:(BOOL)preview { 
    504         NSString                        *destination, *path; 
     503- (BOOL)_downloadFile:(WCFile *)file toFolder:(NSString *)destination preview:(BOOL)preview { 
     504        NSString                        *path; 
    505505        WIURL                           *url; 
    506506        WCTransfer                      *transfer; 
     
    513513                [self _presentError:error]; 
    514514                 
    515                 return; 
    516         } 
    517  
    518         if(preview) { 
    519                 destination             = NSTemporaryDirectory(); 
    520                 path                    = [destination stringByAppendingPathComponent:[file name]]; 
    521         } else { 
    522                 destination             = [[WCSettings objectForKey:WCDownloadFolder] stringByStandardizingPath]; 
    523                 path                    = [destination stringByAppendingPathComponent:[file name]]; 
    524         } 
     515                return NO; 
     516        } 
     517 
     518        path = [destination stringByAppendingPathComponent:[file name]]; 
    525519         
    526520        if([[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&isDirectory]) { 
     
    529523                        [self _presentError:error]; 
    530524 
    531                         return
     525                        return NO
    532526                } 
    533527        } 
     
    573567         
    574568        [_transfersTableView reloadData]; 
    575 
    576  
    577  
    578  
    579 - (void)_uploadPath:(NSString *)path toFolder:(WCFile *)destination { 
     569         
     570        return YES; 
     571
     572 
     573 
     574 
     575- (BOOL)_uploadPath:(NSString *)path toFolder:(WCFile *)destination { 
    580576        NSEnumerator            *enumerator; 
    581577        NSString                        *eachPath, *remotePath, *localPath, *serverPath, *resourceForkPath = NULL; 
     
    591587                [self _presentError:error]; 
    592588                 
    593                 return
     589                return NO
    594590        } 
    595591 
     
    673669         
    674670        [_transfersTableView reloadData]; 
     671         
     672        return YES; 
    675673} 
    676674 
     
    14071405#pragma mark - 
    14081406 
    1409 - (void)downloadFile:(WCFile *)file { 
    1410         [self _downloadFile:file preview:NO]; 
    1411 
    1412  
    1413  
    1414  
    1415 - (void)previewFile:(WCFile *)file { 
    1416         [self _downloadFile:file preview:YES]; 
    1417 
    1418  
    1419  
    1420  
    1421 - (void)uploadPath:(NSString *)path toFolder:(WCFile *)destination { 
    1422         [self _uploadPath:path toFolder:destination]; 
     1407- (BOOL)downloadFile:(WCFile *)file { 
     1408        return [self _downloadFile:file toFolder:[[WCSettings objectForKey:WCDownloadFolder] stringByStandardizingPath] preview:NO]; 
     1409
     1410 
     1411 
     1412 
     1413- (BOOL)downloadFile:(WCFile *)file toFolder:(NSString *)destination { 
     1414        return [self _downloadFile:file toFolder:destination preview:NO]; 
     1415
     1416 
     1417 
     1418 
     1419- (BOOL)previewFile:(WCFile *)file { 
     1420        return [self _downloadFile:file toFolder:NSTemporaryDirectory() preview:YES]; 
     1421
     1422 
     1423 
     1424 
     1425- (BOOL)uploadPath:(NSString *)path toFolder:(WCFile *)destination { 
     1426        return [self _uploadPath:path toFolder:destination]; 
    14231427} 
    14241428 
  • WiredClient/trunk/WiredClient.xcodeproj/project.pbxproj

    r4156 r4180  
    7373                77B5F973097FDD4500C055E1 /* NSString-WCAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 77B5F971097FDD4500C055E1 /* NSString-WCAdditions.m */; }; 
    7474                77E170E90980F3120044D290 /* NSNotificationCenter-WCAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 77E170E70980F3120044D290 /* NSNotificationCenter-WCAdditions.m */; }; 
     75                77E2888E0A2D9E9B00035403 /* WCFilesTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 77E2888C0A2D9E9B00035403 /* WCFilesTableView.m */; }; 
    7576                77E555BC075346E4009A7557 /* GreenDrop.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 77E555BB075346E4009A7557 /* GreenDrop.tiff */; }; 
    7677                77E555C5075346F3009A7557 /* YellowDrop.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 77E555C4075346F3009A7557 /* YellowDrop.tiff */; }; 
     
    321322                77E170E70980F3120044D290 /* NSNotificationCenter-WCAdditions.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = "NSNotificationCenter-WCAdditions.m"; sourceTree = "<group>"; }; 
    322323                77E170E80980F3120044D290 /* NSNotificationCenter-WCAdditions.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = "NSNotificationCenter-WCAdditions.h"; sourceTree = "<group>"; }; 
     324                77E2888C0A2D9E9B00035403 /* WCFilesTableView.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = WCFilesTableView.m; sourceTree = "<group>"; }; 
     325                77E2888D0A2D9E9B00035403 /* WCFilesTableView.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = WCFilesTableView.h; sourceTree = "<group>"; }; 
    323326                77E555BB075346E4009A7557 /* GreenDrop.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = GreenDrop.tiff; sourceTree = "<group>"; }; 
    324327                77E555C4075346F3009A7557 /* YellowDrop.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = YellowDrop.tiff; sourceTree = "<group>"; }; 
     
    800803                                777E65790740F34700A8DE0B /* WCFilesBrowserCell.m */, 
    801804                                777E65780740F34700A8DE0B /* WCFilesBrowserCell.h */, 
     805                                77E2888C0A2D9E9B00035403 /* WCFilesTableView.m */, 
     806                                77E2888D0A2D9E9B00035403 /* WCFilesTableView.h */, 
    802807                                A5DC7EF5057AAF6C00736BBF /* WCPreview.m */, 
    803808                                A5DC7F00057AAF6C00736BBF /* WCPreview.h */, 
     
    14171422                                A5DC7FCE057AB0F200736BBF /* WCApplication.m in Sources */, 
    14181423                                A5DC7EC8057AAEAD00736BBF /* WCApplicationController.m in Sources */, 
    1419                                 777E657B0740F34700A8DE0B /* WCFilesBrowserCell.m in Sources */, 
    14201424                                A57512EC05E4E64D003B51D7 /* WCCache.m in Sources */, 
    14211425                                A5DC7F25057AAFE100736BBF /* WCChat.m in Sources */, 
     
    14291433                                A5DC7F0C057AAF6C00736BBF /* WCFileInfo.m in Sources */, 
    14301434                                A5DC7F0E057AAF6C00736BBF /* WCFiles.m in Sources */, 
     1435                                777E657B0740F34700A8DE0B /* WCFilesBrowserCell.m in Sources */, 
     1436                                77E2888E0A2D9E9B00035403 /* WCFilesTableView.m in Sources */, 
    14311437                                A5A335EA071C484700A16E9A /* WCKeychain.m in Sources */, 
    14321438                                A57D217107C950BD002C306E /* WCLink.m in Sources */,