Changeset 3219
- Timestamp:
- 04/26/06 23:25:10 (2 years ago)
- Files:
-
- trunk/Colloquy.xcodeproj/project.pbxproj (modified) (29 diffs)
- trunk/Controllers/JVChatController.h (modified) (1 diff)
- trunk/Controllers/JVChatController.m (modified) (3 diffs)
- trunk/Controllers/JVChatWindowController.m (modified) (13 diffs)
- trunk/Controllers/JVSidebarChatWindowController.h (modified) (1 diff)
- trunk/Controllers/JVSidebarChatWindowController.m (modified) (4 diffs)
- trunk/Resources/JVSidebarChatWindow.nib/keyedobjects.nib (modified) (previous)
- trunk/Views/JVSideSplitView.m (modified) (1 diff)
- trunk/Views/JVSideStatusView.m (modified) (1 diff)
- trunk/Views/JVSplitView.h (modified) (2 diffs)
- trunk/Views/JVSplitView.m (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Colloquy.xcodeproj/project.pbxproj
r3214 r3219 58 58 1C51B4C7052DE14B00BB459B /* JVStandardCommands.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C3B4D570427BD5200000102 /* JVStandardCommands.m */; }; 59 59 1C51B4C9052DE14B00BB459B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; 60 1C59A92009FDEBA3000682B8 /* JVChatWindowControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C59A91F09FDEBA3000682B8 /* JVChatWindowControllerTests.m */; }; 60 61 1C5EF35B07B45C1F004E66D3 /* JVChatEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C5EF35907B45C1F004E66D3 /* JVChatEvent.m */; }; 61 62 1C5EF36C07B45FBF004E66D3 /* JVChatSession.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C5EF36A07B45FBF004E66D3 /* JVChatSession.m */; }; … … 373 374 remoteInfo = "Python Support Plugin"; 374 375 }; 376 1C59A9A309FDF148000682B8 /* PBXContainerItemProxy */ = { 377 isa = PBXContainerItemProxy; 378 containerPortal = 089C1669FE841209C02AAC07 /* Project object */; 379 proxyType = 1; 380 remoteGlobalIDString = 1CB2CCF5052DDC560094AAA4; 381 remoteInfo = "Colloquy (Application)"; 382 }; 375 383 1C7F30000855456D00D41FB0 /* PBXContainerItemProxy */ = { 376 384 isa = PBXContainerItemProxy; … … 540 548 1C51B89D052DF91E00BB459B /* Info.plist */ = {isa = PBXFileReference; explicitFileType = text.xml; fileEncoding = 4; name = Info.plist; path = Resources/Info.plist; sourceTree = SOURCE_ROOT; }; 541 549 1C5959010507803F000001C8 /* Generic.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Generic.icns; path = Resources/Generic.icns; sourceTree = SOURCE_ROOT; }; 550 1C59A91F09FDEBA3000682B8 /* JVChatWindowControllerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JVChatWindowControllerTests.m; path = Tests/JVChatWindowControllerTests.m; sourceTree = "<group>"; }; 542 551 1C59BD61059E2E02001487E2 /* ChatPlugIn.scriptSuite */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = ChatPlugIn.scriptSuite; path = Resources/ChatPlugIn.scriptSuite; sourceTree = "<group>"; }; 543 552 1C59BD63059E2E16001487E2 /* ChatPlugIn.scriptTerminology */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = ChatPlugIn.scriptTerminology; path = Resources/ChatPlugIn.scriptTerminology; sourceTree = "<group>"; }; … … 595 604 1C77831008FA4EA2006AD8E5 /* topicToggleDown.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = topicToggleDown.png; path = Resources/topicToggleDown.png; sourceTree = "<group>"; }; 596 605 1C77831108FA4EA2006AD8E5 /* topicToggleUp.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = topicToggleUp.png; path = Resources/topicToggleUp.png; sourceTree = "<group>"; }; 606 1C7A60B709FDE8560029AC64 /* Colloquy Tests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Colloquy Tests.octest"; sourceTree = BUILT_PRODUCTS_DIR; }; 597 607 1C7B83C50668D732004F1EFE /* NSNotificationAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSNotificationAdditions.h; path = Additions/NSNotificationAdditions.h; sourceTree = "<group>"; }; 598 608 1C7C76E507DBA1C100FB5F83 /* NSCoreSuite.scriptSuite */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = NSCoreSuite.scriptSuite; path = Resources/NSCoreSuite.scriptSuite; sourceTree = "<group>"; }; … … 1036 1046 runOnlyForDeploymentPostprocessing = 0; 1037 1047 }; 1048 1C7A60B409FDE8560029AC64 /* Frameworks */ = { 1049 isa = PBXFrameworksBuildPhase; 1050 buildActionMask = 2147483647; 1051 files = ( 1052 ); 1053 runOnlyForDeploymentPostprocessing = 0; 1054 }; 1038 1055 1CB2CD78052DDC560094AAA4 /* Frameworks */ = { 1039 1056 isa = PBXFrameworksBuildPhase; … … 1074 1091 F50B0A9F0170C89301A84BDE /* Sources & Headers */, 1075 1092 F50B0AA00170C89301A84BDE /* Other Sources & Additions */, 1093 1C59A92909FDEBC6000682B8 /* Unit Tests */, 1076 1094 F5185C82018626F701EE70DE /* Interfaces */, 1077 1095 F50B0AA10170C89301A84BDE /* Resources */, … … 1181 1199 ); 1182 1200 name = "Tabs Interface Images"; 1201 sourceTree = "<group>"; 1202 }; 1203 1C59A92909FDEBC6000682B8 /* Unit Tests */ = { 1204 isa = PBXGroup; 1205 children = ( 1206 1C59A91F09FDEBA3000682B8 /* JVChatWindowControllerTests.m */, 1207 ); 1208 name = "Unit Tests"; 1183 1209 sourceTree = "<group>"; 1184 1210 }; … … 1243 1269 1C51B4CD052DE14B00BB459B /* Standard Commands.plugin */, 1244 1270 CBF685150820186F00F498FB /* Colloquy.mdimporter */, 1271 1C7A60B709FDE8560029AC64 /* Colloquy Tests.octest */, 1245 1272 ); 1246 1273 name = Products; … … 1829 1856 productType = "com.apple.product-type.bundle"; 1830 1857 }; 1858 1C7A60B609FDE8560029AC64 /* Colloquy Tests */ = { 1859 isa = PBXNativeTarget; 1860 buildConfigurationList = 1C7A60BB09FDE8580029AC64 /* Build configuration list for PBXNativeTarget "Colloquy Tests" */; 1861 buildPhases = ( 1862 1C7A60B209FDE8560029AC64 /* Resources */, 1863 1C7A60B309FDE8560029AC64 /* Sources */, 1864 1C7A60B409FDE8560029AC64 /* Frameworks */, 1865 1C7A60B509FDE8560029AC64 /* Run Tests */, 1866 ); 1867 buildRules = ( 1868 ); 1869 buildSettings = { 1870 GCC_ENABLE_FIX_AND_CONTINUE = NO; 1871 GCC_ENABLE_OBJC_EXCEPTIONS = YES; 1872 GCC_MODEL_TUNING = G5; 1873 GCC_PRECOMPILE_PREFIX_HEADER = YES; 1874 GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h"; 1875 INFOPLIST_FILE = "Colloquy Tests-Info.plist"; 1876 INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles"; 1877 OTHER_LDFLAGS = ( 1878 "-framework", 1879 Cocoa, 1880 "-framework", 1881 SenTestingKit, 1882 ); 1883 PREBINDING = NO; 1884 PRODUCT_NAME = "Colloquy Tests"; 1885 WRAPPER_EXTENSION = octest; 1886 ZERO_LINK = NO; 1887 }; 1888 dependencies = ( 1889 1C59A9A409FDF148000682B8 /* PBXTargetDependency */, 1890 ); 1891 name = "Colloquy Tests"; 1892 productName = "Colloquy Tests"; 1893 productReference = 1C7A60B709FDE8560029AC64 /* Colloquy Tests.octest */; 1894 productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> 1895 <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"> 1896 <plist version=\"1.0\"> 1897 <dict> 1898 <key>CFBundleDevelopmentRegion</key> 1899 <string>English</string> 1900 <key>CFBundleExecutable</key> 1901 <string>${EXECUTABLE_NAME}</string> 1902 <key>CFBundleIdentifier</key> 1903 <string>com.yourcompany.Colloquy Tests</string> 1904 <key>CFBundleInfoDictionaryVersion</key> 1905 <string>6.0</string> 1906 <key>CFBundlePackageType</key> 1907 <string>BNDL</string> 1908 <key>CFBundleSignature</key> 1909 <string>????</string> 1910 <key>CFBundleVersion</key> 1911 <string>1.0</string> 1912 </dict> 1913 </plist> 1914 "; 1915 productType = "com.apple.product-type.bundle"; 1916 }; 1831 1917 1CB2CCF5052DDC560094AAA4 /* Colloquy (Application) */ = { 1832 1918 isa = PBXNativeTarget; … … 2010 2096 1C51B4BB052DE14B00BB459B /* Standard Commands (Plug-In) */, 2011 2097 CBF685140820186F00F498FB /* Colloquy (Metadata Importer) */, 2098 1C7A60B609FDE8560029AC64 /* Colloquy Tests */, 2012 2099 ); 2013 2100 }; … … 2053 2140 2054 2141 /* Begin PBXResourcesBuildPhase section */ 2142 1C7A60B209FDE8560029AC64 /* Resources */ = { 2143 isa = PBXResourcesBuildPhase; 2144 buildActionMask = 2147483647; 2145 files = ( 2146 ); 2147 runOnlyForDeploymentPostprocessing = 0; 2148 }; 2055 2149 1CB2CD0F052DDC560094AAA4 /* Resources */ = { 2056 2150 isa = PBXResourcesBuildPhase; … … 2261 2355 2262 2356 /* Begin PBXShellScriptBuildPhase section */ 2357 1C7A60B509FDE8560029AC64 /* Run Tests */ = { 2358 isa = PBXShellScriptBuildPhase; 2359 buildActionMask = 2147483647; 2360 files = ( 2361 ); 2362 inputPaths = ( 2363 ); 2364 name = "Run Tests"; 2365 outputPaths = ( 2366 ); 2367 runOnlyForDeploymentPostprocessing = 0; 2368 shellPath = /bin/sh; 2369 shellScript = "\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; 2370 }; 2263 2371 1C91DEAC06972EC0007C1638 /* Remove Headers */ = { 2264 2372 isa = PBXShellScriptBuildPhase; … … 2316 2424 files = ( 2317 2425 1C51B4C7052DE14B00BB459B /* JVStandardCommands.m in Sources */, 2426 ); 2427 runOnlyForDeploymentPostprocessing = 0; 2428 }; 2429 1C7A60B309FDE8560029AC64 /* Sources */ = { 2430 isa = PBXSourcesBuildPhase; 2431 buildActionMask = 2147483647; 2432 files = ( 2433 1C59A92009FDEBA3000682B8 /* JVChatWindowControllerTests.m in Sources */, 2318 2434 ); 2319 2435 runOnlyForDeploymentPostprocessing = 0; … … 2433 2549 targetProxy = 1C0A19AE08B041A800324E25 /* PBXContainerItemProxy */; 2434 2550 }; 2551 1C59A9A409FDF148000682B8 /* PBXTargetDependency */ = { 2552 isa = PBXTargetDependency; 2553 target = 1CB2CCF5052DDC560094AAA4 /* Colloquy (Application) */; 2554 targetProxy = 1C59A9A309FDF148000682B8 /* PBXContainerItemProxy */; 2555 }; 2435 2556 1C7F30010855456D00D41FB0 /* PBXTargetDependency */ = { 2436 2557 isa = PBXTargetDependency; … … 2857 2978 1C041A650854E97700A5A5BA /* Release */ = { 2858 2979 isa = XCBuildConfiguration; 2859 baseConfigurationReference = 1C6A13ED08666E62009EE6D2 /* Common Settings.xcconfig */;2860 2980 buildSettings = { 2861 2981 GCC_PREFIX_HEADER = "Plug-Ins/Standard Commands/Standard Commands.pch"; … … 2872 2992 1C041A660854E97700A5A5BA /* Development */ = { 2873 2993 isa = XCBuildConfiguration; 2874 baseConfigurationReference = 1C6A13ED08666E62009EE6D2 /* Common Settings.xcconfig */;2875 2994 buildSettings = { 2876 GCC_OPTIMIZATION_LEVEL = 0;2877 2995 GCC_PREFIX_HEADER = "Plug-Ins/Standard Commands/Standard Commands.pch"; 2878 2996 INFOPLIST_FILE = "Resources/Info-StandardCommands.plist"; … … 2888 3006 1C041A690854E97700A5A5BA /* Release */ = { 2889 3007 isa = XCBuildConfiguration; 2890 baseConfigurationReference = 1C6A13ED08666E62009EE6D2 /* Common Settings.xcconfig */;2891 3008 buildSettings = { 2892 3009 GCC_PREFIX_HEADER = Colloquy.pch; … … 2912 3029 1C041A6A0854E97700A5A5BA /* Development */ = { 2913 3030 isa = XCBuildConfiguration; 2914 baseConfigurationReference = 1C6A13ED08666E62009EE6D2 /* Common Settings.xcconfig */;2915 3031 buildSettings = { 2916 GCC_ENABLE_FIX_AND_CONTINUE = YES;2917 GCC_OPTIMIZATION_LEVEL = 0;2918 3032 GCC_PREFIX_HEADER = Colloquy.pch; 2919 3033 HEADER_SEARCH_PATHS = /usr/include/libxml2; … … 2925 3039 PRODUCT_NAME = Colloquy; 2926 3040 WRAPPER_EXTENSION = app; 2927 ZERO_LINK = YES;2928 3041 }; 2929 3042 name = Development; … … 2931 3044 1C041A6D0854E97700A5A5BA /* Release */ = { 2932 3045 isa = XCBuildConfiguration; 2933 baseConfigurationReference = 1C6A13ED08666E62009EE6D2 /* Common Settings.xcconfig */;2934 3046 buildSettings = { 2935 3047 GCC_FAST_OBJC_DISPATCH = YES; … … 2944 3056 1C041A6E0854E97700A5A5BA /* Development */ = { 2945 3057 isa = XCBuildConfiguration; 2946 baseConfigurationReference = 1C6A13ED08666E62009EE6D2 /* Common Settings.xcconfig */;2947 3058 buildSettings = { 2948 3059 GCC_FAST_OBJC_DISPATCH = YES; … … 2957 3068 1C041A710854E97700A5A5BA /* Release */ = { 2958 3069 isa = XCBuildConfiguration; 3070 baseConfigurationReference = 1C6A13ED08666E62009EE6D2 /* Common Settings.xcconfig */; 2959 3071 buildSettings = { 2960 3072 }; … … 2963 3075 1C041A720854E97700A5A5BA /* Development */ = { 2964 3076 isa = XCBuildConfiguration; 3077 baseConfigurationReference = 1C6A13ED08666E62009EE6D2 /* Common Settings.xcconfig */; 2965 3078 buildSettings = { 2966 GCC_ENABLE_FIX_AND_CONTINUE = YES;2967 3079 GCC_OPTIMIZATION_LEVEL = 0; 2968 3080 GCC_PREPROCESSOR_DEFINITIONS = DEBUG; 2969 PREBINDING = NO;2970 ZERO_LINK = YES;2971 3081 }; 2972 3082 name = Development; … … 2974 3084 1C041DC90855377900A5A5BA /* Release (Universal) */ = { 2975 3085 isa = XCBuildConfiguration; 2976 baseConfigurationReference = 1C6A13ED08666E62009EE6D2 /* Common Settings.xcconfig */;2977 3086 buildSettings = { 2978 3087 GCC_PREFIX_HEADER = "Plug-Ins/Standard Commands/Standard Commands.pch"; … … 2989 3098 1C041DCA0855377900A5A5BA /* Release (Universal) */ = { 2990 3099 isa = XCBuildConfiguration; 2991 baseConfigurationReference = 1C6A13ED08666E62009EE6D2 /* Common Settings.xcconfig */;2992 3100 buildSettings = { 2993 3101 GCC_PREFIX_HEADER = Colloquy.pch; … … 3013 3121 1C041DCB0855377900A5A5BA /* Release (Universal) */ = { 3014 3122 isa = XCBuildConfiguration; 3015 baseConfigurationReference = 1C6A13ED08666E62009EE6D2 /* Common Settings.xcconfig */;3016 3123 buildSettings = { 3017 3124 GCC_FAST_OBJC_DISPATCH = YES; … … 3026 3133 1C041DCC0855377900A5A5BA /* Release (Universal) */ = { 3027 3134 isa = XCBuildConfiguration; 3135 baseConfigurationReference = 1C6A13ED08666E62009EE6D2 /* Common Settings.xcconfig */; 3028 3136 buildSettings = { 3029 3137 ARCHS = ( … … 3034 3142 }; 3035 3143 name = "Release (Universal)"; 3144 }; 3145 1C7A60BC09FDE8580029AC64 /* Release */ = { 3146 isa = XCBuildConfiguration; 3147 buildSettings = { 3148 BUNDLE_LOADER = "$(TEST_HOST)"; 3149 GCC_FAST_OBJC_DISPATCH = YES; 3150 INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles"; 3151 OTHER_LDFLAGS = ( 3152 "-framework", 3153 Cocoa, 3154 "-framework", 3155 SenTestingKit, 3156 ); 3157 PRODUCT_NAME = "Colloquy Tests"; 3158 TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Colloquy.app/Contents/MacOS/Colloquy"; 3159 WRAPPER_EXTENSION = octest; 3160 }; 3161 name = Release; 3162 }; 3163 1C7A60BD09FDE8580029AC64 /* Release (Universal) */ = { 3164 isa = XCBuildConfiguration; 3165 buildSettings = { 3166 BUNDLE_LOADER = "$(TEST_HOST)"; 3167 GCC_FAST_OBJC_DISPATCH = YES; 3168 INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles"; 3169 OTHER_LDFLAGS = ( 3170 "-framework", 3171 Cocoa, 3172 "-framework", 3173 SenTestingKit, 3174 ); 3175 PRODUCT_NAME = "Colloquy Tests"; 3176 TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Colloquy.app/Contents/MacOS/Colloquy"; 3177 WRAPPER_EXTENSION = octest; 3178 }; 3179 name = "Release (Universal)"; 3180 }; 3181 1C7A60BE09FDE8580029AC64 /* Development */ = { 3182 isa = XCBuildConfiguration; 3183 buildSettings = { 3184 BUNDLE_LOADER = "$(TEST_HOST)"; 3185 GCC_FAST_OBJC_DISPATCH = YES; 3186 INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles"; 3187 OTHER_LDFLAGS = ( 3188 "-framework", 3189 Cocoa, 3190 "-framework", 3191 SenTestingKit, 3192 ); 3193 PRODUCT_NAME = "Colloquy Tests"; 3194 TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Colloquy.app/Contents/MacOS/Colloquy"; 3195 WRAPPER_EXTENSION = octest; 3196 }; 3197 name = Development; 3036 3198 }; 3037 3199 /* End XCBuildConfiguration section */ … … 3078 3240 defaultConfigurationName = Release; 3079 3241 }; 3242 1C7A60BB09FDE8580029AC64 /* Build configuration list for PBXNativeTarget "Colloquy Tests" */ = { 3243 isa = XCConfigurationList; 3244 buildConfigurations = ( 3245 1C7A60BC09FDE8580029AC64 /* Release */, 3246 1C7A60BD09FDE8580029AC64 /* Release (Universal) */, 3247 1C7A60BE09FDE8580029AC64 /* Development */, 3248 ); 3249 defaultConfigurationIsVisible = 0; 3250 defaultConfigurationName = Release; 3251 }; 3080 3252 /* End XCConfigurationList section */ 3081 3253 }; trunk/Controllers/JVChatController.h
r3072 r3219 15 15 @interface JVChatController : NSObject { 16 16 @private 17 NSMutable Array*_chatWindows;18 NSMutable Array*_chatControllers;17 NSMutableSet *_chatWindows; 18 NSMutableSet *_chatControllers; 19 19 NSArray *_windowRuleSets; 20 20 } trunk/Controllers/JVChatController.m
r3206 r3219 79 79 - (id) init { 80 80 if( ( self = [super init] ) ) { 81 _chatWindows = [[NSMutableArray allocWithZone:nil] init]; 82 _chatControllers = [[NSMutableArray allocWithZone:nil] init]; 83 84 _windowRuleSets = nil; 81 _chatWindows = [[NSMutableSet allocWithZone:nil] initWithCapacity:5]; 82 _chatControllers = [[NSMutableSet allocWithZone:nil] initWithCapacity:50]; 83 85 84 [self _reloadPreferedWindowRuleSets]; 86 85 … … 190 189 191 190 - (NSSet *) allChatWindowControllers { 192 return [NSSet setWith Array:_chatWindows];191 return [NSSet setWithSet:_chatWindows]; 193 192 } 194 193 … … 235 234 236 235 - (NSSet *) allChatViewControllers { 237 return [NSSet setWith Array:_chatControllers];236 return [NSSet setWithSet:_chatControllers]; 238 237 } 239 238 trunk/Controllers/JVChatWindowController.m
r3214 r3219 50 50 - (id) initWithWindowNibName:(NSString *) windowNibName { 51 51 if( ( self = [super initWithWindowNibName:windowNibName] ) ) { 52 viewsDrawer = nil; 53 chatViewsOutlineView = nil; 54 viewActionButton = nil; 55 favoritesButton = nil; 56 _activeViewController = nil; 57 _identifier = nil; 58 _views = [[NSMutableArray array] retain]; 59 _usesSmallIcons = NO; 60 _settings = [[NSMutableDictionary dictionaryWithDictionary:[[NSUserDefaults standardUserDefaults] dictionaryForKey:[self userDefaultsPreferencesKey]]] retain]; 52 _views = [[NSMutableArray allocWithZone:nil] initWithCapacity:10]; 53 _settings = [[NSMutableDictionary allocWithZone:nil] initWithDictionary:[[NSUserDefaults standardUserDefaults] dictionaryForKey:[self userDefaultsPreferencesKey]]]; 61 54 } 62 55 … … 66 59 - (void) windowDidLoad { 67 60 NSTableColumn *column = [chatViewsOutlineView outlineTableColumn]; 68 JVDetailCell *prototypeCell = [[JVDetailCell new] autorelease];61 JVDetailCell *prototypeCell = [[JVDetailCell allocWithZone:nil] init]; 69 62 [prototypeCell setFont:[NSFont toolTipsFontOfSize:11.]]; 70 63 [column setDataCell:prototypeCell]; 64 [prototypeCell release]; 71 65 72 66 [chatViewsOutlineView setRefusesFirstResponder:YES]; … … 74 68 [chatViewsOutlineView setDoubleAction:@selector( _doubleClickedListItem: )]; 75 69 [chatViewsOutlineView setAutoresizesOutlineColumn:YES]; 76 [chatViewsOutlineView setMenu:[[[NSMenu alloc] initWithTitle:@""] autorelease]];77 70 [chatViewsOutlineView registerForDraggedTypes:[NSArray arrayWithObjects:JVChatViewPboardType, NSFilenamesPboardType, nil]]; 71 [chatViewsOutlineView setMenu:nil]; 78 72 79 73 [favoritesButton setMenu:[MVConnectionsController favoritesMenu]]; … … 104 98 105 99 - (void) dealloc { 106 [[self window] setDelegate:nil];107 [[self window] setToolbar:nil];108 109 [viewsDrawer setDelegate:nil];110 [chatViewsOutlineView setDelegate:nil];111 [chatViewsOutlineView setDataSource:nil];112 [favoritesButton setMenu:nil];113 114 100 [[NSNotificationCenter defaultCenter] removeObserver:self]; 115 101 … … 159 145 160 146 - (void) setIdentifier:(NSString *) identifier { 161 [_identifier autorelease];147 id old = _identifier; 162 148 _identifier = [identifier copyWithZone:[self zone]]; 163 164 [_settings autorelease]; 165 _settings = [[NSMutableDictionary dictionaryWithDictionary:[[NSUserDefaults standardUserDefaults] dictionaryForKey:[self userDefaultsPreferencesKey]]] retain]; 149 [old release]; 150 151 old = _settings; 152 _settings = [[NSMutableDictionary allocWithZone:nil] initWithDictionary:[[NSUserDefaults standardUserDefaults] dictionaryForKey:[self userDefaultsPreferencesKey]]]; 153 [old release]; 166 154 167 155 if( [[self identifier] length] ) { … … 481 469 482 470 - (NSToolbarItem *) toggleChatDrawerToolbarItem { 483 NSToolbarItem *toolbarItem = [[ [NSToolbarItem alloc] initWithItemIdentifier:JVToolbarToggleChatDrawerItemIdentifier] autorelease];471 NSToolbarItem *toolbarItem = [[NSToolbarItem alloc] initWithItemIdentifier:JVToolbarToggleChatDrawerItemIdentifier]; 484 472 485 473 [toolbarItem setLabel:NSLocalizedString( @"Drawer", "chat panes drawer toolbar item name" )]; … … 492 480 [toolbarItem setAction:@selector( toggleViewsDrawer: )]; 493 481 494 return toolbarItem;482 return [toolbarItem autorelease]; 495 483 } 496 484 … … 719 707 720 708 if( [org size].width > maxSideSize || [org size].height > maxSideSize ) { 721 NSImage *ret = [[[item icon] copy ] autorelease];709 NSImage *ret = [[[item icon] copyWithZone:nil] autorelease]; 722 710 [ret setScalesWhenResized:YES]; 723 711 [ret setSize:NSMakeSize( maxSideSize, maxSideSize )]; … … 804 792 id <JVChatViewController> dragedController = nil; 805 793 [pointerData getBytes:&dragedController]; 806 807 [[dragedController retain] autorelease]; 794 [dragedController retain]; 808 795 809 796 if( [_views containsObject:dragedController] ) { … … 817 804 else [self insertChatViewController:dragedController atIndex:index]; 818 805 806 [dragedController release]; 819 807 return YES; 820 808 } … … 868 856 id menuItem = nil; 869 857 NSMenu *menu = [chatViewsOutlineView menu]; 858 if( ! menu ) { 859 menu = [[NSMenu allocWithZone:nil] initWithTitle:@""]; 860 [chatViewsOutlineView setMenu:menu]; 861 [menu release]; 862 } 863 870 864 NSMenu *newMenu = ( [item respondsToSelector:@selector( menu )] ? [item menu] : nil ); 871 NSEnumerator *enumerator = [[[[menu itemArray] copy] autorelease] objectEnumerator]; 872 865 866 NSEnumerator *enumerator = [[[[menu itemArray] copyWithZone:nil] autorelease] objectEnumerator]; 873 867 while( ( menuItem = [enumerator nextObject] ) ) 874 868 [menu removeItem:menuItem]; 875 869 876 enumerator = [[[[newMenu itemArray] copy ] autorelease] objectEnumerator];870 enumerator = [[[[newMenu itemArray] copyWithZone:nil] autorelease] objectEnumerator]; 877 871 while( ( menuItem = [enumerator nextObject] ) ) { 878 872 [newMenu removeItem:menuItem]; … … 925 919 [(NSObject *)item willSelect]; 926 920 927 [_activeViewController autorelease];921 id old = _activeViewController; 928 922 _activeViewController = [item retain]; 923 [old release]; 929 924 930 925 [[self window] setContentView:[_activeViewController view]]; … … 937 932 [(NSObject *)_activeViewController didSelect]; 938 933 } else if( ! [_views count] || ! _activeViewController ) { 939 [[self window] setContentView:[[[NSView alloc] initWithFrame:[[[self window] contentView] frame]] autorelease]]; 934 NSView *placeHolder = [[NSView alloc] initWithFrame:[[[self window] contentView] frame]]; 935 [[self window] setContentView:placeHolder]; 936 [placeHolder release]; 937 940 938 [[[self window] toolbar] setDelegate:nil]; 941 939 [[self window] setToolbar:nil]; trunk/Controllers/JVSidebarChatWindowController.h
r3206 r3219 5 5 @interface JVSidebarChatWindowController : JVChatWindowController { 6 6 IBOutlet JVSideSplitView *splitView; 7 IBOutlet NSView *sideView;8 7 IBOutlet NSView *bodyView; 9 float _sideWidth;10 8 BOOL _forceSplitViewPosition; 11 9 } trunk/Controllers/JVSidebarChatWindowController.m
r3207 r3219 3 3 4 4 @interface JVChatWindowController (JVChatWindowControllerPrivate) 5 - (void) _claimMenuCommands;6 - (void) _resignMenuCommands;7 - (void) _refreshSelectionMenu;8 - (void) _refreshWindow;9 5 - (void) _refreshWindowTitle; 10 - (void) _refreshList;11 - (void) _refreshPreferences;12 6 @end 13 7 … … 20 14 21 15 - (id) initWithWindowNibName:(NSString *) windowNibName { 22 if( ( self = [super initWithWindowNibName:windowNibName] ) ) {16 if( ( self = [super initWithWindowNibName:windowNibName] ) ) 23 17 _forceSplitViewPosition = YES; 24 }25 26 18 return self; 27 19 } … … 30 22 [super windowDidLoad]; 31 23 32 NSRect sideFrame = [sideView frame];33 _sideWidth = sideFrame.size.width;34 35 24 [chatViewsOutlineView setAllowsEmptySelection:NO]; 36 25 37 [splitView adjustSubviews];26 [splitView setMainSubviewIndex:1]; 38 27 [splitView setPositionUsingName:@"JVSidebarSplitViewPosition"]; 39 28 } … … 44 33 45 34 - (void) splitViewDidResizeSubviews:(NSNotification *) notification { 46 // Cache the height of the send box so we can keep it constant during window resizes.47 NSRect sideFrame = [sideView frame];48 _sideWidth = sideFrame.size.width;49 50 35 if( ! _forceSplitViewPosition ) 51 36 [splitView savePositionUsingName:@"JVSidebarSplitViewPosition"]; 52 53 37 _forceSplitViewPosition = NO; 54 }55 56 - (void) splitView:(NSSplitView *) sender resizeSubviewsWithOldSize:(NSSize) oldSize {57 float dividerThickness = [sender dividerThickness];58 NSRect newFrame = [sender frame];59 60 // Keep the size of the send box constant during window resizes61 62 // We need to resize the scroll view frames of the webview and the textview.63 // The scroll views are two superviews up: NSTextView(WebView) -> NSClipView -> NSScrollView64 NSRect sideFrame = [sideView frame];65 NSRect bodyFrame = [bodyView frame];66 67 // Set size of the web view to the maximum size possible68 bodyFrame.size.height = NSHeight( newFrame );69 bodyFrame.size.width = NSWidth( newFrame ) - dividerThickness - _sideWidth;70 bodyFrame.origin.x = _sideWidth + dividerThickness;71 72 // Keep the send box the same size73 sideFrame.size.height = NSHeight( newFrame );74 sideFrame.size.width = _sideWidth;75 76 // Commit the changes77 [sideView setFrame:sideFrame];78 [bodyView setFrame:bodyFrame];79 38 } 80 39 trunk/Views/JVSideSplitView.m
r3206 r3219 6 6 } 7 7 8 - (BOOL) isVertical { 9 return YES; 10 } 11 8 12 - (void) drawDividerInRect:(NSRect) rect { 9 13 [[NSColor colorWithCalibratedWhite:0.65 alpha:1.] set]; trunk/Views/JVSideStatusView.m
r3214 r3219 67 67 [[self superview] setFrame:newFrame]; 68 68 69 [splitView adjustSubviews]; 70 69 71 [[NSNotificationCenter defaultCenter] postNotificationName:NSSplitViewDidResizeSubviewsNotification object:splitView]; 70 71 [splitView adjustSubviews];72 72 } 73 73 @end trunk/Views/JVSplitView.h
r3072 r3219 1 @interface JVSplitView : NSSplitView {} 1 @interface JVSplitView : NSSplitView { 2 long _mainSubviewIndex; 3 } 2 4 - (NSString *) stringWithSavedPosition; 3 5 - (void) setPositionFromString:(NSString *) string; … … 5 7 - (void) savePositionUsingName:(NSString *) name; 6 8 - (BOOL) setPositionUsingName:(NSString *) name; 9 10 - (void) setMainSubviewIndex:(long) index; 11 - (BOOL) mainSubviewIndex; 7 12 @end trunk/Views/JVSplitView.m
r3217 r3219 55 55 #pragma amrk - 56 56 57 - (void) setMainSubviewIndex:(long) index { 58 _mainSubviewIndex = index; 59 } 60 61 - (BOOL) mainSubviewIndex { 62 return _mainSubviewIndex; 63 } 64 65 #pragma amrk - 66 57 67 - (void) resetCursorRects { 58 68 if( ! [self isPaneSplitter] ) … … 73 83 } else [super drawDividerInRect:rect]; 74 84 } 85 86 #pragma mark - 87 88 - (void) adjustSubviews { 89 if( _mainSubviewIndex == -1 || [[self subviews] count] != 2 ) { 90 [super adjustSubviews]; 91 return; 92 } 93 94 float dividerThickness = [self dividerThickness]; 95 NSRect newFrame = [self frame]; 96 97 NSView *mainView = [[self subviews] objectAtIndex:_mainSubviewIndex]; 98 NSView *otherView = ( _mainSubviewIndex ? [[self subviews] objectAtIndex:0] : [[self subviews] objectAtIndex:1] ); 99 100 NSRect mainFrame = [mainView frame]; 101 NSRect otherFrame = [otherView frame]; 102 103 if( [self isVertical] ) { 104 mainFrame.size.width = NSWidth( newFrame ) - dividerThickness - NSWidth( otherFrame ); 105 mainFrame.size.height = NSHeight( newFrame ); 106 mainFrame.origin.x = ( _mainSubviewIndex ? NSWidth( otherFrame ) + dividerThickness : 0. ); 107 mainFrame.origin.y = 0.; 108 } else { 109 mainFrame.size.width = NSWidth( newFrame ); 110 mainFrame.size.height = NSHeight( newFrame ) - dividerThickness - NSHeight( otherFrame ); 111 mainFrame.origin.x = 0.; 112 mainFrame.origin.y = ( _mainSubviewIndex ? NSHeight( otherFrame ) + dividerThickness : 0. ); 113 } 114 115 if( [self isVertical] ) { 116 otherFrame.size.width = NSWidth( otherFrame ); 117 otherFrame.size.height = NSHeight( newFrame ); 118 otherFrame.origin.x = ( _mainSubviewIndex ? 0. : NSWidth( mainFrame ) + dividerThickness ); 119 otherFrame.origin.y = 0.; 120 } else { 121 otherFrame.size.width = NSWidth( newFrame ); 122 otherFrame.size.height = NSHeight( otherFrame ); 123 otherFrame.origin.x = 0.; 124 otherFrame.origin.y = ( _mainSubviewIndex ? 0. : NSWidth( mainFrame ) + dividerThickness ); 125 } 126 127 [mainView setFrame:mainFrame]; 128
