Skip to content

Commit 1d5771b

Browse files
committed
UI Improvements
1 parent 21e3178 commit 1d5771b

File tree

6 files changed

+30
-3
lines changed

6 files changed

+30
-3
lines changed

LuLu/App/AppDelegate.m

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,17 @@ -(void)applicationDidFinishLaunching:(NSNotification *)aNotification
9595
//alloc window controller
9696
welcomeWindowController = [[WelcomeWindowController alloc] initWithWindowNibName:@"Welcome"];
9797

98+
//set activation policy
99+
[self setActivationPolicy];
100+
98101
//show window
99102
[self.welcomeWindowController showWindow:self];
100103

101-
//set activation policy
102-
[self setActivationPolicy];
104+
//make front
105+
[[NSRunningApplication currentApplication] activateWithOptions:(NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)];
106+
107+
//make window front
108+
[self.startupWindowController.window makeKeyAndOrderFront:nil];
103109

104110
//install (self as) login item
105111
if(YES != toggleLoginItem(NSBundle.mainBundle.bundleURL, ACTION_INSTALL_FLAG))
@@ -143,7 +149,10 @@ -(void)applicationDidFinishLaunching:(NSNotification *)aNotification
143149

144150
//make window front
145151
[self.startupWindowController.window makeKeyAndOrderFront:nil];
146-
152+
153+
//make it modal(ish)
154+
[self.startupWindowController.window setLevel:NSPopUpMenuWindowLevel];
155+
147156
//show window
148157
[self.startupWindowController showWindow:nil];
149158
}
Loading

LuLu/App/StartupWindowController.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ -(void)awakeFromNib
5151
[NSApp activateIgnoringOtherApps:YES];
5252
}
5353

54+
//(re)make front
55+
[[NSRunningApplication currentApplication] activateWithOptions:(NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)];
56+
5457
return;
5558
}
5659

LuLu/App/UpdateWindowController.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ -(void)windowDidLoad
6868
[NSApp activateIgnoringOtherApps:YES];
6969
}
7070

71+
//(re)make front
72+
[[NSRunningApplication currentApplication] activateWithOptions:(NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)];
73+
7174
return;
7275
}
7376

LuLu/App/WelcomeWindowController.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ -(void)windowDidLoad {
7272
[NSApp activateIgnoringOtherApps:YES];
7373
}
7474

75+
//(re)make front
76+
[[NSRunningApplication currentApplication] activateWithOptions:(NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)];
77+
7578
return;
7679
}
7780

@@ -233,6 +236,9 @@ -(IBAction)buttonHandler:(id)sender {
233236
[NSApp activateIgnoringOtherApps:YES];
234237
}
235238

239+
//(re)make front
240+
[[NSRunningApplication currentApplication] activateWithOptions:(NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)];
241+
236242
});
237243

238244
//signal semaphore
@@ -250,7 +256,10 @@ -(IBAction)buttonHandler:(id)sender {
250256

251257
//show configure view
252258
case SHOW_CONFIGURE:
259+
260+
//show
253261
[self showView:self.configureView firstResponder:SHOW_SUPPORT];
262+
254263
break;
255264

256265
//show "support us" view

LuLu/Shared/utilities.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,6 +1265,9 @@ NSModalResponse showAlert(NSAlertStyle style, NSString* messageText, NSString* i
12651265
[NSApp activateIgnoringOtherApps:YES];
12661266
}
12671267

1268+
//(re)make front
1269+
[[NSRunningApplication currentApplication] activateWithOptions:(NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)];
1270+
12681271
//make alert window front
12691272
[alert.window makeKeyAndOrderFront:nil];
12701273

0 commit comments

Comments
 (0)