From 4e98f342e469af26cfd8cf6678f21c2fd2bda57f Mon Sep 17 00:00:00 2001 From: Tony Arnold Date: Tue, 1 Nov 2016 09:49:08 +1100 Subject: Use properly typedef’d enumerations to improve Swift syntax Signed-off-by: Tony Arnold --- Framework/MASKeyCodes.h | 2 +- Framework/MASShortcutView.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Framework') 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 -- cgit v1.2.3 From e73de450add24ad5868e219ad71e43f3c02f0c21 Mon Sep 17 00:00:00 2001 From: Tony Arnold Date: Tue, 1 Nov 2016 09:49:55 +1100 Subject: Fix return from a NSToolTip method that expects a non-null return value Signed-off-by: Tony Arnold --- Framework/MASShortcutView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Framework') 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 -- cgit v1.2.3