Changeset 4857

Show
Ignore:
Timestamp:
08/05/07 19:06:05 (1 year ago)
Author:
morris
Message:

Ask to delete immediately when a file system does not support moving to trash

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Footagehead/trunk/English.lproj/Localizable.strings

    r4732 r4857  
    2323"Actual Size" = "Actual Size"; 
    2424 
    25 /* Color black */ 
    26 "Black" = "Black"; 
     25/* Move to trash dialog button title */ 
     26"Cancel" = "Cancel"; 
    2727 
    28 /* Error message */ 
    29 "error opening image" = "error opening image"; 
     28/* Move to trash dialog message */ 
     29"Could not move to trash" = "Could not move to trash"; 
    3030 
    31 /* Color gray */ 
    32 "Gray" = "Gray"; 
     31/* Move to trash dialog button title */ 
     32"Delete" = "Delete"; 
     33 
     34/* Move to trash dialog description */ 
     35"Do you want to delete \"%@\" immediately?" = "Do you want to delete “%@” immediately?"; 
    3336 
    3437/* Menu item title */ 
     
    7780"Stretch To Fit" = "Stretch To Fit"; 
    7881 
    79 /* Color white */ 
    80 "White" = "White"; 
    81  
    8282/* Zoom to fit toolbar item */ 
    8383"Zoom To Fit" = "Zoom To Fit"; 
  • Footagehead/trunk/English.lproj/ReleaseNotes.rtf

    r4734 r4857  
    221221- Status bar can be hidden\ 
    222222- Add support for LHA/LZH formats\ 
     223- Ask to delete immediately when a file system does not support moving to trash\ 
    223224- Deprecate Mac OS X 10.3 support\ 
    224225 
  • Footagehead/trunk/FHBrowserController.m

    r4737 r4857  
    961961 
    962962- (void)moveToTrash:(id)sender { 
     963        NSAlert                 *alert; 
    963964        FHFile                  *file; 
    964965        NSInteger               row; 
    965966        NSUInteger              count; 
     967        BOOL                    result; 
    966968         
    967969        _deletingFile = YES; 
     
    970972        file = [self selectedFile]; 
    971973         
    972         [[NSWorkspace sharedWorkspace] 
     974        result = [[NSWorkspace sharedWorkspace] 
    973975                performFileOperation:NSWorkspaceRecycleOperation  
    974976                                          source:[[file path] stringByDeletingLastPathComponent] 
    975                                  destination:@"/
     977                                 destination:@"
    976978                                           files:[NSArray arrayWithObject:[file name]] 
    977979                                                 tag:NULL]; 
    978                  
    979         [_handler removeFile:file]; 
    980  
    981         count = [_handler numberOfFiles]; 
    982  
    983         if(count > 1 && (NSUInteger) row == count - 1) 
    984                 [_tableView selectRow:row - 1 byExtendingSelection:NO]; 
    985  
    986         [_tableView reloadData]; 
    987  
    988         [self showFile:[self selectedFile]]; 
     980         
     981        if(!result) { 
     982                alert = [NSAlert alertWithMessageText:NSLS(@"Could not move to trash", @"Move to trash dialog message") 
     983                                                                defaultButton:NSLS(@"Delete", @"Move to trash dialog button title") 
     984                                                          alternateButton:NSLS(@"Cancel", @"Move to trash dialog button title") 
     985                                                                  otherButton:NULL 
     986                                        informativeTextWithFormat:NSLS(@"Do you want to delete \"%@\" immediately?", @"Move to trash dialog description"), [file name]]; 
     987                 
     988                 
     989                if([alert runModal] == NSAlertDefaultReturn) 
     990                        result = [[NSFileManager defaultManager] removeFileAtPath:[file path]]; 
     991        } 
     992         
     993        if(result) { 
     994                [_handler removeFile:file]; 
     995 
     996                count = [_handler numberOfFiles]; 
     997 
     998                if(count > 1 && (NSUInteger) row == count - 1) 
     999                        [_tableView selectRow:row - 1 byExtendingSelection:NO]; 
     1000 
     1001                [_tableView reloadData]; 
     1002 
     1003                [self showFile:[self selectedFile]]; 
     1004        } 
    9891005} 
    9901006 
  • Footagehead/trunk/FHHTMLHandler.m

    r4726 r4857  
    7575- (id)initHandlerWithURL:(WIURL *)url HTML:(NSString *)html { 
    7676        NSString        *host; 
     77         
    7778        self = [super initHandlerWithURL:url]; 
    7879         
  • Footagehead/trunk/Japanese.lproj/Localizable.strings

    r4732 r4857  
    2323"Actual Size" = "Actual Size"; 
    2424 
    25 /* Color black */ 
    26 "Black" = "Black"; 
     25/* Move to trash dialog button title */ 
     26"Cancel" = "キャンセル"; 
    2727 
    28 /* Error message */ 
    29 "error opening image" = "error opening image"; 
     28/* Move to trash dialog message */ 
     29"Could not move to trash" = "ゴミ箱に移動することはできませんでした"; 
    3030 
    31 /* Color gray */ 
    32 "Gray" = "Gray"; 
     31/* Move to trash dialog button title */ 
     32"Delete" = "削除"; 
     33 
     34/* Move to trash dialog description */ 
     35"Do you want to delete \"%@\" immediately?" = "今すぐ“%@”を削除しますか?"; 
    3336 
    3437/* Menu item title */ 
     
    7780"Stretch To Fit" = "Stretch To Fit"; 
    7881 
    79 /* Color white */ 
    80 "White" = "White"; 
    81  
    8282/* Zoom to fit toolbar item */ 
    8383"Zoom To Fit" = "Zoom To Fit"; 
    84