aboutsummaryrefslogtreecommitdiffstats
path: root/Demo
diff options
context:
space:
mode:
authorVadim Shpakovski2015-01-09 22:04:10 +0300
committerVadim Shpakovski2015-01-09 22:04:10 +0300
commit0a0619461d473085608af0aa1e00540bf6253a9c (patch)
tree4c29885df1089d67a88bbf852ed87cfe5d3b0e68 /Demo
parent25d97b68c7e2ad3f91ed285c17005b90bf9d8849 (diff)
downloadMASShortcut-0a0619461d473085608af0aa1e00540bf6253a9c.tar.bz2
Remove Xcode warnings and fix the hard-coded shortcut.
Diffstat (limited to 'Demo')
-rw-r--r--Demo/AppDelegate.m4
-rw-r--r--Demo/MainMenu.xib14
2 files changed, 9 insertions, 9 deletions
diff --git a/Demo/AppDelegate.m b/Demo/AppDelegate.m
index fd8d307..24d2c81 100644
--- a/Demo/AppDelegate.m
+++ b/Demo/AppDelegate.m
@@ -43,7 +43,7 @@ static void *MASObservingContext = &MASObservingContext;
context:MASObservingContext];
}
-- (void) playShortcutFeedback
+- (void)playShortcutFeedback
{
[[NSSound soundNamed:@"Ping"] play];
[_feedbackTextField setStringValue:@"Shortcut pressed!"];
@@ -83,7 +83,7 @@ static void *MASObservingContext = &MASObservingContext;
- (void) setHardcodedShortcutEnabled: (BOOL) enabled
{
- MASShortcut *shortcut = [MASShortcut shortcutWithKeyCode:kVK_ANSI_Keypad2 modifierFlags:NSCommandKeyMask];
+ MASShortcut *shortcut = [MASShortcut shortcutWithKeyCode:kVK_F2 modifierFlags:NSCommandKeyMask];
if (enabled) {
[[MASShortcutMonitor sharedMonitor] registerShortcut:shortcut withAction:^{
[self playShortcutFeedback];
diff --git a/Demo/MainMenu.xib b/Demo/MainMenu.xib
index 3d99587..a04814d 100644
--- a/Demo/MainMenu.xib
+++ b/Demo/MainMenu.xib
@@ -649,10 +649,10 @@
</menu>
<window title="Demo" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" frameAutosaveName="DemoWindow" animationBehavior="default" id="371">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
- <rect key="contentRect" x="335" y="390" width="385" height="129"/>
- <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1057"/>
+ <rect key="contentRect" x="335" y="390" width="393" height="129"/>
+ <rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
<view key="contentView" id="372">
- <rect key="frame" x="0.0" y="0.0" width="385" height="129"/>
+ <rect key="frame" x="0.0" y="0.0" width="393" height="129"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="536" customClass="MASShortcutView">
@@ -685,8 +685,8 @@
</textFieldCell>
</textField>
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="F4r-KM-wn9">
- <rect key="frame" x="140" y="43" width="227" height="18"/>
- <buttonCell key="cell" type="check" title="Enable hard-coded shortcut (⌘2)" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="7gv-jN-44g">
+ <rect key="frame" x="140" y="43" width="235" height="18"/>
+ <buttonCell key="cell" type="check" title="Enable hard-coded shortcut (⌘F2)" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="7gv-jN-44g">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
@@ -706,13 +706,13 @@
<rect key="frame" x="140" y="20" width="211" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="left" placeholderString="Press a shortcut to see feedback" id="Ckx-v7-e6x">
<font key="font" metaFont="system"/>
- <color key="textColor" red="1" green="0.14901961389999999" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
+ <color key="textColor" red="0.37647062540054321" green="0.85098046064376831" blue="0.17647059261798859" alpha="1" colorSpace="deviceRGB"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
</view>
- <point key="canvasLocation" x="348.5" y="367.5"/>
+ <point key="canvasLocation" x="352.5" y="367.5"/>
</window>
<customObject id="494" customClass="AppDelegate">
<connections>