aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomáš Znamenáček2016-11-01 07:52:58 +0100
committerGitHub2016-11-01 07:52:58 +0100
commitb54c1edbf44ec32a25b76b4fc42ef0c82c4bdea4 (patch)
tree37e1a9052a717f78583273aa51804d271fb0856c
parentf743bdaa5b4f69bfdcd41de9a787e018398bee29 (diff)
parente73de450add24ad5868e219ad71e43f3c02f0c21 (diff)
downloadMASShortcut-master.tar.bz2
Merge pull request #100 from tonyarnold/enumsHEADmaster
Minor fixes and Swift improvements
-rw-r--r--Framework/MASKeyCodes.h2
-rw-r--r--Framework/MASShortcutView.h4
-rw-r--r--Framework/MASShortcutView.m2
3 files changed, 4 insertions, 4 deletions
diff --git a/Framework/MASKeyCodes.h b/Framework/MASKeyCodes.h
index b89cd3c..4c000b1 100644
--- a/Framework/MASKeyCodes.h
+++ b/Framework/MASKeyCodes.h
@@ -3,7 +3,7 @@
#import "MASKeyMasks.h"
// These glyphs are missed in Carbon.h
-enum {
+typedef NS_ENUM(unsigned short, kMASShortcutGlyph) {
kMASShortcutGlyphEject = 0x23CF,
kMASShortcutGlyphClear = 0x2715,
kMASShortcutGlyphDeleteLeft = 0x232B,
diff --git a/Framework/MASShortcutView.h b/Framework/MASShortcutView.h
index 656f4e4..75d4eb3 100644
--- a/Framework/MASShortcutView.h
+++ b/Framework/MASShortcutView.h
@@ -2,12 +2,12 @@
extern NSString *const MASShortcutBinding;
-typedef enum {
+typedef NS_ENUM(NSInteger, MASShortcutViewStyle) {
MASShortcutViewStyleDefault = 0, // Height = 19 px
MASShortcutViewStyleTexturedRect, // Height = 25 px
MASShortcutViewStyleRounded, // Height = 43 px
MASShortcutViewStyleFlat
-} MASShortcutViewStyle;
+};
@interface MASShortcutView : NSView
diff --git a/Framework/MASShortcutView.m b/Framework/MASShortcutView.m
index 8540e61..9b27a10 100644
--- a/Framework/MASShortcutView.m
+++ b/Framework/MASShortcutView.m
@@ -386,7 +386,7 @@ void *kUserDataHint = &kUserDataHint;
else if (data == kUserDataHint) {
return MASLocalizedString(@"Delete shortcut", @"Tooltip for hint button near the non-empty shortcut");
}
- return nil;
+ return @"";
}
#pragma mark - Event monitoring