Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSApplication: toggle title of menu item "Hide" on user action. #302

Merged
merged 3 commits into from
Nov 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Source/NSApplication.m
Original file line number Diff line number Diff line change
Expand Up @@ -2543,7 +2543,8 @@ - (void) hide: (id)sender
[_hidden addObject: win];
[win orderOut: self];
}
}
}
[[_main_menu itemWithTitle:@"Hide"] setTitle:@"Unhide"];
_app_is_hidden = YES;

if (YES == [[NSUserDefaults standardUserDefaults]
Expand Down Expand Up @@ -2590,6 +2591,10 @@ - (void) hide: (id)sender
[self miniaturizeAll: sender];
}
}
else
fredkiefer marked this conversation as resolved.
Show resolved Hide resolved
{
[self unhide: sender];
}
#endif
}

Expand All @@ -2606,6 +2611,7 @@ - (BOOL) isHidden
*/
- (void) unhide: (id)sender
{
[[_main_menu itemWithTitle:@"Unhide"] setTitle:@"Hide"];
if (_app_is_hidden)
{
[self unhideWithoutActivation];
Expand Down
Loading