add bookmark arg and fixing focus

This commit is contained in:
dante ruiz 2019-06-13 10:03:46 -07:00
parent 0c1df749b9
commit 667af8575f

View file

@ -46,6 +46,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
} }
-(void)awakeFromNib { -(void)awakeFromNib {
[[NSApplication sharedApplication] activateIgnoringOtherApps:TRUE];
[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self
selector:@selector(didTerminateApp:) selector:@selector(didTerminateApp:)
name:NSWorkspaceDidTerminateApplicationNotification name:NSWorkspaceDidTerminateApplicationNotification
@ -114,6 +115,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
userInfo:nil userInfo:nil
repeats:NO]; repeats:NO];
} }
[[NSApplication sharedApplication] activateIgnoringOtherApps:TRUE];
} }
- (void) setDownloadContextFilename:(NSString *)aFilename - (void) setDownloadContextFilename:(NSString *)aFilename
@ -277,6 +279,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
-(void)onSplashScreenTimerFinished:(NSTimer *)timer -(void)onSplashScreenTimerFinished:(NSTimer *)timer
{ {
[[NSApplication sharedApplication] activateIgnoringOtherApps:TRUE];
[self showLoginScreen]; [self showLoginScreen];
} }
@ -336,6 +339,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
NSString* scriptsPath = [[self getAppPath] stringByAppendingString:@"interface.app/Contents/Resources/scripts/simplifiedUI/"]; NSString* scriptsPath = [[self getAppPath] stringByAppendingString:@"interface.app/Contents/Resources/scripts/simplifiedUI/"];
NSString* domainUrl = [[Settings sharedSettings] getDomainUrl]; NSString* domainUrl = [[Settings sharedSettings] getDomainUrl];
NSString* userToken = [[Launcher sharedLauncher] getTokenString]; NSString* userToken = [[Launcher sharedLauncher] getTokenString];
NSString* homeBookmark = [[NSString stringWithFormat:@"hqhome="] stringByAppendingString:domainUrl];
NSArray* arguments; NSArray* arguments;
if (userToken != nil) { if (userToken != nil) {
arguments = [NSArray arrayWithObjects: arguments = [NSArray arrayWithObjects:
@ -344,6 +348,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
@"--cache", contentPath, @"--cache", contentPath,
@"--displayName", displayName, @"--displayName", displayName,
@"--scripts", scriptsPath, @"--scripts", scriptsPath,
@"--setBookmark", homeBookmark,
@"--no-updater", @"--no-updater",
@"--no-launcher", nil]; @"--no-launcher", nil];
} else { } else {
@ -351,6 +356,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
@"--url" , domainUrl, @"--url" , domainUrl,
@"--cache", contentPath, @"--cache", contentPath,
@"--scripts", scriptsPath, @"--scripts", scriptsPath,
@"--setBookmark", homeBookmark,
@"--no-updater", @"--no-updater",
@"--no-launcher", nil]; @"--no-launcher", nil];
} }