-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathInboxController.m
44 lines (36 loc) · 1.2 KB
/
InboxController.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
/*
Copyright (C) 2009 Eric Wasylishen
Author: Eric Wasylishen <[email protected]>
Date: September 2009
License: Modified BSD (see COPYING)
*/
#import "InboxController.h"
#import "ETMailAccount.h"
#import "ETNewsFeed.h"
#import <EtoileUI/EtoileUI.h>
@implementation InboxController
- (void) applicationDidFinishLaunching: (id)notif
{
ETLayoutItemFactory *factory = [ETLayoutItemFactory factory];
ETMailAccount *account = [[ETMailAccount alloc] init];
[account setValue: @"*****" forProperty: @"username"];
[account setValue: @"*****" forProperty: @"password"];
NSLog(@"---------Setting server");
[account setValue: @"imap.gmail.com" forProperty: @"server"];
NSLog(@"---------Account should be set up now");
ETNewsFeed *feed = [[ETNewsFeed alloc] init];
[feed setValue: @"http://rss.slashdot.org/Slashdot/slashdot" forProperty: @"URL"];
main = [factory itemGroupWithRepresentedObject: A(account, feed)];
[main setLayout: [ETOutlineLayout layout]];
[main setSize: NSMakeSize(640, 480)];
[main setSource: main];
[[factory windowGroup] addItem: main];
[main inspect: nil];
}
- (void) reload
{
// hack to reload the mail/news groups
NSLog(@"reloading...");
[main reloadAndUpdateLayout];
}
@end