summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Schmitt <alan.schmitt@polytechnique.org>2016-11-01 17:16:00 +0100
committerAlan Schmitt <alan.schmitt@polytechnique.org>2016-11-01 17:16:00 +0100
commit02a910fd9e7d4f800f082dd8e46fc457634c6874 (patch)
treedca28a47876086489b21ed502ddb314808afadaf /src
parentced2484abe650006dbcba0c66f908989819256c1 (diff)
downloadunison-02a910fd9e7d4f800f082dd8e46fc457634c6874.zip
unison-02a910fd9e7d4f800f082dd8e46fc457634c6874.tar.gz
unison-02a910fd9e7d4f800f082dd8e46fc457634c6874.tar.bz2
Partially revert "Avoiding crash when no profile is selected"
This reverts commit ced2484abe650006dbcba0c66f908989819256c1 for the changes to the xib file.
Diffstat (limited to 'src')
-rw-r--r--src/uimac14/MyController.m6
-rw-r--r--src/uimac14/ProfileController.m25
-rw-r--r--src/uimac14/uimacnew.xcodeproj/project.pbxproj58
3 files changed, 15 insertions, 74 deletions
diff --git a/src/uimac14/MyController.m b/src/uimac14/MyController.m
index 1289549..302bffe 100644
--- a/src/uimac14/MyController.m
+++ b/src/uimac14/MyController.m
@@ -314,10 +314,8 @@ static MyController *me; // needed by reloadTable and displayStatus, below
- (IBAction)openButton:(id)sender
{
NSString *profile = [profileController selected];
- if (profile) {
- [self profileSelected:profile];
- [self connect:profile];
- }
+ [self profileSelected:profile];
+ [self connect:profile];
return;
}
diff --git a/src/uimac14/ProfileController.m b/src/uimac14/ProfileController.m
index cc6c7ed..6185513 100644
--- a/src/uimac14/ProfileController.m
+++ b/src/uimac14/ProfileController.m
@@ -25,20 +25,17 @@ NSString *unisonDirectory()
profiles = [[NSMutableArray alloc] init];
defaultIndex = -1;
- if (files) {
- for (i = j = 0; i < count; i++) {
- NSString *file = [files objectAtIndex:i];
- if ([[file pathExtension] isEqualTo:@"prf"]) {
- NSString *withoutExtension = [file stringByDeletingPathExtension];
- [profiles insertObject:withoutExtension atIndex:j];
- if ([@"default" isEqualTo:withoutExtension]) defaultIndex = j;
- j++;
- }
+ for (i = j = 0; i < count; i++) {
+ NSString *file = [files objectAtIndex:i];
+ if ([[file pathExtension] isEqualTo:@"prf"]) {
+ NSString *withoutExtension = [file stringByDeletingPathExtension];
+ [profiles insertObject:withoutExtension atIndex:j];
+ if ([@"default" isEqualTo:withoutExtension]) defaultIndex = j;
+ j++;
}
- if (j > 0)
- [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
-
}
+ if (j > 0)
+ [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
}
- (void)awakeFromNib
@@ -64,7 +61,7 @@ NSString *unisonDirectory()
{
if (rowIndex >= 0 && rowIndex < [profiles count])
return [profiles objectAtIndex:rowIndex];
- else return nil;
+ else return @"[internal error!]";
}
- (NSString *)selected
@@ -72,7 +69,7 @@ NSString *unisonDirectory()
int rowIndex = [tableView selectedRow];
if (rowIndex >= 0 && rowIndex < [profiles count])
return [profiles objectAtIndex:rowIndex];
- else return nil;
+ else return @"[internal error!]";
}
- (NSTableView *)tableView
diff --git a/src/uimac14/uimacnew.xcodeproj/project.pbxproj b/src/uimac14/uimacnew.xcodeproj/project.pbxproj
index a45139e..4f37965 100644
--- a/src/uimac14/uimacnew.xcodeproj/project.pbxproj
+++ b/src/uimac14/uimacnew.xcodeproj/project.pbxproj
@@ -413,7 +413,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0810;
+ LastUpgradeCheck = 0720;
};
buildConfigurationList = 2A3C3F2C0992245300E404E9 /* Build configuration list for PBXProject "uimacnew" */;
compatibilityVersion = "Xcode 6.3";
@@ -502,7 +502,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "if [ -x /usr/libexec/path_helper ]; then\n eval `/usr/libexec/path_helper -s`\nfi\nif [ -x `which opam` ]; then\n eval `opam config env`\nfi\nOCAMLLIBDIR=`ocamlc -v | tail -n -1 | sed -e 's/.* //g' | sed -e 's/\\\\\\/\\\\//g' | tr -d '\\r'`\nsource ${PROJECT_DIR}/../Makefile.ProjectInfo\necho MARKETING_VERSION = $VERSION > ${PROJECT_DIR}/ExternalSettings.xcconfig\necho OCAMLLIBDIR = $OCAMLLIBDIR >> ${PROJECT_DIR}/ExternalSettings.xcconfig";
+ shellScript = "if [ -x /usr/libexec/path_helper ]; then\n eval `/usr/libexec/path_helper -s`\nfi\nOCAMLLIBDIR=`ocamlc -v | tail -n -1 | sed -e 's/.* //g' | sed -e 's/\\\\\\/\\\\//g' | tr -d '\\r'`\nsource ${PROJECT_DIR}/../Makefile.ProjectInfo\necho MARKETING_VERSION = $VERSION > ${PROJECT_DIR}/ExternalSettings.xcconfig\necho OCAMLLIBDIR = $OCAMLLIBDIR >> ${PROJECT_DIR}/ExternalSettings.xcconfig";
};
2E282CBA0D9AE17300439D01 /* Run Script (make unison-blob.o) */ = {
isa = PBXShellScriptBuildPhase;
@@ -722,25 +722,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 2E282CCC0D9AE2E800439D01 /* ExternalSettings.xcconfig */;
buildSettings = {
- CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
LIBRARY_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 10.6;
ONLY_ACTIVE_ARCH = YES;
@@ -754,24 +736,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 2E282CCC0D9AE2E800439D01 /* ExternalSettings.xcconfig */;
buildSettings = {
- CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
LIBRARY_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 10.6;
PRODUCT_BUNDLE_IDENTIFIER = edu.upenn.cis.Unison;
@@ -784,24 +748,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 2E282CCC0D9AE2E800439D01 /* ExternalSettings.xcconfig */;
buildSettings = {
- CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
LIBRARY_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 10.6;
PRODUCT_BUNDLE_IDENTIFIER = edu.upenn.cis.Unison;