Deprecation warnings in macOS 10.14
This commit is contained in:
@@ -70,7 +70,7 @@
|
|||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>14360</string>
|
<string>14394</string>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string>public.app-category.news</string>
|
<string>public.app-category.news</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
|||||||
@@ -142,7 +142,7 @@
|
|||||||
NSProgressIndicator *spin = [[NSProgressIndicator alloc] initWithFrame: NSMakeRect(0, 0, HEIGHT_SPINNER, HEIGHT_SPINNER)];
|
NSProgressIndicator *spin = [[NSProgressIndicator alloc] initWithFrame: NSMakeRect(0, 0, HEIGHT_SPINNER, HEIGHT_SPINNER)];
|
||||||
spin.indeterminate = YES;
|
spin.indeterminate = YES;
|
||||||
spin.displayedWhenStopped = NO;
|
spin.displayedWhenStopped = NO;
|
||||||
spin.style = NSProgressIndicatorSpinningStyle;
|
spin.style = NSProgressIndicatorStyleSpinning;
|
||||||
spin.controlSize = NSControlSizeSmall;
|
spin.controlSize = NSControlSizeSmall;
|
||||||
return spin;
|
return spin;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,10 +44,9 @@
|
|||||||
self = [super init];
|
self = [super init];
|
||||||
// Show icon & prefetch unread count
|
// Show icon & prefetch unread count
|
||||||
self.statusItem = [NSStatusBar.systemStatusBar statusItemWithLength:NSVariableStatusItemLength];
|
self.statusItem = [NSStatusBar.systemStatusBar statusItemWithLength:NSVariableStatusItemLength];
|
||||||
self.statusItem.highlightMode = YES;
|
|
||||||
self.unreadCountTotal = 0;
|
self.unreadCountTotal = 0;
|
||||||
self.statusItem.image = [NSImage imageNamed:RSSImageMenuBarIconActive];
|
self.statusItem.button.image = [NSImage imageNamed:RSSImageMenuBarIconActive];
|
||||||
self.statusItem.image.template = YES;
|
self.statusItem.button.image.template = YES;
|
||||||
// Add empty menu (will be populated once opened)
|
// Add empty menu (will be populated once opened)
|
||||||
self.statusItem.menu = [[NSMenu alloc] initWithTitle:@"M"];
|
self.statusItem.menu = [[NSMenu alloc] initWithTitle:@"M"];
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mainMenuWillOpen) name:NSMenuDidBeginTrackingNotification object:self.statusItem.menu];
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mainMenuWillOpen) name:NSMenuDidBeginTrackingNotification object:self.statusItem.menu];
|
||||||
@@ -119,11 +118,13 @@
|
|||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
BOOL hasNet = [UpdateScheduler allowNetworkConnection];
|
BOOL hasNet = [UpdateScheduler allowNetworkConnection];
|
||||||
BOOL tint = (self.unreadCountTotal > 0 && hasNet && UserPrefsBool(Pref_globalTintMenuIcon));
|
BOOL tint = (self.unreadCountTotal > 0 && hasNet && UserPrefsBool(Pref_globalTintMenuIcon));
|
||||||
self.statusItem.image = [NSImage imageNamed:(hasNet ? RSSImageMenuBarIconActive : RSSImageMenuBarIconPaused)];
|
self.statusItem.button.image = [NSImage imageNamed:(hasNet ? RSSImageMenuBarIconActive : RSSImageMenuBarIconPaused)];
|
||||||
self.statusItem.image.template = !tint;
|
self.statusItem.button.image.template = !tint;
|
||||||
|
// TODO: use macOS 10.14 contentTintColor, if (@available(macOS 10.14, *)) {} else {}
|
||||||
|
|
||||||
BOOL showCount = (self.unreadCountTotal > 0 && UserPrefsBool(Pref_globalUnreadCount));
|
BOOL showCount = (self.unreadCountTotal > 0 && UserPrefsBool(Pref_globalUnreadCount));
|
||||||
self.statusItem.title = (showCount ? [NSString stringWithFormat:@"%ld", self.unreadCountTotal] : @"");
|
self.statusItem.button.title = (showCount ? [NSString stringWithFormat:@"%ld", self.unreadCountTotal] : @"");
|
||||||
|
self.statusItem.button.imagePosition = (showCount ? NSImageLeft : NSImageOnly);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user