Changeset 576 for trunk


Ignore:
Timestamp:
08/03/09 08:10:13 (10 years ago)
Author:
Nicholas Riley
Message:

NJRQTMediaPopUpButton.m: Hide extension on system sounds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/Pester/Source/NJRQTMediaPopUpButton.m

    r560 r576  
    139139        NSDirectoryEnumerator *de = [fm enumeratorAtPath: folderPath];
    140140        NSString *path;
     141        NSString *displayName;
    141142        while ( (path = [de nextObject]) != nil) {
    142143            BOOL isDir;
     
    148149            if (![QTMovie canInitWithFile: path]) continue;
    149150           
    150             item = [menu addItemWithTitle: [fm displayNameAtPath: path]
     151            displayName = [fm displayNameAtPath: path];
     152            if ([[NSNumber numberWithBool: NO] isEqualTo: [[de fileAttributes] objectForKey: NSFileExtensionHidden]])
     153                displayName = [displayName stringByDeletingPathExtension];
     154
     155            item = [menu addItemWithTitle: displayName
    151156                                   action: @selector(_systemSoundSelected:)
    152157                            keyEquivalent: @""];
Note: See TracChangeset for help on using the changeset viewer.