diff --git a/VPNStatus/AppDelegate.m b/VPNStatus/AppDelegate.m index eeb204b..6e9f396 100644 --- a/VPNStatus/AppDelegate.m +++ b/VPNStatus/AppDelegate.m @@ -226,12 +226,7 @@ -(void)refreshMenu [menu addItem:[NSMenuItem separatorItem]]; } - [menu addItem:[[NSMenuItem alloc] initWithTitle:neService.name action:nil keyEquivalent:@""]]; - - // Update the information - [menu addItem:[[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"%@ (%@)", [neService serverAddress], [neService protocol]] action:nil keyEquivalent:@""]]; - - NSMenuItem *alwaysAutoConnectMenuItem = [[NSMenuItem alloc] initWithTitle:@"Always auto connect" action:@selector(alwaysAutoConnect:) keyEquivalent:@""]; + NSMenuItem *alwaysAutoConnectMenuItem = [[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"Always Connect %@", neService.name] action:@selector(alwaysAutoConnect:) keyEquivalent:@""]; [alwaysAutoConnectMenuItem setTag:neServiceIndex]; NSArray*alwaysConnectedServices = [[ACPreferences sharedPreferences] alwaysConnectedServicesIdentifiers]; if([alwaysConnectedServices containsObject:[neService.configuration.identifier UUIDString]]) @@ -244,6 +239,10 @@ -(void)refreshMenu } [menu addItem:alwaysAutoConnectMenuItem]; + + // Update the information + [menu addItem:[[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"%@ (%@)", [neService serverAddress], [neService protocol]] action:nil keyEquivalent:@""]]; + neServiceIndex++; }