Changeset 4704
- Timestamp:
- 04/21/07 15:20:47 (2 years ago)
- Files:
-
- Footagehead/trunk/English.lproj/FullscreenWindow.nib (added)
- Footagehead/trunk/English.lproj/FullscreenWindow.nib/classes.nib (added)
- Footagehead/trunk/English.lproj/FullscreenWindow.nib/info.nib (added)
- Footagehead/trunk/English.lproj/FullscreenWindow.nib/keyedobjects.nib (added)
- Footagehead/trunk/English.lproj/MainMenu.nib/info.nib (modified) (1 diff)
- Footagehead/trunk/English.lproj/MainMenu.nib/keyedobjects.nib (modified) (previous)
- Footagehead/trunk/English.lproj/MainMenu.nib/objects.nib (modified) (previous)
- Footagehead/trunk/English.lproj/Window.nib (added)
- Footagehead/trunk/English.lproj/Window.nib/classes.nib (added)
- Footagehead/trunk/English.lproj/Window.nib/info.nib (added)
- Footagehead/trunk/English.lproj/Window.nib/keyedobjects.nib (added)
- Footagehead/trunk/FHController.h (modified) (2 diffs)
- Footagehead/trunk/FHController.m (modified) (7 diffs)
- Footagehead/trunk/FHFullscreenWindowController.h (added)
- Footagehead/trunk/FHFullscreenWindowController.m (added)
- Footagehead/trunk/FHImageLoader.h (added)
- Footagehead/trunk/FHImageLoader.m (added)
- Footagehead/trunk/FHWindowController.h (added)
- Footagehead/trunk/FHWindowController.m (added)
- Footagehead/trunk/Footagehead.xcodeproj/project.pbxproj (modified) (9 diffs)
- Footagehead/trunk/prefix.pch (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Footagehead/trunk/English.lproj/MainMenu.nib/info.nib
r4465 r4704 18 18 <key>IBOpenObjects</key> 19 19 <array> 20 <integer>29</integer>21 20 <integer>21</integer> 22 21 <integer>302</integer> 22 <integer>29</integer> 23 23 </array> 24 24 <key>IBSystem Version</key> 25 <string>8 L127</string>25 <string>8P135</string> 26 26 </dict> 27 27 </plist> Footagehead/trunk/FHController.h
r4465 r4704 27 27 */ 28 28 29 @class FHWindowController; 29 30 @class FHImageView, FHFullscreenWindow; 30 31 @class FHHandler, FHFile; … … 71 72 IBOutlet NSPanel *_openSpotlightPanel; 72 73 IBOutlet NSTextView *_openSpotlightTextView; 74 75 FHWindowController *_windowController; 73 76 74 77 FHFullscreenWindow *_fullscreenWindow; 75 78 FHHandler *_handler; 79 80 NSMutableDictionary *_toolbarItems; 76 81 77 82 NSTimer *_loadImageTimer; Footagehead/trunk/FHController.m
r4465 r4704 38 38 #import "FHSettings.h" 39 39 40 41 #import "FHWindowController.h" 42 40 43 #define FHUnloadImageCount 5 41 44 #define FHPreloadImageCount 10 … … 72 75 - (void)_updateFullscreenStatus; 73 76 - (void)_updateTableView; 77 78 - (NSToolbar *)_toolbar; 74 79 75 80 - (void)_toggleStatusBar:(BOOL)show; … … 794 799 #pragma mark - 795 800 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 796 896 - (void)_toggleStatusBar:(BOOL)show { 797 NSRect windowFrame, contentFrame;897 NSRect frame; 798 898 float height; 799 899 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 804 903 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; 808 906 } 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; 812 909 } 813 910 814 911 [_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]; 826 915 } 827 916 … … 841 930 842 931 sharedController = self; 932 933 _windowController = [[FHWindowController alloc] init]; 843 934 844 935 /// --- set custom cell type … … 889 980 if(![FHSettings boolForKey:FHShowStatusBar]) 890 981 [self _toggleStatusBar:NO]; 982 983 // --- set up toolbar 984 [[self window] setToolbar:[self _toolbar]]; 891 985 892 986 // --- create locks … … 972 1066 } 973 1067 974 [self showWindow:self]; 1068 [_windowController showWindow:self]; 1069 // [self showWindow:self]; 975 1070 } 976 1071 … … 1026 1121 1027 1122 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]; 1028 1164 } 1029 1165 Footagehead/trunk/Footagehead.xcodeproj/project.pbxproj
r4465 r4704 119 119 778F0CD40B64C96D00E3CD47 /* FHLHAHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 778F0CD20B64C96D00E3CD47 /* FHLHAHandler.m */; }; 120 120 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 */; }; 121 126 77BD99520760B7380007D034 /* FHTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 77BD99500760B7380007D034 /* FHTableView.m */; }; 122 127 77CDAE72083B3515003BE654 /* ReleaseNotes.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 77CDAE70083B3515003BE654 /* ReleaseNotes.rtf */; }; … … 335 340 778F0CD20B64C96D00E3CD47 /* FHLHAHandler.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = FHLHAHandler.m; sourceTree = "<group>"; }; 336 341 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; }; 337 351 77BD994F0760B7380007D034 /* FHTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FHTableView.h; sourceTree = "<group>"; }; 338 352 77BD99500760B7380007D034 /* FHTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FHTableView.m; sourceTree = "<group>"; }; … … 601 615 A54BD5400566834700E3ACBC /* FHFullscreenWindow.m */, 602 616 A54BD5410566834700E3ACBC /* FHFullscreenWindow.h */, 617 77B151820BD8FEB1009B6183 /* FHFullscreenWindowController.m */, 618 77B151810BD8FEB1009B6183 /* FHFullscreenWindowController.h */, 619 77B151860BD8FEBB009B6183 /* FHImageLoader.m */, 620 77B151850BD8FEBB009B6183 /* FHImageLoader.h */, 603 621 77CDB021083B6B85003BE654 /* FHImageView.m */, 604 622 77CDB020083B6B85003BE654 /* FHImageView.h */, 605 623 77BD99500760B7380007D034 /* FHTableView.m */, 606 624 77BD994F0760B7380007D034 /* FHTableView.h */, 625 77B1517E0BD8FEA2009B6183 /* FHWindowController.m */, 626 77B1517D0BD8FEA2009B6183 /* FHWindowController.h */, 607 627 ); 608 628 name = Interface; … … 675 695 A5E5174205774ED40004F5D6 /* Credits.rtf */, 676 696 77CDAE70083B3515003BE654 /* ReleaseNotes.rtf */, 697 77B151BA0BD8FF63009B6183 /* FullscreenWindow.nib */, 677 698 29B97318FDCFA39411CA2CEA /* MainMenu.nib */, 699 77B151B80BD8FF63009B6183 /* Window.nib */, 678 700 A51395F405771ED4007FE220 /* Footagehead.icns */, 679 701 A58BE56609BA054F00C3C20D /* Black.tiff */, … … 726 748 children = ( 727 749 77396B390857A18300058AF5 /* WiredAdditions.xcodeproj */, 750 77B151CF0BD8FF94009B6183 /* WiredAdditions */, 728 751 77CDC04D083BA582003BE654 /* libjpeg */, 729 752 778F0B3F0B64C44100E3CD47 /* lha */, … … 1202 1225 A58BE56B09BA054F00C3C20D /* Gray.tiff in Resources */, 1203 1226 A58BE75009BB53C400C3C20D /* RotateRight.tiff in Resources */, 1227 77B151BC0BD8FF63009B6183 /* Window.nib in Resources */, 1228 77B151BD0BD8FF63009B6183 /* FullscreenWindow.nib in Resources */, 1204 1229 ); 1205 1230 runOnlyForDeploymentPostprocessing = 0; … … 1369 1394 A5B1FBC6067D01C200111D0A /* FHImageHandler.m in Sources */, 1370 1395 77CDB023083B6B85003BE654 /* FHImageView.m in Sources */, 1396 77B151880BD8FEBB009B6183 /* FHImageLoader.m in Sources */, 1371 1397 A54BD5420566834700E3ACBC /* FHFullscreenWindow.m in Sources */, 1398 77B151840BD8FEB1009B6183 /* FHFullscreenWindowController.m in Sources */, 1372 1399 778F0CD40B64C96D00E3CD47 /* FHLHAHandler.m in Sources */, 1373 1400 A5B1F9C1067BDF2300111D0A /* FHRangeHandler.m in Sources */, … … 1377 1404 77BD99520760B7380007D034 /* FHTableView.m in Sources */, 1378 1405 77EAADDA084B546D006C9F69 /* FHURLHandler.m in Sources */, 1406 77B151800BD8FEA2009B6183 /* FHWindowController.m in Sources */, 1379 1407 A5B44F98087F9A2D003B1DA1 /* FHZipHandler.m in Sources */, 1380 1408 ); … … 1478 1506 sourceTree = "<group>"; 1479 1507 }; 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 }; 1480 1524 77CDAE70083B3515003BE654 /* ReleaseNotes.rtf */ = { 1481 1525 isa = PBXVariantGroup; Footagehead/trunk/prefix.pch
r3400 r4704 27 27 */ 28 28 29 // --- 10.5 stuff while building on 10.4 30 #ifndef NSINTEGER_DEFINED 31 #if __LP64__ || NS_BUILD_32_LIKE_64 32 typedef long NSInteger; 33 typedef unsigned long NSUInteger; 34 #else 35 typedef int NSInteger; 36 typedef 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__ 48 typedef double CGFloat; 49 #define CGFLOAT_MIN DBL_MIN 50 #define CGFLOAT_MAX DBL_MAX 51 #define CGFLOAT_IS_DOUBLE 1 52 #else 53 typedef 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 29 66 // --- Frameworks 30 67 #import <Carbon/Carbon.h>
