Changeset 3876

Show
Ignore:
Timestamp:
03/04/06 18:37:34 (3 years ago)
Author:
morris
Message:

Add option to set fullscreen background color

Files:

Legend:

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

    r3295 r3876  
    1111"\"%@\"" = "\"%@\""; 
    1212 
    13 /* No comment provided by engineer. */ 
     13/* Color black */ 
     14"Black" = "Black"; 
     15 
     16/* Error message */ 
    1417"error opening image" = "error opening image"; 
     18 
     19/* Color gray */ 
     20"Gray" = "Gray"; 
    1521 
    1622/* 'image' singular */ 
     
    2935"Screen %u, %.0fx%.0f" = "Screen %1$u, %2$.0fx%3$.0f"; 
    3036 
     37/* Color white */ 
     38"White" = "White"; 
     39 
  • Footagehead/trunk/English.lproj/MainMenu.nib/classes.nib

    r3875 r3876  
    4646                "_screenAutoSwitchButton" = NSButton;  
    4747                "_screenAutoSwitchTextField" = NSTextField;  
     48                "_screenBackgroundPopUpButton" = NSPopUpButton;  
    4849                "_screenPanel" = NSPanel;  
    4950                "_screenPopUpButton" = NSPopUpButton;  
  • Footagehead/trunk/English.lproj/MainMenu.nib/info.nib

    r3875 r3876  
    1818        <key>IBOpenObjects</key> 
    1919        <array> 
     20                <integer>438</integer> 
    2021                <integer>21</integer> 
    2122        </array> 
  • Footagehead/trunk/English.lproj/ReleaseNotes.rtf

    r3387 r3876  
    1 {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf230 
     1{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf330 
    22{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;\f2\fswiss\fcharset77 Helvetica-Oblique; 
    33} 
     
    7474\cf2 1.2 
    7575\f1\b0 \cf0 \ 
     76- Make binary universal\ 
    7677- Improved performance of loading and displaying all images\ 
    7778- Multithreaded preloading of next few images\ 
     
    8081- RSS/Atom stream support\ 
    8182- Zoom command\ 
     83- Option to set background color in fullscreen mode\ 
    8284- Improvements to RAR/Zip handling\ 
    8385- Automatic detection of added/removed/renamed files and folders\ 
    8486- Deprecate Mac OS X 10.2 support\ 
    85 - Universal binary\ 
    8687 
    8788\f0\b \cf2 \ 
  • Footagehead/trunk/FHController.h

    r3875 r3876  
    5555        IBOutlet NSPanel                                *_screenPanel; 
    5656        IBOutlet NSPopUpButton                  *_screenPopUpButton; 
     57        IBOutlet NSPopUpButton                  *_screenBackgroundPopUpButton; 
    5758        IBOutlet NSButton                               *_screenAutoSwitchButton; 
    5859        IBOutlet NSTextField                    *_screenAutoSwitchTextField; 
  • Footagehead/trunk/FHController.m

    r3875 r3876  
    5858- (void)_reloadPathMenu; 
    5959- (void)_reloadScreens; 
     60- (void)_reloadScreenBackgrounds; 
    6061 
    6162- (void)_startSpinning; 
     
    408409                                // --- display error in window mode 
    409410                                [_imageView setImage:[FHImage imageNamed:@"Error"]]; 
    410                                 [_rightStatusTextField setStringValue:[NSSWF:NSLS(@"error opening image", @"")]]; 
     411                                [_rightStatusTextField setStringValue:[NSSWF:NSLS(@"error opening image", @"Error message")]]; 
    411412                        } 
    412413                } 
     
    598599 
    599600 
     601- (void)_reloadScreenBackgrounds { 
     602        NSMenuItem              *item; 
     603         
     604        [_screenBackgroundPopUpButton removeAllItems]; 
     605         
     606        item = [[NSMenuItem alloc] initWithTitle:NSLS(@"Black", @"Color black") action:NULL keyEquivalent:@""]; 
     607        [item setImage:[NSImage imageNamed:@"Black"]]; 
     608        [item setRepresentedObject:[NSColor blackColor]]; 
     609        [item setTag:FHBackgroundBlack]; 
     610        [[_screenBackgroundPopUpButton menu] addItem:item]; 
     611        [item release]; 
     612         
     613        item = [[NSMenuItem alloc] initWithTitle:NSLS(@"Gray", @"Color gray") action:NULL keyEquivalent:@""]; 
     614        [item setImage:[NSImage imageNamed:@"Gray"]]; 
     615        [item setRepresentedObject:[NSColor grayColor]]; 
     616        [item setTag:FHBackgroundGray]; 
     617        [[_screenBackgroundPopUpButton menu] addItem:item]; 
     618        [item release]; 
     619         
     620        item = [[NSMenuItem alloc] initWithTitle:NSLS(@"White", @"Color white") action:NULL keyEquivalent:@""]; 
     621        [item setImage:[NSImage imageNamed:@"White"]]; 
     622        [item setRepresentedObject:[NSColor whiteColor]]; 
     623        [item setTag:FHBackgroundWhite]; 
     624        [[_screenBackgroundPopUpButton menu] addItem:item]; 
     625        [item release]; 
     626} 
     627 
     628 
     629 
    600630#pragma mark - 
    601631 
     
    775805        if([FHSettings intForKey:FHScreen] < [_screenPopUpButton numberOfItems]) 
    776806                [_screenPopUpButton selectItemAtIndex:[FHSettings intForKey:FHScreen]]; 
     807         
     808        [self _reloadScreenBackgrounds]; 
     809 
     810        [_screenBackgroundPopUpButton selectItemWithTag:[FHSettings intForKey:FHBackground]]; 
    777811 
    778812        [_screenAutoSwitchButton setState:[FHSettings boolForKey:FHAutoSwitch]]; 
     
    781815         
    782816        [_imageView setImageScaling:[FHSettings intForKey:FHImageScaling]]; 
    783         [_fullscreenImageView setBackgroundColor:[NSColor blackColor]]; 
    784817 
    785818        // --- create locks 
     
    13671400           modalForWindow:[self window] 
    13681401                modalDelegate:self 
    1369            didEndSelector:@selector(screenPanelDidEnd:returnCode:contextInfo:) 
     1402           didEndSelector:@selector(slideshowPanelDidEnd:returnCode:contextInfo:) 
    13701403                  contextInfo:NULL]; 
    13711404} 
     
    13731406 
    13741407 
    1375 - (void)screenPanelDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo { 
     1408- (void)slideshowPanelDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo { 
    13761409        NSScreen                *screen; 
    13771410        NSRect                  screenRect; 
     
    13831416                // --- save in prefs 
    13841417                [FHSettings setInt:[_screenPopUpButton indexOfSelectedItem] forKey:FHScreen]; 
     1418                [FHSettings setInt:[_screenBackgroundPopUpButton tagOfSelectedItem] forKey:FHBackground]; 
    13851419                [FHSettings setBool:[_screenAutoSwitchButton state] forKey:FHAutoSwitch]; 
    13861420                [FHSettings setInt:[_screenAutoSwitchTextField intValue] forKey:FHAutoSwitchTime]; 
     
    14071441                [_fullscreenWindow setDelegate:self]; 
    14081442                [_fullscreenWindow setReleasedWhenClosed:YES]; 
    1409                 [_fullscreenWindow setBackgroundColor:[NSColor blackColor]]; 
    14101443                [_fullscreenWindow setTitle:[[self window] title]]; 
     1444                [_fullscreenImageView setBackgroundColor:[_screenBackgroundPopUpButton representedObjectOfSelectedItem]]; 
    14111445                [_fullscreenPanel setFrame:screenRect display:NO]; 
    14121446                [_fullscreenWindow setContentView:[[_fullscreenPanel contentView] retain]]; 
  • Footagehead/trunk/FHFileHandler.m

    r3400 r3876  
    136136                        path = [_rootPath stringByAppendingPathComponent:name]; 
    137137                         
    138                         if([name hasPrefix:@"."]
     138                        if([name hasPrefix:@"."]
    139139                                continue; 
    140140                         
  • Footagehead/trunk/FHSettings.h

    r3400 r3876  
    3232#define FHScreen                                        @"FHScreen" 
    3333#define FHImageScaling                          @"FHImageScaling" 
     34#define FHBackground                            @"FHBackground" 
     35#define FHBackgroundBlack                               0 
     36#define FHBackgroundGray                                1 
     37#define FHBackgroundWhite                               2 
    3438#define FHAutoSwitch                            @"FHAutoSwitch" 
    3539#define FHAutoSwitchTime                        @"FHAutoSwitchTime" 
  • Footagehead/trunk/FHSettings.m

    r3400 r3876  
    4040                [NSNumber numberWithInt:NSScaleProportionally], 
    4141                        FHImageScaling, 
     42                [NSNumber numberWithInt:FHBackgroundBlack], 
     43                        FHBackground, 
    4244                [NSNumber numberWithBool:NO], 
    4345                        FHAutoSwitch, 
  • Footagehead/trunk/Footagehead.xcodeproj/project.pbxproj

    r3544 r3876  
    141141                A587DF83055AA418005D2097 /* FHController.m in Sources */ = {isa = PBXBuildFile; fileRef = A587DF79055AA418005D2097 /* FHController.m */; }; 
    142142                A587DF85055AA418005D2097 /* FHSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = A587DF7B055AA418005D2097 /* FHSettings.m */; }; 
     143                A58BE56909BA054F00C3C20D /* Black.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A58BE56609BA054F00C3C20D /* Black.tiff */; }; 
     144                A58BE56A09BA054F00C3C20D /* White.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A58BE56709BA054F00C3C20D /* White.tiff */; }; 
     145                A58BE56B09BA054F00C3C20D /* Gray.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A58BE56809BA054F00C3C20D /* Gray.tiff */; }; 
    143146                A599A110075F94F400A03BA5 /* FHFileCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A599A10E075F94F400A03BA5 /* FHFileCell.m */; }; 
    144147                A5B1F611067B3AA100111D0A /* FHHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = A5B1F60F067B3AA100111D0A /* FHHandler.m */; }; 
     
    420423                A587DF7B055AA418005D2097 /* FHSettings.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = FHSettings.m; sourceTree = "<group>"; }; 
    421424                A587DF7D055AA418005D2097 /* FHController.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = FHController.h; sourceTree = "<group>"; }; 
     425                A58BE56609BA054F00C3C20D /* Black.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Black.tiff; sourceTree = "<group>"; }; 
     426                A58BE56709BA054F00C3C20D /* White.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = White.tiff; sourceTree = "<group>"; }; 
     427                A58BE56809BA054F00C3C20D /* Gray.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Gray.tiff; sourceTree = "<group>"; }; 
    422428                A591E22C056686CB00215980 /* prefix.pch */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = prefix.pch; sourceTree = "<group>"; }; 
    423429                A599A10D075F94F400A03BA5 /* FHFileCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FHFileCell.h; sourceTree = "<group>"; }; 
     
    660666                                29B97318FDCFA39411CA2CEA /* MainMenu.nib */, 
    661667                                A51395F405771ED4007FE220 /* Footagehead.icns */, 
    662                                 A587DF6E055AA3C4005D2097 /* Delete.tiff */, 
     668                                A58BE56609BA054F00C3C20D /* Black.tiff */, 
     669                                A58BE56709BA054F00C3C20D /* White.tiff */, 
    663670                                A52DF8F50566E76000D2BE94 /* Error.tiff */, 
    664671                                A587DF6F055AA3C4005D2097 /* Finder.tiff */, 
    665672                                A5DEB66F05CBEFD30074DA63 /* Fullscreen.tiff */, 
     673                                A58BE56809BA054F00C3C20D /* Gray.tiff */, 
    666674                                A583338D069E30D100D6A96D /* Reload.tiff */, 
    667675                                A50933FA083F5141006646D1 /* Spotlight.tiff */, 
    668676                                A587DF70055AA3C4005D2097 /* Up.tiff */, 
    669677                                A5DE34850567F307003E7FE9 /* URL.tiff */, 
     678                                A587DF6E055AA3C4005D2097 /* Delete.tiff */, 
    670679                                77EA9C1508460B9C006C9F69 /* Zoom.tiff */, 
    671680                        ); 
     
    11761185                                A5DE34860567F307003E7FE9 /* URL.tiff in Resources */, 
    11771186                                77EA9C1608460B9C006C9F69 /* Zoom.tiff in Resources */, 
     1187                                A58BE56909BA054F00C3C20D /* Black.tiff in Resources */, 
     1188                                A58BE56A09BA054F00C3C20D /* White.tiff in Resources */, 
     1189                                A58BE56B09BA054F00C3C20D /* Gray.tiff in Resources */, 
    11781190                        ); 
    11791191                        runOnlyForDeploymentPostprocessing = 0; 
  • Footagehead/trunk/Japanese.lproj/Localizable.strings

    r3295 r3876  
    1111"\"%@\"" = "“%@”"; 
    1212 
    13 /* No comment provided by engineer. */ 
     13/* Color black */ 
     14"Black" = "黒"; 
     15 
     16/* Error message */ 
    1417"error opening image" = "エラーがあってイメージを開けません"; 
     18 
     19/* Color gray */ 
     20"Gray" = "灰色"; 
    1521 
    1622/* 'image' singular */ 
     
    2834/* 'Screen 1, 1024x768' */ 
    2935"Screen %u, %.0fx%.0f" = "ディスプレイ %1$u, %2$.0fx%3$.0f"; 
     36 
     37/* Color white */ 
     38"White" = "白"; 
  • Footagehead/trunk/Japanese.lproj/MainMenu.nib/classes.nib

    r3407 r3876  
    4646                "_screenAutoSwitchButton" = NSButton;  
    4747                "_screenAutoSwitchTextField" = NSTextField;  
     48                "_screenBackgroundPopUpButton" = NSPopUpButton;  
    4849                "_screenPanel" = NSPanel;  
    4950                "_screenPopUpButton" = NSPopUpButton;  
     
    5152                "_splitView" = WISplitView;  
    5253                "_tableView" = WITableView;  
     54                "_zoomButton" = NSButton;  
    5355            };  
    5456            SUPERCLASS = WIWindowController;  
  • Footagehead/trunk/Japanese.lproj/MainMenu.nib/info.nib

    r3407 r3876  
    44<dict> 
    55        <key>IBDocumentLocation</key> 
    6         <string>59 235 395 374 0 0 1152 746 </string> 
     6        <string>1464 275 395 374 1280 0 1280 1024 </string> 
    77        <key>IBEditorPositions</key> 
    88        <dict> 
     
    1616        <key>IBOpenObjects</key> 
    1717        <array> 
     18                <integer>534</integer> 
    1819                <integer>571</integer> 
     20                <integer>29</integer> 
     21                <integer>438</integer> 
    1922                <integer>21</integer> 
    20                 <integer>29</integer> 
    21                 <integer>534</integer> 
    2223        </array> 
    2324        <key>IBSystem Version</key> 
    24         <string>8F46</string> 
     25        <string>8H14</string> 
    2526</dict> 
    2627</plist>