Skip to content

Commit

Permalink
Menu not being created at awakeFromNib. Undo #35
Browse files Browse the repository at this point in the history
  • Loading branch information
fitztrev committed Jul 20, 2013
1 parent a8d2ed8 commit 0118713
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Shuttle/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ - (void) awakeFromNib {
// Load the menu content
// [self loadMenu];

// if the config file does not exist, create a default one
if ( ![[NSFileManager defaultManager] fileExistsAtPath:shuttleConfigFile] ) {
NSString *cgFileInResource = [[NSBundle mainBundle] pathForResource:@"shuttle.default" ofType:@"json"];
[[NSFileManager defaultManager] copyItemAtPath:cgFileInResource toPath:shuttleConfigFile error:nil];
}

// Create the status bar item
statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:25.0];
[statusItem setMenu:menu];
Expand Down Expand Up @@ -137,6 +131,12 @@ - (NSString*) humanize: (NSString*) val{
}

- (void) loadMenu {

// if the config file does not exist, create a default one
if ( ![[NSFileManager defaultManager] fileExistsAtPath:shuttleConfigFile] ) {
NSString *cgFileInResource = [[NSBundle mainBundle] pathForResource:@"shuttle.default" ofType:@"json"];
[[NSFileManager defaultManager] copyItemAtPath:cgFileInResource toPath:shuttleConfigFile error:nil];
}

// System configuration
NSDictionary* servers = [self parseSSHConfigFile];
Expand Down

0 comments on commit 0118713

Please sign in to comment.