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 ed0d72d..2200cb0 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 36435f0..3cdbd7c 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 bcd2a8d..1b05c42 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 a69d8f3..d685d35 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 9bd723b..8d0f817 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 c244de0..e12f9dc 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 2dfc0d8..f7e61d5 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>