mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 18:11:06 +00:00
NSApplication: toggle title of menu item "Hide" to "Unhide" and vice versa.
Right-click app menu on hidden app icon should show "Unhide" on menu item and behave respectively.
This commit is contained in:
parent
40fc3ab2ec
commit
afe151aaaf
1 changed files with 7 additions and 1 deletions
|
@ -2543,7 +2543,8 @@ image.</p><p>See Also: -applicationIconImage</p>
|
|||
[_hidden addObject: win];
|
||||
[win orderOut: self];
|
||||
}
|
||||
}
|
||||
}
|
||||
[[_main_menu itemWithTitle:@"Hide"] setTitle:@"Unhide"];
|
||||
_app_is_hidden = YES;
|
||||
|
||||
if (YES == [[NSUserDefaults standardUserDefaults]
|
||||
|
@ -2590,6 +2591,10 @@ image.</p><p>See Also: -applicationIconImage</p>
|
|||
[self miniaturizeAll: sender];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[self unhide: sender];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2606,6 +2611,7 @@ image.</p><p>See Also: -applicationIconImage</p>
|
|||
*/
|
||||
- (void) unhide: (id)sender
|
||||
{
|
||||
[[_main_menu itemWithTitle:@"Unhide"] setTitle:@"Hide"];
|
||||
if (_app_is_hidden)
|
||||
{
|
||||
[self unhideWithoutActivation];
|
||||
|
|
Loading…
Reference in a new issue