Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Commit

Permalink
Merge pull request #19 from insanehunter/master
Browse files Browse the repository at this point in the history
Update project for Xcode 7.1 and add Retina support
  • Loading branch information
cl3m committed Feb 15, 2016
2 parents 311fb75 + 6e49316 commit e1c4ece
Show file tree
Hide file tree
Showing 11 changed files with 151 additions and 16 deletions.
4 changes: 3 additions & 1 deletion Info.plist
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string>mouse.icns</string>
<key>CFBundleIdentifier</key>
<string>com.rouge41.middleClick</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand All @@ -22,5 +22,7 @@
<string>1.0</string>
<key>LSBackgroundOnly</key>
<true/>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
20 changes: 14 additions & 6 deletions MiddleClick.xcodeproj/project.pbxproj
Expand Up @@ -3,10 +3,11 @@
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objectVersion = 46;
objects = {

/* Begin PBXBuildFile section */
434F19DD1C6BCAB10009D8F7 /* mouse@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 434F19DC1C6BCAB10009D8F7 /* mouse@2x.png */; };
75032EF60FF697A4004CECD2 /* mouse.icns in Resources */ = {isa = PBXBuildFile; fileRef = 75032EF50FF697A4004CECD2 /* mouse.icns */; };
7519A949108A763300466740 /* WakeObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 7519A948108A763300466740 /* WakeObserver.m */; };
7569F71E1007F64500D9CE54 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7569F71D1007F64500D9CE54 /* IOKit.framework */; };
Expand All @@ -27,6 +28,7 @@
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
32CA4F630368D1EE00C91783 /* MiddleClick_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MiddleClick_Prefix.pch; sourceTree = "<group>"; };
434F19DC1C6BCAB10009D8F7 /* mouse@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mouse@2x.png"; sourceTree = "<group>"; };
75032EF50FF697A4004CECD2 /* mouse.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = mouse.icns; sourceTree = "<group>"; };
7519A947108A763300466740 /* WakeObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WakeObserver.h; sourceTree = "<group>"; };
7519A948108A763300466740 /* WakeObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WakeObserver.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -124,6 +126,7 @@
758786B9103357F6004E024C /* relaunch */,
75032EF50FF697A4004CECD2 /* mouse.icns */,
75A6B6AA0FEE96540071FAC0 /* mouse.png */,
434F19DC1C6BCAB10009D8F7 /* mouse@2x.png */,
8D1107310486CEB800E47090 /* Info.plist */,
);
name = Resources;
Expand Down Expand Up @@ -167,8 +170,11 @@
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0720;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MiddleClick" */;
compatibilityVersion = "Xcode 3.1";
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
Expand All @@ -193,6 +199,7 @@
files = (
75A6B6AB0FEE96540071FAC0 /* mouse.png in Resources */,
75032EF60FF697A4004CECD2 /* mouse.icns in Resources */,
434F19DD1C6BCAB10009D8F7 /* mouse@2x.png in Resources */,
758786BA103357F6004E024C /* relaunch in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -218,7 +225,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -232,6 +239,7 @@
GCC_PREFIX_HEADER = MiddleClick_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
PRODUCT_BUNDLE_IDENTIFIER = com.rouge41.middleClick;
PRODUCT_NAME = MiddleClick;
SDKROOT = macosx;
};
Expand All @@ -241,7 +249,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -252,6 +260,7 @@
GCC_PREFIX_HEADER = MiddleClick_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
PRODUCT_BUNDLE_IDENTIFIER = com.rouge41.middleClick;
PRODUCT_NAME = MiddleClick;
SDKROOT = macosx;
};
Expand All @@ -260,7 +269,7 @@
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
Expand All @@ -273,7 +282,6 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D1107260486CEB800E47090"
BuildableName = "MiddleClick.app"
BlueprintName = "MiddleClick"
ReferencedContainer = "container:MiddleClick.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D1107260486CEB800E47090"
BuildableName = "MiddleClick.app"
BlueprintName = "MiddleClick"
ReferencedContainer = "container:MiddleClick.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D1107260486CEB800E47090"
BuildableName = "MiddleClick.app"
BlueprintName = "MiddleClick"
ReferencedContainer = "container:MiddleClick.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D1107260486CEB800E47090"
BuildableName = "MiddleClick.app"
BlueprintName = "MiddleClick"
ReferencedContainer = "container:MiddleClick.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>MiddleClick.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>8D1107260486CEB800E47090</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
2 changes: 1 addition & 1 deletion TrayMenu.h
Expand Up @@ -8,7 +8,7 @@
#import "Controller.h"


@interface TrayMenu : NSObject {
@interface TrayMenu : NSObject <NSFileManagerDelegate> {
@private
NSStatusItem *_statusItem;
Controller *myController;
Expand Down
16 changes: 8 additions & 8 deletions TrayMenu.m
Expand Up @@ -57,8 +57,7 @@ - (void) actionQuit:(id)sender {
}

- (NSMenu *) createMenu {
NSZone *menuZone = [NSMenu menuZone];
NSMenu *menu = [[NSMenu allocWithZone:menuZone] init];
NSMenu *menu = [NSMenu new];
NSMenuItem *menuItem;

// Add About
Expand Down Expand Up @@ -90,7 +89,8 @@ - (void) applicationDidFinishLaunching:(NSNotification *)notification {
NSMenu *menu = [self createMenu];

// Check if Darkmode menubar is supported and enable templating of the icon in that case.
NSImage *icon = [NSImage imageNamed:@"mouse.png"];
NSImage *icon = [NSImage imageNamed:@"mouse"];
[icon setSize:CGSizeMake(19, 19)];

BOOL oldBusted = (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_9);
if (!oldBusted)
Expand All @@ -100,11 +100,11 @@ - (void) applicationDidFinishLaunching:(NSNotification *)notification {
}

_statusItem = [[[NSStatusBar systemStatusBar]
statusItemWithLength:NSSquareStatusItemLength] retain];
[_statusItem setMenu:menu];
[_statusItem setHighlightMode:YES];
[_statusItem setToolTip:@"MiddleClick"];
[_statusItem setImage:icon];
statusItemWithLength:NSSquareStatusItemLength] retain];
_statusItem.highlightMode = YES;
_statusItem.menu = menu;
_statusItem.button.toolTip = @"MiddleClick";
_statusItem.button.image = icon;

[menu release];
}
Expand Down
Binary file modified mouse.icns
Binary file not shown.
Binary file added mouse@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e1c4ece

Please sign in to comment.