From 63c28081a61528421f7ea79f5efb64ed2642c586 Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Fri, 23 Oct 2020 21:40:05 +0200 Subject: [PATCH] Fix bugs related to macOS status icon. #480 #474 --- native/libmacbridge/AppDelegate.mm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/native/libmacbridge/AppDelegate.mm b/native/libmacbridge/AppDelegate.mm index 5bfb256..340f04a 100644 --- a/native/libmacbridge/AppDelegate.mm +++ b/native/libmacbridge/AppDelegate.mm @@ -26,7 +26,6 @@ // Setup status icon if (show_icon) { myStatusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain]; - [self setIcon: icon_path]; } @@ -61,16 +60,12 @@ - (void) updateIcon: (char *)iconPath { if (show_icon) { - [myStatusItem release]; - [self setIcon: iconPath]; } } - (void) setIcon: (char *)iconPath { if (show_icon) { - myStatusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain]; - NSString *nsIconPath = [NSString stringWithUTF8String:iconPath]; NSImage *statusImage = [[NSImage alloc] initWithContentsOfFile:nsIconPath]; [statusImage setTemplate:YES];