diff --git a/src/ui/osx/TogglDesktop/App/AppDelegate.m b/src/ui/osx/TogglDesktop/App/AppDelegate.m index ad73cfe02d..da4514ceaf 100644 --- a/src/ui/osx/TogglDesktop/App/AppDelegate.m +++ b/src/ui/osx/TogglDesktop/App/AppDelegate.m @@ -119,6 +119,7 @@ @implementation AppDelegate void *ctx; +static NSString *statusItemDefaultTooltip = @"Total today: 0h 0min"; - (void)applicationWillFinishLaunching:(NSNotification *)not { @@ -819,8 +820,10 @@ - (void)updateStatusItem free(str); } - // Update tooltip - [self.statusItem setToolTip:[NSString stringWithFormat:@"Total today: %@", self.lastKnownRunningTimeEntry.dateDuration]]; + // Update tooltip if was not set before + if ([self.statusItem.toolTip isEqualToString:statusItemDefaultTooltip]) { + [self.statusItem setToolTip:[NSString stringWithFormat:@"Total today: %@", self.lastKnownRunningTimeEntry.dateDuration]]; + } } NSString *key = nil; @@ -1554,7 +1557,7 @@ void on_time_entry_list(const bool_t open, TogglTimeEntryView *first, const bool_t show_load_more) { - NSString *todayTotal = @"Total today: 0h 0min"; + NSString *todayTotal = statusItemDefaultTooltip; NSMutableArray *viewitems = [[NSMutableArray alloc] init]; TogglTimeEntryView *it = first; diff --git a/src/ui/osx/TogglDesktop/TogglDesktop.xcodeproj/project.pbxproj b/src/ui/osx/TogglDesktop/TogglDesktop.xcodeproj/project.pbxproj index 3c8fbd9b8c..fb06ea878b 100644 --- a/src/ui/osx/TogglDesktop/TogglDesktop.xcodeproj/project.pbxproj +++ b/src/ui/osx/TogglDesktop/TogglDesktop.xcodeproj/project.pbxproj @@ -792,7 +792,7 @@ 69FC180217E6534400B96425 /* TogglDesktop-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TogglDesktop-Prefix.pch"; sourceTree = ""; }; 69FC180417E6534400B96425 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; 69FC180617E6534400B96425 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 69FC180717E6534400B96425 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 69FC180717E6534400B96425 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; usesTabs = 1; }; 69FC181217E6534500B96425 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; 74033C8D17EC1CFD00CA53D3 /* libstdc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libstdc++.dylib"; path = "usr/lib/libstdc++.dylib"; sourceTree = SDKROOT; }; 74033C9617EC1DE100CA53D3 /* libc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libc++.dylib"; path = "usr/lib/libc++.dylib"; sourceTree = SDKROOT; };