From: Joe Wreschnig Date: Wed, 6 Mar 2013 18:53:27 +0000 (+0100) Subject: Less crap in the dock menu. X-Git-Tag: version-1.0~19 X-Git-Url: https://git.yukkurigames.com/?a=commitdiff_plain;h=72a9fcd1e832a4e22f02018b855feaa414ae8c5c;p=enjoyable.git Less crap in the dock menu. --- diff --git a/Enjoyable.xcodeproj/project.pbxproj b/Enjoyable.xcodeproj/project.pbxproj index 9e1bd43..19eb58e 100644 --- a/Enjoyable.xcodeproj/project.pbxproj +++ b/Enjoyable.xcodeproj/project.pbxproj @@ -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 = ""; }; EE96929216E54B480054A3C8 /* NSMenu+RepresentedObjectAccessors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMenu+RepresentedObjectAccessors.h"; sourceTree = ""; }; EE96929316E54B480054A3C8 /* NSMenu+RepresentedObjectAccessors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMenu+RepresentedObjectAccessors.m"; sourceTree = ""; }; - EED7E81416E7ADBB004A0BA4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Help/Contents/Info.plist; sourceTree = ""; }; EEF86B7316E2241000674B87 /* NJInputPathElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NJInputPathElement.h; sourceTree = ""; }; EEF86B7416E298CD00674B87 /* NJEvents.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NJEvents.h; sourceTree = ""; }; /* End PBXFileReference section */ @@ -179,7 +177,6 @@ 29B97314FDCFA39411CA2CEA /* Enjoy */ = { isa = PBXGroup; children = ( - EED7E81416E7ADBB004A0BA4 /* Info.plist */, 080E96DDFE201D6D7F000001 /* Classes */, EE1D5F8B16E403D600749C36 /* Categories */, 29B97315FDCFA39411CA2CEA /* Other Sources */, @@ -241,7 +238,7 @@ isa = PBXNativeTarget; buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Enjoyable" */; buildPhases = ( - EED7E81616E7B547004A0BA4 /* ShellScript */, + EED7E81616E7B547004A0BA4 /* Generate Help Index */, 8D1107290486CEB800E47090 /* Resources */, 8D11072C0486CEB800E47090 /* Sources */, 8D11072E0486CEB800E47090 /* Frameworks */, @@ -292,20 +289,20 @@ 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; @@ -371,17 +368,18 @@ 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; @@ -395,15 +393,16 @@ 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; diff --git a/EnjoyableApplicationDelegate.m b/EnjoyableApplicationDelegate.m index fd70bdc..5f79f20 100644 --- a/EnjoyableApplicationDelegate.m +++ b/EnjoyableApplicationDelegate.m @@ -130,4 +130,19 @@ [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 diff --git a/Info.plist b/Info.plist index 3881216..a27f386 100644 --- a/Info.plist +++ b/Info.plist @@ -2,22 +2,18 @@ - CFBundleHelpBookName - com.yukkurigames.Enjoyable.help - CFBundleHelpBookFolder - Help - NSSupportsAutomaticTermination - YES - NSSupportsSuddenTermination - CFBundleDevelopmentRegion English CFBundleExecutable ${EXECUTABLE_NAME} + CFBundleHelpBookFolder + Help + CFBundleHelpBookName + com.yukkurigames.Enjoyable.help CFBundleIconFile icon.icns CFBundleIdentifier - com.korewanetadesu.${PRODUCT_NAME:identifier} + com.yukkurigames.${PRODUCT_NAME:identifier} CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -25,11 +21,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.5 + 1.0 CFBundleSignature ???? - CFBundleVersion - 3 LSApplicationCategoryType public.app-category.utilities NSHumanReadableCopyright @@ -38,5 +32,9 @@ MainMenu NSPrincipalClass NSApplication + NSSupportsAutomaticTermination + YES + NSSupportsSuddenTermination +