mirror of
https://github.com/google/santa.git
synced 2026-01-13 08:18:03 -05:00
33 lines
792 B
Objective-C
33 lines
792 B
Objective-C
#import "Source/gui/SNTMessageWindowController.h"
|
|
|
|
@implementation SNTMessageWindowController
|
|
|
|
- (IBAction)showWindow:(id)sender {
|
|
[self.window setLevel:NSPopUpMenuWindowLevel];
|
|
[self.window setMovableByWindowBackground:YES];
|
|
[self.window makeKeyAndOrderFront:sender];
|
|
[self.window center];
|
|
[NSApp activateIgnoringOtherApps:YES];
|
|
}
|
|
- (IBAction)closeWindow:(id)sender {
|
|
[self windowWillClose:sender];
|
|
[self.window close];
|
|
}
|
|
|
|
- (void)windowWillClose:(NSNotification *)notification {
|
|
if (!self.delegate) return;
|
|
|
|
if (self.silenceFutureNotifications) {
|
|
[self.delegate windowDidCloseSilenceHash:[self messageHash]];
|
|
} else {
|
|
[self.delegate windowDidCloseSilenceHash:nil];
|
|
}
|
|
}
|
|
|
|
- (NSString *)messageHash {
|
|
[self doesNotRecognizeSelector:_cmd];
|
|
return nil;
|
|
}
|
|
|
|
@end
|