diff --git a/LineBreak.xcodeproj/project.pbxproj b/LineBreak.xcodeproj/project.pbxproj index 9330e2a..dd6317a 100755 --- a/LineBreak.xcodeproj/project.pbxproj +++ b/LineBreak.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 42; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ @@ -201,9 +201,16 @@ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; + attributes = { + LastUpgradeCheck = 0420; + }; buildConfigurationList = 036BFF5A09D4864F003A7A3E /* Build configuration list for PBXProject "LineBreak" */; - compatibilityVersion = "Xcode 2.4"; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + en, + ); mainGroup = 29B97314FDCFA39411CA2CEA /* LineBreak */; projectDirPath = ""; projectRoot = ""; @@ -278,10 +285,10 @@ 036BFF5309D4864D003A7A3E /* Development */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ""; GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_TREAT_WARNINGS_AS_ERRORS = YES; @@ -291,6 +298,7 @@ LIBRARY_SEARCH_PATHS = ""; OTHER_LDFLAGS = ""; PRODUCT_NAME = LineBreak; + SDKROOT = macosx; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", @@ -305,9 +313,9 @@ 036BFF5409D4864D003A7A3E /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; COPY_PHASE_STRIP = YES; FRAMEWORK_SEARCH_PATHS = ""; - GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_TREAT_WARNINGS_AS_ERRORS = YES; HEADER_SEARCH_PATHS = ""; @@ -316,6 +324,7 @@ LIBRARY_SEARCH_PATHS = ""; OTHER_LDFLAGS = ""; PRODUCT_NAME = LineBreak; + SDKROOT = macosx; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", @@ -330,6 +339,7 @@ 036BFF5509D4864D003A7A3E /* Default */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_TREAT_WARNINGS_AS_ERRORS = YES; @@ -339,6 +349,7 @@ LIBRARY_SEARCH_PATHS = ""; OTHER_LDFLAGS = ""; PRODUCT_NAME = LineBreak; + SDKROOT = macosx; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", @@ -357,7 +368,7 @@ i386, ); MACOSX_DEPLOYMENT_TARGET = 10.4; - SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; }; name = Development; }; @@ -369,7 +380,7 @@ i386, ); MACOSX_DEPLOYMENT_TARGET = 10.4; - SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; }; name = Deployment; }; @@ -381,7 +392,7 @@ i386, ); MACOSX_DEPLOYMENT_TARGET = 10.4; - SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; }; name = Default; }; diff --git a/ProtectionPanel.m b/ProtectionPanel.m index 7941c6a..9e77dfb 100755 --- a/ProtectionPanel.m +++ b/ProtectionPanel.m @@ -107,17 +107,18 @@ -(IBAction)addExtension:(id)sender { } -(IBAction)removeSelection:(id)sender { - int i; NSMutableArray *currentFileExtensions; - NSArray *selections = [[mExtensionsTable selectedRowEnumerator] allObjects]; + NSIndexSet *selections = [mExtensionsTable selectedRowIndexes]; if ([self isExcludeSelected]) { currentFileExtensions = [NSMutableArray arrayWithArray:[preferences arrayForKey:NonTextFileExtensionsKey]]; } else { currentFileExtensions = [NSMutableArray arrayWithArray:[preferences arrayForKey:TextFileExtensionsKey]]; } - for (i = ([selections count] - 1); i >= 0; i--) { - [currentFileExtensions removeObjectAtIndex:[[selections objectAtIndex:i] intValue]]; + NSUInteger i = [selections lastIndex]; + while (i != NSNotFound) { + [currentFileExtensions removeObjectAtIndex:i]; + i = [selections indexLessThanIndex:i]; } if ([self isExcludeSelected]) { [preferences setObject:[NSArray arrayWithArray:currentFileExtensions] forKey:NonTextFileExtensionsKey];