Skip to content

Commit

Permalink
* Made backwards compatible.
Browse files Browse the repository at this point in the history
 * Removed some unnecessary Yosemite+ code.
  • Loading branch information
thebitguru committed Dec 30, 2014
1 parent 5a1f66e commit 02d7500
Show file tree
Hide file tree
Showing 11 changed files with 161 additions and 67 deletions.
6 changes: 6 additions & 0 deletions Play Button iTunes Patch.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
77D3D3791A17C05200E427B4 /* GradientView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GradientView.m; sourceTree = "<group>"; };
77D3D37B1A17CAA300E427B4 /* logo-large.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "logo-large.png"; sourceTree = "<group>"; };
77D77A2B1A158B8C0053880F /* AboutWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AboutWindow.xib; sourceTree = "<group>"; };
77FAC0761A53661E00D23FCA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/MainMenu.strings; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -300,6 +301,7 @@
isa = PBXVariantGroup;
children = (
778FE4CF1A144EAC00A3CE34 /* Base */,
77FAC0761A53661E00D23FCA /* en */,
);
name = MainMenu.xib;
sourceTree = "<group>";
Expand Down Expand Up @@ -394,7 +396,9 @@
);
INFOPLIST_FILE = "iTunes Play Button Patch/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = "Play Button iTunes Patch";
SDKROOT = macosx10.9;
};
name = Debug;
};
Expand All @@ -409,7 +413,9 @@
);
INFOPLIST_FILE = "iTunes Play Button Patch/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = "Play Button iTunes Patch";
SDKROOT = macosx10.9;
};
name = Release;
};
Expand Down
17 changes: 0 additions & 17 deletions iTunes Play Button Patch/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,6 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
[self refreshView];

// TODO: Figure out how to hookup the directory watch.



// Yosemite+ styling.

Class vibrantClass = NSClassFromString(@"NSVisualEffectView");
if (vibrantClass) {
// [_window setStyleMask:[_window styleMask] | NSFullSizeContentViewWindowMask];
// [_window setTitleVisibility:NSWindowTitleHidden];
// [_window setTitlebarAppearsTransparent:YES];

// [_window setStyleMask:[_window styleMask] | (1 << 15)]; // NSFullSizeContentViewWindowMask
// [_window performSelector:NSSelectorFromString(@"setTitleVisibility:")
// withObject:[NSNumber numberWithInt:1]]; // NSWindowTitleHidden
// [_window performSelector:NSSelectorFromString(@"setTitlebarAppearsTransparent:")
// withObject:[NSNumber numberWithBool:YES]];
}
}

- (void)applicationWillTerminate:(NSNotification *)aNotification {
Expand Down
42 changes: 3 additions & 39 deletions iTunes Play Button Patch/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6254" systemVersion="14B25" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6254"/>
</dependencies>
<objects>
Expand Down Expand Up @@ -41,9 +42,6 @@
</menuItem>
<menuItem title="Check for Updates..." hidden="YES" enabled="NO" id="cCB-HD-P0w">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="checkForUpdates:" target="AhV-xa-6ej" id="gyy-uC-fvz"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
<menuItem title="Services" id="NMo-om-nkz">
Expand Down Expand Up @@ -77,47 +75,13 @@
</items>
</menu>
</menuItem>
<menuItem title="Window" id="aUF-d1-5bR">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
<items>
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
<connections>
<action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
</connections>
</menuItem>
<menuItem title="Zoom" id="R4o-n2-Eq4">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Help" id="wpr-3q-Mcd">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
<items>
<menuItem title="iTunes Play Button Patch Help" keyEquivalent="?" id="FKE-Sm-Kum">
<connections>
<action selector="showHelp:" target="-1" id="y7X-2Q-9no"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
<window identifier="mainWindow" title="Play Button iTunes Patch" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" frameAutosaveName="MainWindow" animationBehavior="default" id="QvC-M9-y7g">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowStyleMask key="styleMask" closable="YES" miniaturizable="YES"/>
<rect key="contentRect" x="335" y="390" width="750" height="545"/>
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
<value key="minSize" type="size" width="750" height="450"/>
Expand Down Expand Up @@ -184,7 +148,7 @@ DQ
</textField>
<scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IUL-yD-Jvs">
<rect key="frame" x="20" y="48" width="710" height="189"/>
<clipView key="contentView" id="rC1-jW-4MI">
<clipView key="contentView" copiesOnScroll="NO" id="rC1-jW-4MI">
<rect key="frame" x="1" y="0.0" width="238" height="134"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
Expand Down
2 changes: 1 addition & 1 deletion iTunes Play Button Patch/Patcher.m
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ - (void) restoreFromBackupFile:(RcdFile *)fileToRestore {
output:&output
errorDescription:&processErrorDescription];
if (!success) {
[NSException raise:@"could_not_restore" format:processErrorDescription];
[NSException raise:@"could_not_restore" format:@"%@", processErrorDescription];
}
}

