Update project for OS X 10.10.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Mon, 27 Oct 2014 10:12:38 +0000 (11:12 +0100)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Mon, 27 Oct 2014 10:12:38 +0000 (11:12 +0100)
Classes/NJInputController.m
Classes/NJKeyInputField.m
Classes/NJMapping.m
Classes/NJOutputKeyPress.m
Classes/NJOutputViewController.m
Enjoyable.xcodeproj/project.pbxproj
Info.plist

index ed0d72d8208c14ef0f771bff4bb7ec66bc7be188..2200cb0dbbbb1ad5fa9ebfc307bdfbce3a8650c0 100644 (file)
@@ -380,7 +380,8 @@ static CVReturn _updateDL(CVDisplayLinkRef displayLink,
 - (void)removeMappingAtIndex:(NSInteger)idx {
     NSInteger currentIdx = [self indexOfMapping:_currentMapping];
     [_mappings removeObjectAtIndex:idx];
-    [self activateMapping:self.mappings[MIN(currentIdx, _mappings.count - 1)]];
+    NSInteger activeIdx = MIN(currentIdx, (NSInteger)_mappings.count - 1);
+    [self activateMapping:self.mappings[activeIdx]];
     [self mappingsChanged];
 }
 
index 36435f00b870b55e00f43aad0f2dfcda8b8ffe78..3cdbd7ce63b84747167a81ca5a923174ef6d1282 100644 (file)
@@ -267,7 +267,7 @@ static BOOL isValidKeyCode(long code) {
     warning.hidden = YES;
     char *error = NULL;
     const char *s = field.stringValue.UTF8String;
-    long code = strtol(s, &error, 16);
+    short code = (short)strtol(s, &error, 16);
     
     if (!*error && isValidKeyCode(code) && field.stringValue.length) {
         self.keyCode = code;
index bcd2a8d405680a4c66c4ad8046b7681d5e0df23e..1b05c424bfe708ab23698b07448ffea79c368eec 100644 (file)
     NSInputStream *stream = [NSInputStream inputStreamWithURL:url];
     [stream open];
     NSDictionary *serialization = stream && !*error
-        ? [NSJSONSerialization JSONObjectWithStream:stream options:0 error:error]
+        ? [NSJSONSerialization JSONObjectWithStream:stream
+                                            options:(NSJSONReadingOptions)0
+                                              error:error]
         : nil;
     [stream close];
     
index a69d8f3e3ba2fc14528576bea618ed3e35cc31a6..d685d35519966acf49281aaeb48e18568594308e 100644 (file)
@@ -23,7 +23,7 @@
 
 + (NJOutput *)outputWithSerialization:(NSDictionary *)serialization {
     NJOutputKeyPress *output = [[NJOutputKeyPress alloc] init];
-    output.keyCode = [serialization[@"key"] intValue];
+    output.keyCode = [serialization[@"key"] shortValue];
     return output;
 }
 
index 9bd723b8810cafbfac7e24647ebe21ce8c04a5da..8d0f817aa1db033719d4fb47f8515de950f6e791 100644 (file)
@@ -54,7 +54,7 @@
     
     if (row != 3) {
         self.mouseDirSelect.selectedSegment = -1;
-        self.mouseSpeedSlider.floatValue = self.mouseSpeedSlider.minValue;
+        self.mouseSpeedSlider.doubleValue = self.mouseSpeedSlider.minValue;
         [self.mouseDirSelect resignIfFirstResponder];
     } else {
         if (self.mouseDirSelect.selectedSegment == -1)
@@ -71,7 +71,7 @@
     
     if (row != 5) {
         self.scrollDirSelect.selectedSegment = -1;
-        self.scrollSpeedSlider.floatValue = self.scrollSpeedSlider.minValue;
+        self.scrollSpeedSlider.doubleValue = self.scrollSpeedSlider.minValue;
         self.smoothCheck.state = NSOffState;
         [self.scrollDirSelect resignIfFirstResponder];
         [self.scrollSpeedSlider resignIfFirstResponder];
     [self.radioButtons selectCellAtRow:5 column:0];
     [sender.window makeFirstResponder:sender];
     if (sender.state == NSOnState) {
-        self.scrollSpeedSlider.floatValue =
+        self.scrollSpeedSlider.doubleValue =
             self.scrollSpeedSlider.minValue
             + (self.scrollSpeedSlider.maxValue - self.scrollSpeedSlider.minValue) / 2;
         self.scrollSpeedSlider.enabled = YES;
     } else {
-        self.scrollSpeedSlider.floatValue = self.scrollSpeedSlider.minValue;
+        self.scrollSpeedSlider.doubleValue = self.scrollSpeedSlider.minValue;
         self.scrollSpeedSlider.enabled = NO;
     }
     [self commit];
         }
         case 3: {
             NJOutputMouseMove *mm = [[NJOutputMouseMove alloc] init];
-            mm.axis = self.mouseDirSelect.selectedSegment;
+            mm.axis = (int)self.mouseDirSelect.selectedSegment;
             mm.speed = self.mouseSpeedSlider.floatValue;
             return mm;
         }
         case 4: {
             NJOutputMouseButton *mb = [[NJOutputMouseButton alloc] init];
-            mb.button = [self.mouseBtnSelect.cell tagForSegment:self.mouseBtnSelect.selectedSegment];
+            mb.button = (int)[self.mouseBtnSelect.cell tagForSegment:self.mouseBtnSelect.selectedSegment];
             return mb;
         }
         case 5: {
             NJOutputMouseScroll *ms = [[NJOutputMouseScroll alloc] init];
-            ms.direction = [self.scrollDirSelect.cell tagForSegment:self.scrollDirSelect.selectedSegment];
+            ms.direction = (int)[self.scrollDirSelect.cell tagForSegment:self.scrollDirSelect.selectedSegment];
             ms.speed = self.scrollSpeedSlider.floatValue;
             ms.smooth = self.smoothCheck.state == NSOnState;
             return ms;
index c244de0795310bf3e67886b8d62a96a7261410e4..e12f9dc6a2be413ebaf5742528dd8983450061e3 100644 (file)
@@ -23,7 +23,7 @@
                EE8455DD16F0E46B00F32A01 /* NSRunningApplication+LoginItem.m in Sources */ = {isa = PBXBuildFile; fileRef = EE8455DC16F0E46B00F32A01 /* NSRunningApplication+LoginItem.m */; };
                EED4CE6E16ED692400C65AA8 /* NJMappingMenuController.m in Sources */ = {isa = PBXBuildFile; fileRef = EED4CE6D16ED692400C65AA8 /* NJMappingMenuController.m */; };
                EED4CE7716EE195100C65AA8 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EED4CE7616EE195100C65AA8 /* Sparkle.framework */; };
-               EED4CE7816EE195B00C65AA8 /* Sparkle.framework in Copy Sparkle Framework */ = {isa = PBXBuildFile; fileRef = EED4CE7616EE195100C65AA8 /* Sparkle.framework */; };
+               EED4CE7816EE195B00C65AA8 /* Sparkle.framework in Copy Sparkle Framework */ = {isa = PBXBuildFile; fileRef = EED4CE7616EE195100C65AA8 /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
                EEE703DC16F089FE002FDD69 /* NJHIDManager.m in Sources */ = {isa = PBXBuildFile; fileRef = EEE703DB16F089FE002FDD69 /* NJHIDManager.m */; };
                EEE703DE16F0B3F6002FDD69 /* NJInputPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = EEE703DD16F0B3F6002FDD69 /* NJInputPathElement.m */; };
                EEE73B1616EA42E5009D9D99 /* NSRunningApplication+NJPossibleNames.m in Sources */ = {isa = PBXBuildFile; fileRef = EEE73B1516EA42E5009D9D99 /* NSRunningApplication+NJPossibleNames.m */; };
                29B97313FDCFA39411CA2CEA /* Project object */ = {
                        isa = PBXProject;
                        attributes = {
-                               LastUpgradeCheck = 0500;
+                               LastUpgradeCheck = 0610;
                        };
                        buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Enjoyable" */;
                        compatibilityVersion = "Xcode 3.2";
                                CLANG_ENABLE_OBJC_ARC = YES;
                                CLANG_WARN_EMPTY_BODY = YES;
                                CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO;
-                               CODE_SIGN_IDENTITY = "Joe Wreschnig's Self-Signed OS X Applications";
+                               CODE_SIGN_IDENTITY = "";
                                COMBINE_HIDPI_IMAGES = YES;
                                COPY_PHASE_STRIP = NO;
                                FRAMEWORK_SEARCH_PATHS = (
                                CLANG_ENABLE_OBJC_ARC = YES;
                                CLANG_WARN_EMPTY_BODY = YES;
                                CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO;
-                               CODE_SIGN_IDENTITY = "Joe Wreschnig's Self-Signed OS X Applications";
+                               CODE_SIGN_IDENTITY = "";
                                COMBINE_HIDPI_IMAGES = YES;
                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
                                FRAMEWORK_SEARCH_PATHS = (
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                CLANG_ENABLE_OBJC_ARC = YES;
+                               CLANG_WARN_ASSIGN_ENUM = YES;
                                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                                CLANG_WARN_ENUM_CONVERSION = YES;
-                               CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO;
+                               CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
                                CLANG_WARN_INT_CONVERSION = YES;
                                CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+                               CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
                                CLANG_WARN_OBJC_RECEIVER_WEAK = NO;
+                               CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = NO;
                                CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
-                               CLANG_WARN__DUPLICATE_METHOD_MATCH = NO;
+                               CLANG_WARN_UNREACHABLE_CODE = YES;
+                               CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+                               CODE_SIGN_IDENTITY = "";
                                GCC_C_LANGUAGE_STANDARD = c99;
                                GCC_OPTIMIZATION_LEVEL = 0;
                                GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                CLANG_ENABLE_OBJC_ARC = YES;
+                               CLANG_WARN_ASSIGN_ENUM = YES;
                                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                                CLANG_WARN_ENUM_CONVERSION = YES;
-                               CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO;
+                               CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
                                CLANG_WARN_INT_CONVERSION = YES;
                                CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+                               CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
                                CLANG_WARN_OBJC_RECEIVER_WEAK = NO;
+                               CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = NO;
                                CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
-                               CLANG_WARN__DUPLICATE_METHOD_MATCH = NO;
+                               CLANG_WARN_UNREACHABLE_CODE = YES;
+                               CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+                               CODE_SIGN_IDENTITY = "";
                                GCC_C_LANGUAGE_STANDARD = c99;
                                GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
                                GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
index 2dfc0d898a3b086d90cf70c18ddfaaf50c5eca6c..f7e61d5d2a6d0f4050f1c49bd4a68507a212dc51 100644 (file)
@@ -46,7 +46,7 @@
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>609</string>
+       <string>630</string>
        <key>LSApplicationCategoryType</key>
        <string>public.app-category.utilities</string>
        <key>NSHumanReadableCopyright</key>