Less crap in the dock menu.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Wed, 6 Mar 2013 18:53:27 +0000 (19:53 +0100)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Wed, 6 Mar 2013 18:53:27 +0000 (19:53 +0100)
Enjoyable.xcodeproj/project.pbxproj
EnjoyableApplicationDelegate.m
Info.plist

index 9e1bd43a4974e9cae92747889a7e2c70c424df5c..19eb58ee3d32233983737d7f8984546cf750f433 100644 (file)
@@ -34,7 +34,6 @@
                EE1D7C9216E01E7000B000EB /* NSView+FirstResponder.m in Sources */ = {isa = PBXBuildFile; fileRef = EE1D7C9116E01E7000B000EB /* NSView+FirstResponder.m */; };
                EE1D7C9616E0ECCF00B000EB /* NSError+Description.m in Sources */ = {isa = PBXBuildFile; fileRef = EE1D7C9516E0ECCF00B000EB /* NSError+Description.m */; };
                EE96929416E54B480054A3C8 /* NSMenu+RepresentedObjectAccessors.m in Sources */ = {isa = PBXBuildFile; fileRef = EE96929316E54B480054A3C8 /* NSMenu+RepresentedObjectAccessors.m */; };
-               EED7E81516E7ADBB004A0BA4 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = EED7E81416E7ADBB004A0BA4 /* Info.plist */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
@@ -90,7 +89,6 @@
                EE1D7C9516E0ECCF00B000EB /* NSError+Description.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSError+Description.m"; sourceTree = "<group>"; };
                EE96929216E54B480054A3C8 /* NSMenu+RepresentedObjectAccessors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMenu+RepresentedObjectAccessors.h"; sourceTree = "<group>"; };
                EE96929316E54B480054A3C8 /* NSMenu+RepresentedObjectAccessors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMenu+RepresentedObjectAccessors.m"; sourceTree = "<group>"; };
-               EED7E81416E7ADBB004A0BA4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Help/Contents/Info.plist; sourceTree = "<group>"; };
                EEF86B7316E2241000674B87 /* NJInputPathElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NJInputPathElement.h; sourceTree = "<group>"; };
                EEF86B7416E298CD00674B87 /* NJEvents.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NJEvents.h; sourceTree = "<group>"; };
 /* End PBXFileReference section */
                29B97314FDCFA39411CA2CEA /* Enjoy */ = {
                        isa = PBXGroup;
                        children = (
-                               EED7E81416E7ADBB004A0BA4 /* Info.plist */,
                                080E96DDFE201D6D7F000001 /* Classes */,
                                EE1D5F8B16E403D600749C36 /* Categories */,
                                29B97315FDCFA39411CA2CEA /* Other Sources */,
                        isa = PBXNativeTarget;
                        buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Enjoyable" */;
                        buildPhases = (
-                               EED7E81616E7B547004A0BA4 /* ShellScript */,
+                               EED7E81616E7B547004A0BA4 /* Generate Help Index */,
                                8D1107290486CEB800E47090 /* Resources */,
                                8D11072C0486CEB800E47090 /* Sources */,
                                8D11072E0486CEB800E47090 /* Frameworks */,
                                1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
                                D5F80A9D0FB0A2FF0006A4DE /* icon.icns in Resources */,
                                EE03150D16E63481002B2DCE /* Help in Resources */,
-                               EED7E81516E7ADBB004A0BA4 /* Info.plist in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
-               EED7E81616E7B547004A0BA4 /* ShellScript */ = {
+               EED7E81616E7B547004A0BA4 /* Generate Help Index */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
                        );
                        inputPaths = (
                        );
+                       name = "Generate Help Index";
                        outputPaths = (
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                                ALWAYS_SEARCH_USER_PATHS = NO;
                                ARCHS = "$(ARCHS_STANDARD_64_BIT)";
                                CLANG_ENABLE_OBJC_ARC = YES;
+                               CLANG_WARN_EMPTY_BODY = YES;
+                               CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                COPY_PHASE_STRIP = NO;
-                               FRAMEWORK_SEARCH_PATHS = (
-                                       "$(inherited)",
-                                       "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks\"",
-                               );
+                               GCC_C_LANGUAGE_STANDARD = c99;
                                GCC_DYNAMIC_NO_PIC = NO;
                                GCC_MODEL_TUNING = G5;
                                GCC_OPTIMIZATION_LEVEL = 0;
                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
                                GCC_PREFIX_HEADER = Enjoyable_Prefix.pch;
+                               GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
+                               GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
                                INFOPLIST_FILE = Info.plist;
                                INSTALL_PATH = "$(HOME)/Applications";
                                MACOSX_DEPLOYMENT_TARGET = 10.7;
                                ALWAYS_SEARCH_USER_PATHS = NO;
                                ARCHS = "$(ARCHS_STANDARD_64_BIT)";
                                CLANG_ENABLE_OBJC_ARC = YES;
+                               CLANG_WARN_EMPTY_BODY = YES;
+                               CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO;
                                COMBINE_HIDPI_IMAGES = YES;
                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-                               FRAMEWORK_SEARCH_PATHS = (
-                                       "$(inherited)",
-                                       "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks\"",
-                               );
+                               GCC_C_LANGUAGE_STANDARD = c99;
                                GCC_MODEL_TUNING = G5;
                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
                                GCC_PREFIX_HEADER = Enjoyable_Prefix.pch;
+                               GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
+                               GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
                                INFOPLIST_FILE = Info.plist;
                                INSTALL_PATH = "$(HOME)/Applications";
                                MACOSX_DEPLOYMENT_TARGET = 10.7;
index fd70bdc22d69322872e360ab37675356a94b211e..5f79f20f6cf92ac500e664497d99b729597bd226 100644 (file)
         [splitView adjustSubviews];
 }
 
+- (NSMenu *)applicationDockMenu:(NSApplication *)sender {
+    NSMenu *menu = [[NSMenu alloc] init];
+    int added = 0;
+    for (NJMapping *mapping in self.mappingsController) {
+        NSString *keyEquiv = ++added < 10 ? @(added).stringValue : @"";
+        NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:mapping.name
+                                                      action:@selector(chooseMapping:)
+                                               keyEquivalent:keyEquiv];
+        item.representedObject = mapping;
+        item.state = mapping == self.mappingsController.currentMapping;
+        [menu addItem:item];
+    }
+    return menu;
+}
+
 @end
index 3881216428a5ada4e5fd68ca257d8c5cad3c65c4..a27f386be9212d7f8eff15116e6f729b0084a376 100644 (file)
@@ -2,22 +2,18 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
-       <key>CFBundleHelpBookName</key>
-       <string>com.yukkurigames.Enjoyable.help</string>
-       <key>CFBundleHelpBookFolder</key>
-       <string>Help</string>
-       <key>NSSupportsAutomaticTermination</key>
-       <string>YES</string>
-       <key>NSSupportsSuddenTermination</key>
-       <true/>
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleExecutable</key>
        <string>${EXECUTABLE_NAME}</string>
+       <key>CFBundleHelpBookFolder</key>
+       <string>Help</string>
+       <key>CFBundleHelpBookName</key>
+       <string>com.yukkurigames.Enjoyable.help</string>
        <key>CFBundleIconFile</key>
        <string>icon.icns</string>
        <key>CFBundleIdentifier</key>
-       <string>com.korewanetadesu.${PRODUCT_NAME:identifier}</string>
+       <string>com.yukkurigames.${PRODUCT_NAME:identifier}</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleName</key>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
-       <string>0.5</string>
+       <string>1.0</string>
        <key>CFBundleSignature</key>
        <string>????</string>
-       <key>CFBundleVersion</key>
-       <string>3</string>
        <key>LSApplicationCategoryType</key>
        <string>public.app-category.utilities</string>
        <key>NSHumanReadableCopyright</key>
@@ -38,5 +32,9 @@
        <string>MainMenu</string>
        <key>NSPrincipalClass</key>
        <string>NSApplication</string>
+       <key>NSSupportsAutomaticTermination</key>
+       <string>YES</string>
+       <key>NSSupportsSuddenTermination</key>
+       <true/>
 </dict>
 </plist>