Expand Down
123 changes: 123 additions & 0 deletions iTunes Play Button Patch/en.lproj/MainMenu.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@

/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "13Q-h0-5VA"; */
"13Q-h0-5VA.title" = "Text Cell";

/* Class = "NSMenuItem"; title = "iTunes Play Button Patch"; ObjectID = "1Xt-HY-uBw"; */
"1Xt-HY-uBw.title" = "iTunes Play Button Patch";

/* Class = "NSMenuItem"; title = "Quit iTunes Play Button Patch"; ObjectID = "4sb-4s-VLi"; */
"4sb-4s-VLi.title" = "Quit iTunes Play Button Patch";

/* Class = "NSMenuItem"; title = "About iTunes Play Button Patch"; ObjectID = "5kV-Vb-QxS"; */
"5kV-Vb-QxS.title" = "About iTunes Play Button Patch";

/* Class = "NSTextFieldCell"; title = "This program will patch the Remote Control Daemon to prevent it from starting iTunes whenever you press the play button on the keyboard or an external remote control. This will only prevent iTunes from starting, all other functions (like play/pause while iTunes is _running_) will continue to work as before.\n\nAlso, this program will backup the original file in case if you would like to restore the original functionality.\n \nThis program comes with ABSOLUTELY NO WARRANTY; please see the license in the about window."; ObjectID = "5zj-nX-X02"; */
"5zj-nX-X02.title" = "This program will patch the Remote Control Daemon to prevent it from starting iTunes whenever you press the play button on the keyboard or an external remote control. This will only prevent iTunes from starting, all other functions (like play/pause while iTunes is _running_) will continue to work as before.\n\nAlso, this program will backup the original file in case if you would like to restore the original functionality.\n \nThis program comes with ABSOLUTELY NO WARRANTY; please see the license in the about window.";

/* Class = "NSMenu"; title = "Main Menu"; ObjectID = "AYu-sK-qS6"; */
"AYu-sK-qS6.title" = "Main Menu";

/* Class = "NSMenu"; title = "Help"; ObjectID = "F2S-fz-NVQ"; */
"F2S-fz-NVQ.title" = "Help";

/* Class = "NSMenuItem"; title = "iTunes Play Button Patch Help"; ObjectID = "FKE-Sm-Kum"; */
"FKE-Sm-Kum.title" = "iTunes Play Button Patch Help";

/* Class = "NSTextFieldCell"; title = "Status..."; ObjectID = "G1z-cC-3e8"; */
"G1z-cC-3e8.title" = "Status...";

/* Class = "NSTextFieldCell"; title = "OS X Version"; ObjectID = "GhD-ry-KTY"; */
"GhD-ry-KTY.title" = "OS X Version";

/* Class = "NSTextFieldCell"; title = "Play Button iTunes Patch"; ObjectID = "Iq8-Cl-4lh"; */
"Iq8-Cl-4lh.title" = "Play Button iTunes Patch";

/* Class = "NSMenuItem"; title = "Show All"; ObjectID = "Kd2-mp-pUS"; */
"Kd2-mp-pUS.title" = "Show All";

