mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 16:10:48 +00:00
Merge branch 'master' of https://github.com/trunkmaster/libs-gui
This commit is contained in:
commit
215eb89e27
3 changed files with 30 additions and 1 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2019-04-02 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/NSApplication.m:
|
||||
(activateIgnoringOtherApps:) Do not activate application on first run
|
||||
if commandline argument `-autolaunch YES` was specified.
|
||||
|
||||
2019-03-27 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Headers/AppKit/NSWindow.h:
|
||||
Lowering down NSFloatingWindowLevel number by one to distinguish
|
||||
floating panels from menus.
|
||||
|
||||
2019-02-26 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSBitmapImageRep+ICNS.m (_imageRepsWithICNSData:): Try to
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
enum {
|
||||
NSDesktopWindowLevel = -1000, /* GNUstep addition */ // 2
|
||||
NSNormalWindowLevel = 0, // 3
|
||||
NSFloatingWindowLevel = 3, // 4
|
||||
NSFloatingWindowLevel = 2, // 4
|
||||
NSSubmenuWindowLevel = 3, // 5
|
||||
NSTornOffMenuWindowLevel = 3, // 5
|
||||
NSMainMenuWindowLevel = 20, // 7
|
||||
|
|
|
@ -1259,6 +1259,23 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
|||
*/
|
||||
- (void) activateIgnoringOtherApps: (BOOL)flag
|
||||
{
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
NSString *autolaunch = [defaults objectForKey: @"autolaunch"];
|
||||
|
||||
/* Application was executed with argument '-autolaunch YES'. Set argument
|
||||
* value to "NO" for future calls to `activateIgnoringOtherApps:`. */
|
||||
if (autolaunch && [autolaunch isEqualToString: @"YES"])
|
||||
{
|
||||
NSMutableDictionary *args;
|
||||
args = [[defaults volatileDomainForName: NSArgumentDomain] mutableCopy];
|
||||
[defaults removeVolatileDomainForName: NSArgumentDomain];
|
||||
[args setObject: @"NO" forKey: @"autolaunch"];
|
||||
[defaults setVolatileDomain: [NSDictionary dictionaryWithDictionary: args]
|
||||
forName: NSArgumentDomain];
|
||||
[args release];
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Currently the flag is ignored
|
||||
if (_app_is_active == NO)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue