-
Notifications
You must be signed in to change notification settings - Fork 0
/
ImleeAppDelegate.m
45 lines (36 loc) · 988 Bytes
/
ImleeAppDelegate.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//
// ImleeAppDelegate.m
// Imlee
//
// Created by Devarshi Kulshreshtha on 6/21/12.
// Copyright 2012 DaemonConstruction. All rights reserved.
//
#import "ImleeAppDelegate.h"
@implementation ImleeAppDelegate
@synthesize window;
@synthesize imleeModel = _imleeModel;
@synthesize imleeDragAndDropView = _imleeDragAndDropView;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// code to initialize application
[self willChangeValueForKey:@"imleeModel"];
_imleeModel = [[ImleeModel alloc] init];
[self didChangeValueForKey:@"imleeModel"];
[self.imleeDragAndDropView setDelegate:self.imleeModel];
}
/*
To re-open window on click of dock icon, if it is closed by click on red(close) button
*/
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag
{
if (flag) {
return NO;
}
[self.window makeKeyAndOrderFront:self];
return NO;
}
- (void)dealloc
{
[_imleeModel release];
[super dealloc];
}
@end