/* Class = "NSMenuItem"; title = "Bring All to Front"; ObjectID = "LE2-aR-0XJ"; */
"LE2-aR-0XJ.title" = "Bring All to Front";

/* Class = "NSButtonCell"; title = "Restore from Backup"; ObjectID = "MW9-WL-0Sr"; */
"MW9-WL-0Sr.title" = "Restore from Backup";

/* Class = "NSMenuItem"; title = "Services"; ObjectID = "NMo-om-nkz"; */
"NMo-om-nkz.title" = "Services";

/* Class = "NSTextFieldCell"; title = "Version..."; ObjectID = "NbS-61-7xA"; */
"NbS-61-7xA.title" = "Version...";

/* Class = "NSMenuItem"; title = "Minimize"; ObjectID = "OY7-WF-poV"; */
"OY7-WF-poV.title" = "Minimize";

/* Class = "NSMenuItem"; title = "Hide iTunes Play Button Patch"; ObjectID = "Olw-nP-bQN"; */
"Olw-nP-bQN.title" = "Hide iTunes Play Button Patch";

/* Class = "NSWindow"; title = "Play Button iTunes Patch"; ObjectID = "QvC-M9-y7g"; */
"QvC-M9-y7g.title" = "Play Button iTunes Patch";

/* Class = "NSMenuItem"; title = "Zoom"; ObjectID = "R4o-n2-Eq4"; */
"R4o-n2-Eq4.title" = "Zoom";

/* Class = "NSMenu"; title = "Window"; ObjectID = "Td7-aD-5lo"; */
"Td7-aD-5lo.title" = "Window";

/* Class = "NSMenuItem"; title = "Hide Others"; ObjectID = "Vdr-fp-XzO"; */
"Vdr-fp-XzO.title" = "Hide Others";

/* Class = "NSTextFieldCell"; title = "Xcode command line tool status..."; ObjectID = "WR2-Oo-7VU"; */
"WR2-Oo-7VU.title" = "Xcode command line tool status...";

/* Class = "NSTableColumn"; headerCell.title = "Comments"; ObjectID = "WnR-3V-Xbj"; */
"WnR-3V-Xbj.headerCell.title" = "Comments";

/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "Z9V-93-fYL"; */
"Z9V-93-fYL.title" = "Text Cell";

/* Class = "NSMenuItem"; title = "Window"; ObjectID = "aUF-d1-5bR"; */
"aUF-d1-5bR.title" = "Window";

/* Class = "NSMenuItem"; title = "Check for Updates..."; ObjectID = "cCB-HD-P0w"; */
"cCB-HD-P0w.title" = "Check for Updates...";

/* Class = "NSTableColumn"; headerCell.title = "MD5 Sum"; ObjectID = "cRy-vV-fvo"; */
"cRy-vV-fvo.headerCell.title" = "MD5 Sum";

/* Class = "NSTextFieldCell"; title = "Status"; ObjectID = "d7s-oT-FDS"; */
"d7s-oT-FDS.title" = "Status";

/* Class = "NSButtonCell"; title = "Patch"; ObjectID = "f02-cN-DLs"; */
"f02-cN-DLs.title" = "Patch";

/* Class = "NSTableColumn"; headerCell.title = "Date Modified"; ObjectID = "ftU-vr-HiF"; */
"ftU-vr-HiF.headerCell.title" = "Date Modified";

/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "g1O-qU-J5f"; */
"g1O-qU-J5f.title" = "Text Cell";

/* Class = "NSMenuItem"; title = "Show in Finder..."; ObjectID = "gmX-kv-hqZ"; */
"gmX-kv-hqZ.title" = "Show in Finder...";

/* Class = "NSMenu"; title = "Services"; ObjectID = "hz9-B4-Xy5"; */
"hz9-B4-Xy5.title" = "Services";

/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "j4e-Ox-VNY"; */
"j4e-Ox-VNY.title" = "Text Cell";

/* Class = "NSTextFieldCell"; title = "Xcode Command Line Tools"; ObjectID = "lIE-fA-jed"; */
"lIE-fA-jed.title" = "Xcode Command Line Tools";

