Changeset 4704

Show
Ignore:
Timestamp:
04/21/07 15:20:47 (2 years ago)
Author:
morris
Message:

Batch commit of temporary work

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Footagehead/trunk/English.lproj/MainMenu.nib/info.nib

    r4465 r4704  
    1818        <key>IBOpenObjects</key> 
    1919        <array> 
    20                 <integer>29</integer> 
    2120                <integer>21</integer> 
    2221                <integer>302</integer> 
     22                <integer>29</integer> 
    2323        </array> 
    2424        <key>IBSystem Version</key> 
    25         <string>8L127</string> 
     25        <string>8P135</string> 
    2626</dict> 
    2727</plist> 
  • Footagehead/trunk/FHController.h

    r4465 r4704  
    2727 */ 
    2828 
     29@class FHWindowController; 
    2930@class FHImageView, FHFullscreenWindow; 
    3031@class FHHandler, FHFile; 
     
    7172        IBOutlet NSPanel                                *_openSpotlightPanel; 
    7273        IBOutlet NSTextView                             *_openSpotlightTextView; 
     74         
     75        FHWindowController                              *_windowController; 
    7376 
    7477        FHFullscreenWindow                              *_fullscreenWindow; 
    7578        FHHandler                                               *_handler; 
     79         
     80        NSMutableDictionary                             *_toolbarItems; 
    7681         
    7782        NSTimer                                                 *_loadImageTimer; 
  • Footagehead/trunk/FHController.m

    r4465 r4704  
    3838#import "FHSettings.h" 
    3939 
     40 
     41#import "FHWindowController.h" 
     42 
    4043#define FHUnloadImageCount                      5 
    4144#define FHPreloadImageCount                     10 
     
    7275- (void)_updateFullscreenStatus; 
    7376- (void)_updateTableView; 
     77 
     78- (NSToolbar *)_toolbar; 
    7479 
    7580- (void)_toggleStatusBar:(BOOL)show; 
     
    794799#pragma mark - 
    795800 
     801- (NSToolbar *)_toolbar { 
     802        NSToolbar               *toolbar; 
     803        NSToolbarItem   *item; 
     804        NSButton                *button; 
     805 
     806        _toolbarItems = [[NSMutableDictionary alloc] init]; 
     807 
     808        // --- news 
     809        item = [NSToolbarItem toolbarItemWithIdentifier:@"News" 
     810                                                                                           name:NSLS(@"News", @"News toolbar item") 
     811                                                                                        content:[NSImage imageNamed:@"News"] 
     812                                                                                         target:self 
     813                                                                                         action:@selector(news:)]; 
     814        [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 
     815 
     816        // --- messages 
     817        item = [NSToolbarItem toolbarItemWithIdentifier:@"Messages" 
     818                                                                                           name:NSLS(@"Messages", @"Messages toolbar item") 
     819                                                                                        content:[NSImage imageNamed:@"Messages"] 
     820                                                                                         target:self 
     821                                                                                         action:@selector(messages:)]; 
     822        [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 
     823 
     824        // --- files 
     825        item = [NSToolbarItem toolbarItemWithIdentifier:@"Files" 
     826                                                                                           name:NSLS(@"Files", @"Files toolbar item") 
     827                                                                                        content:[NSImage imageNamed:@"Folder"] 
     828                                                                                         target:self 
     829                                                                                         action:@selector(files:)]; 
     830        [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 
     831 
     832        // --- search 
     833        item = [NSToolbarItem toolbarItemWithIdentifier:@"Search" 
     834                                                                                           name:NSLS(@"Search", @"Search toolbar item") 
     835                                                                                        content:[NSImage imageNamed:@"Search"] 
     836                                                                                         target:self 
     837                                                                                         action:@selector(search:)]; 
     838        [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 
     839         
     840        // --- transfers 
     841        item = [NSToolbarItem toolbarItemWithIdentifier:@"Transfers" 
     842                                                                                           name:NSLS(@"Transfers", @"Transfers toolbar item") 
     843                                                                                        content:[NSImage imageNamed:@"Transfers"] 
     844                                                                                         target:self 
     845                                                                                         action:@selector(transfers:)]; 
     846        [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 
     847 
     848        // --- accounts 
     849        item = [NSToolbarItem toolbarItemWithIdentifier:@"Accounts" 
     850                                                                                           name:NSLS(@"Accounts", @"Accounts toolbar item") 
     851                                                                                        content:[NSImage imageNamed:@"Accounts"] 
     852                                                                                         target:self 
     853                                                                                         action:@selector(accounts:)]; 
     854        [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 
     855 
     856        // --- disconnect 
     857        item = [NSToolbarItem toolbarItemWithIdentifier:@"Disconnect" 
     858                                                                                           name:NSLS(@"Disconnect", @"Disconnect toolbar item") 
     859                                                                                        content:[NSImage imageNamed:@"Disconnect"] 
     860                                                                                         target:self 
     861                                                                                         action:@selector(disconnect:)]; 
     862        [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 
     863 
     864        // --- reconnect 
     865        item = [NSToolbarItem toolbarItemWithIdentifier:@"Reconnect" 
     866                                                                                           name:NSLS(@"Reconnect", @"Disconnect toolbar item") 
     867                                                                                        content:[NSImage imageNamed:@"Reconnect"] 
     868                                                                                         target:self 
     869                                                                                         action:@selector(reconnect:)]; 
     870        [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 
     871 
     872        // --- banner 
     873        button = [[NSButton alloc] init]; 
     874        [button setFrame:NSMakeRect(0, 0, 32, 32)]; 
     875        [button setBordered:NO]; 
     876        [button setImage:[NSImage imageNamed:@"Banner"]]; 
     877        item = [NSToolbarItem toolbarItemWithIdentifier:@"Banner" 
     878                                                                                           name:NSLS(@"Banner", @"Banner toolbar item") 
     879                                                                                        content:button 
     880                                                                                         target:self 
     881                                                                                         action:@selector(banner:)]; 
     882        [button release]; 
     883        [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 
     884 
     885        toolbar = [[NSToolbar alloc] initWithIdentifier:[NSString UUIDString]]; 
     886        [toolbar setDelegate:self]; 
     887        [toolbar setAllowsUserCustomization:YES]; 
     888 
     889        return [toolbar autorelease]; 
     890} 
     891 
     892 
     893 
     894#pragma mark - 
     895 
    796896- (void)_toggleStatusBar:(BOOL)show { 
    797         NSRect          windowFrame, contentFrame; 
     897        NSRect          frame; 
    798898        float           height; 
    799899         
    800         windowFrame             = [[self window] frame]; 
    801         contentFrame    = [_contentBox frame]; 
    802         height                  = [_statusBox frame].size.height; 
    803          
     900        frame           = [_contentBox frame]; 
     901        height          = [_statusBox frame].size.height; 
     902 
    804903        if(show) { 
    805                 contentFrame.origin.y           = height; 
    806                 windowFrame.origin.y            -= height; 
    807                 windowFrame.size.height         += height; 
     904                frame.origin.y          += height; 
     905                frame.size.height       -= height; 
    808906        } else { 
    809                 contentFrame.origin.y           = 0.0; 
    810                 windowFrame.origin.y            += height; 
    811                 windowFrame.size.height         -= height; 
     907                frame.origin.y          -= height; 
     908                frame.size.height       += height; 
    812909        } 
    813910         
    814911        [_statusBox setHidden:!show]; 
    815         [_contentBox setFrameOrigin:contentFrame.origin]; 
    816          
    817         NSLog(@"1 %@", NSStringFromRect([_contentBox frame])); 
    818  
    819         [[[self window] contentView] setAutoresizesSubviews:NO]; 
    820 //      [_contentBox setAutoresizingMask:NSViewNotSizable]; 
    821         [[self window] setFrame:windowFrame display:YES animate:YES]; 
    822 //      [_contentBox setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; 
    823         [[[self window] contentView] setAutoresizesSubviews:YES]; 
    824  
    825         NSLog(@"2 %@", NSStringFromRect([_contentBox frame])); 
     912        [_contentBox setFrame:frame]; 
     913         
     914        [[self window] display]; 
    826915} 
    827916 
     
    841930         
    842931        sharedController = self; 
     932         
     933        _windowController = [[FHWindowController alloc] init]; 
    843934         
    844935        /// --- set custom cell type 
     
    889980        if(![FHSettings boolForKey:FHShowStatusBar]) 
    890981                [self _toggleStatusBar:NO]; 
     982 
     983        // --- set up toolbar 
     984        [[self window] setToolbar:[self _toolbar]]; 
    891985 
    892986        // --- create locks 
     
    9721066        } 
    9731067         
    974         [self showWindow:self]; 
     1068        [_windowController showWindow:self]; 
     1069//      [self showWindow:self]; 
    9751070} 
    9761071 
     
    10261121 
    10271122        return YES; 
     1123} 
     1124 
     1125 
     1126 
     1127- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)identifier willBeInsertedIntoToolbar:(BOOL)willBeInsertedIntoToolbar { 
     1128        return [_toolbarItems objectForKey:identifier]; 
     1129} 
     1130 
     1131 
     1132 
     1133- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar { 
     1134        return [NSArray arrayWithObjects: 
     1135                @"News", 
     1136                @"Messages", 
     1137                @"Files", 
     1138                @"Search", 
     1139                @"Transfers", 
     1140                @"Accounts", 
     1141                NSToolbarFlexibleSpaceItemIdentifier, 
     1142                @"Disconnect", 
     1143                NULL]; 
     1144} 
     1145 
     1146 
     1147 
     1148- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar { 
     1149        return [NSArray arrayWithObjects: 
     1150                @"News", 
     1151                @"Messages", 
     1152                @"Files", 
     1153                @"Search", 
     1154                @"Transfers", 
     1155                @"Accounts", 
     1156                @"Reconnect", 
     1157                @"Disconnect", 
     1158                @"Banner", 
     1159                NSToolbarSeparatorItemIdentifier, 
     1160                NSToolbarSpaceItemIdentifier, 
     1161                NSToolbarFlexibleSpaceItemIdentifier, 
     1162                NSToolbarCustomizeToolbarItemIdentifier, 
     1163                NULL]; 
    10281164} 
    10291165 
  • Footagehead/trunk/Footagehead.xcodeproj/project.pbxproj

    r4465 r4704  
    119119                778F0CD40B64C96D00E3CD47 /* FHLHAHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 778F0CD20B64C96D00E3CD47 /* FHLHAHandler.m */; }; 
    120120                778F0DE30B64D45500E3CD47 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 778F0DE20B64D45500E3CD47 /* CoreFoundation.framework */; }; 
     121                77B151800BD8FEA2009B6183 /* FHWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 77B1517E0BD8FEA2009B6183 /* FHWindowController.m */; }; 
     122                77B151840BD8FEB1009B6183 /* FHFullscreenWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 77B151820BD8FEB1009B6183 /* FHFullscreenWindowController.m */; }; 
     123                77B151880BD8FEBB009B6183 /* FHImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 77B151860BD8FEBB009B6183 /* FHImageLoader.m */; }; 
     124                77B151BC0BD8FF63009B6183 /* Window.nib in Resources */ = {isa = PBXBuildFile; fileRef = 77B151B80BD8FF63009B6183 /* Window.nib */; }; 
     125                77B151BD0BD8FF63009B6183 /* FullscreenWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = 77B151BA0BD8FF63009B6183 /* FullscreenWindow.nib */; }; 
    121126                77BD99520760B7380007D034 /* FHTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 77BD99500760B7380007D034 /* FHTableView.m */; }; 
    122127                77CDAE72083B3515003BE654 /* ReleaseNotes.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 77CDAE70083B3515003BE654 /* ReleaseNotes.rtf */; }; 
     
    335340                778F0CD20B64C96D00E3CD47 /* FHLHAHandler.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = FHLHAHandler.m; sourceTree = "<group>"; }; 
    336341                778F0DE20B64D45500E3CD47 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; }; 
     342                77B1517D0BD8FEA2009B6183 /* FHWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FHWindowController.h; sourceTree = "<group>"; }; 
     343                77B1517E0BD8FEA2009B6183 /* FHWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FHWindowController.m; sourceTree = "<group>"; }; 
     344                77B151810BD8FEB1009B6183 /* FHFullscreenWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FHFullscreenWindowController.h; sourceTree = "<group>"; }; 
     345                77B151820BD8FEB1009B6183 /* FHFullscreenWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FHFullscreenWindowController.m; sourceTree = "<group>"; }; 
     346                77B151850BD8FEBB009B6183 /* FHImageLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FHImageLoader.h; sourceTree = "<group>"; }; 
     347                77B151860BD8FEBB009B6183 /* FHImageLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FHImageLoader.m; sourceTree = "<group>"; }; 
     348                77B151B90BD8FF63009B6183 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/Window.nib; sourceTree = "<group>"; }; 
     349                77B151BB0BD8FF63009B6183 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/FullscreenWindow.nib; sourceTree = "<group>"; }; 
     350                77B151CF0BD8FF94009B6183 /* WiredAdditions */ = {isa = PBXFileReference; lastKnownFileType = folder; path = WiredAdditions; sourceTree = SOURCE_ROOT; }; 
    337351                77BD994F0760B7380007D034 /* FHTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FHTableView.h; sourceTree = "<group>"; }; 
    338352                77BD99500760B7380007D034 /* FHTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FHTableView.m; sourceTree = "<group>"; }; 
     
    601615                                A54BD5400566834700E3ACBC /* FHFullscreenWindow.m */, 
    602616                                A54BD5410566834700E3ACBC /* FHFullscreenWindow.h */, 
     617                                77B151820BD8FEB1009B6183 /* FHFullscreenWindowController.m */, 
     618                                77B151810BD8FEB1009B6183 /* FHFullscreenWindowController.h */, 
     619                                77B151860BD8FEBB009B6183 /* FHImageLoader.m */, 
     620                                77B151850BD8FEBB009B6183 /* FHImageLoader.h */, 
    603621                                77CDB021083B6B85003BE654 /* FHImageView.m */, 
    604622                                77CDB020083B6B85003BE654 /* FHImageView.h */, 
    605623                                77BD99500760B7380007D034 /* FHTableView.m */, 
    606624                                77BD994F0760B7380007D034 /* FHTableView.h */, 
     625                                77B1517E0BD8FEA2009B6183 /* FHWindowController.m */, 
     626                                77B1517D0BD8FEA2009B6183 /* FHWindowController.h */, 
    607627                        ); 
    608628                        name = Interface; 
     
    675695                                A5E5174205774ED40004F5D6 /* Credits.rtf */, 
    676696                                77CDAE70083B3515003BE654 /* ReleaseNotes.rtf */, 
     697                                77B151BA0BD8FF63009B6183 /* FullscreenWindow.nib */, 
    677698                                29B97318FDCFA39411CA2CEA /* MainMenu.nib */, 
     699                                77B151B80BD8FF63009B6183 /* Window.nib */, 
    678700                                A51395F405771ED4007FE220 /* Footagehead.icns */, 
    679701                                A58BE56609BA054F00C3C20D /* Black.tiff */, 
     
    726748                        children = ( 
    727749                                77396B390857A18300058AF5 /* WiredAdditions.xcodeproj */, 
     750                                77B151CF0BD8FF94009B6183 /* WiredAdditions */, 
    728751                                77CDC04D083BA582003BE654 /* libjpeg */, 
    729752                                778F0B3F0B64C44100E3CD47 /* lha */, 
     
    12021225                                A58BE56B09BA054F00C3C20D /* Gray.tiff in Resources */, 
    12031226                                A58BE75009BB53C400C3C20D /* RotateRight.tiff in Resources */, 
     1227                                77B151BC0BD8FF63009B6183 /* Window.nib in Resources */, 
     1228                                77B151BD0BD8FF63009B6183 /* FullscreenWindow.nib in Resources */, 
    12041229                        ); 
    12051230                        runOnlyForDeploymentPostprocessing = 0; 
     
    13691394                                A5B1FBC6067D01C200111D0A /* FHImageHandler.m in Sources */, 
    13701395                                77CDB023083B6B85003BE654 /* FHImageView.m in Sources */, 
     1396                                77B151880BD8FEBB009B6183 /* FHImageLoader.m in Sources */, 
    13711397                                A54BD5420566834700E3ACBC /* FHFullscreenWindow.m in Sources */, 
     1398                                77B151840BD8FEB1009B6183 /* FHFullscreenWindowController.m in Sources */, 
    13721399                                778F0CD40B64C96D00E3CD47 /* FHLHAHandler.m in Sources */, 
    13731400                                A5B1F9C1067BDF2300111D0A /* FHRangeHandler.m in Sources */, 
     
    13771404                                77BD99520760B7380007D034 /* FHTableView.m in Sources */, 
    13781405                                77EAADDA084B546D006C9F69 /* FHURLHandler.m in Sources */, 
     1406                                77B151800BD8FEA2009B6183 /* FHWindowController.m in Sources */, 
    13791407                                A5B44F98087F9A2D003B1DA1 /* FHZipHandler.m in Sources */, 
    13801408                        ); 
     
    14781506                        sourceTree = "<group>"; 
    14791507                }; 
     1508                77B151B80BD8FF63009B6183 /* Window.nib */ = { 
     1509                        isa = PBXVariantGroup; 
     1510                        children = ( 
     1511                                77B151B90BD8FF63009B6183 /* English */, 
     1512                        ); 
     1513                        name = Window.nib; 
     1514                        sourceTree = "<group>"; 
     1515                }; 
     1516                77B151BA0BD8FF63009B6183 /* FullscreenWindow.nib */ = { 
     1517                        isa = PBXVariantGroup; 
     1518                        children = ( 
     1519                                77B151BB0BD8FF63009B6183 /* English */, 
     1520                        ); 
     1521                        name = FullscreenWindow.nib; 
     1522                        sourceTree = "<group>"; 
     1523                }; 
    14801524                77CDAE70083B3515003BE654 /* ReleaseNotes.rtf */ = { 
    14811525                        isa = PBXVariantGroup; 
  • Footagehead/trunk/prefix.pch

    r3400 r4704  
    2727 */ 
    2828 
     29// --- 10.5 stuff while building on 10.4 
     30#ifndef NSINTEGER_DEFINED 
     31#if __LP64__ || NS_BUILD_32_LIKE_64 
     32typedef long                                    NSInteger; 
     33typedef unsigned long                   NSUInteger; 
     34#else 
     35typedef int                                             NSInteger; 
     36typedef unsigned int                    NSUInteger; 
     37#endif 
     38 
     39#define NSIntegerMax                    LONG_MAX 
     40#define NSIntegerMin                    LONG_MIN 
     41#define NSUIntegerMax                   ULONG_MAX 
     42 
     43#define NSINTEGER_DEFINED               1 
     44#endif 
     45 
     46#ifndef CGFLOAT_DEFINED 
     47#if defined(__LP64__) && __LP64__ 
     48typedef double                                  CGFloat; 
     49#define CGFLOAT_MIN                             DBL_MIN 
     50#define CGFLOAT_MAX                             DBL_MAX 
     51#define CGFLOAT_IS_DOUBLE               1 
     52#else 
     53typedef float                                   CGFloat; 
     54#define CGFLOAT_MIN                             FLT_MIN 
     55#define CGFLOAT_MAX                             FLT_MAX 
     56#define CGFLOAT_IS_DOUBLE               0 
     57#endif 
     58 
     59#define CGFLOAT_DEFINED                 1 
     60#endif 
     61 
     62#ifndef MAC_OS_X_VERSION_10_5 
     63#define MAC_OS_X_VERSION_10_5   1050 
     64#endif 
     65 
    2966// --- Frameworks 
    3067#import <Carbon/Carbon.h>