/* Class = "NSButtonCell"; title = "Refresh"; ObjectID = "pvz-8b-ccj"; */
"pvz-8b-ccj.title" = "Refresh";

/* Class = "NSButtonCell"; title = "Install"; ObjectID = "sta-26-Im5"; */
"sta-26-Im5.title" = "Install";

/* Class = "NSTableColumn"; headerCell.title = "File Name"; ObjectID = "uJg-zm-EyF"; */
"uJg-zm-EyF.headerCell.title" = "File Name";

/* Class = "NSMenu"; title = "iTunes Play Button Patch"; ObjectID = "uQy-DD-JDr"; */
"uQy-DD-JDr.title" = "iTunes Play Button Patch";

/* Class = "NSMenuItem"; title = "Help"; ObjectID = "wpr-3q-Mcd"; */
"wpr-3q-Mcd.title" = "Help";
Binary file removed package/Play Button iTunes Patch-final.dmg
Binary file not shown.
6 changes: 3 additions & 3 deletions package/Play Button iTunes Patch.app/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>14A382</string>
<string>13F26</string>
<key>DTSDKName</key>
<string>macosx10.10</string>
<string>macosx10.9</string>
<key>DTXcode</key>
<string>0611</string>
<key>DTXcodeBuild</key>
<string>6A2008a</string>
<key>LSMinimumSystemVersion</key>
<string>10.10</string>
<string>10.7</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2014 Farhan Ahmad. All rights reserved.</string>
<key>NSMainNibFile</key>
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
* Implemented the restore function.
* Removed Sparkle for now.


------------------------------------------
TODO:
* Figure out code signing and dmg creation.


DMG based on: http://mac101.net/content/how-to/how-to-create-dmg-art-for-fancy-application-installations/
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dict>
<key>hash</key>
<data>
rT0vOXIHyDlbS4GbCBj2jeYZ3M4=
alPCHSAchsevgfkDA0DtVH5z7ek=
</data>
<key>optional</key>
<true/>
Expand All @@ -25,6 +25,15 @@
<data>
XwuKKr40fG55Rfl6dI+D6tF7Mco=
</data>
<key>Resources/en.lproj/MainMenu.strings</key>
<dict>
<key>hash</key>
<data>
yOmVDHUdroTvnnCfx3SlCa9+zkg=
</data>
<key>optional</key>
<true/>
</dict>
<key>Resources/logo-large.png</key>
<data>
yd0SMhlTwlX70rY8XdBW/DpCuSE=
Expand All @@ -35,7 +44,7 @@
</data>
<key>Resources/notes.txt</key>
<data>
tQHtPK251mCacsq2HS2Gwdg4Oak=
TRCJEIckaU5CbhV8TMNYb3j/gaw=
</data>
</dict>
<key>files2</key>
Expand All @@ -52,7 +61,7 @@
<dict>
<key>hash</key>
<data>
rT0vOXIHyDlbS4GbCBj2jeYZ3M4=
alPCHSAchsevgfkDA0DtVH5z7ek=
</data>
<key>optional</key>
<true/>
Expand All @@ -61,6 +70,15 @@
<data>
XwuKKr40fG55Rfl6dI+D6tF7Mco=
</data>
<key>Resources/en.lproj/MainMenu.strings</key>
<dict>
<key>hash</key>
<data>
yOmVDHUdroTvnnCfx3SlCa9+zkg=
</data>
<key>optional</key>
<true/>
</dict>
<key>Resources/logo-large.png</key>
<data>
yd0SMhlTwlX70rY8XdBW/DpCuSE=
Expand All @@ -71,7 +89,7 @@
</data>
<key>Resources/notes.txt</key>
<data>
tQHtPK251mCacsq2HS2Gwdg4Oak=
TRCJEIckaU5CbhV8TMNYb3j/gaw=
</data>
</dict>
<key>rules</key>
Expand Down

0 comments on commit 02d7500

Please sign in to comment.