Permalink
Browse files

Removed obsolete "Next restart only" preference.

  • Loading branch information...
1 parent f83d05d commit 47d979daf4504a33f2c4db80637119061987417f @kainjow committed Oct 28, 2011
View
@@ -21,4 +21,4 @@ enum {
@class BOMedia;
BOOL BOAuthorizationRequired();
-BOOL BOBoot(BOMedia *media, BOOL nextOnly, NSError **error);
+BOOL BOBoot(BOMedia *media, NSError **error);
View
@@ -124,7 +124,7 @@ BOOL BOAuthorizationRequired()
return NO;
}
-BOOL BOBoot(BOMedia *media, BOOL nextOnly, NSError **error)
+BOOL BOBoot(BOMedia *media, NSError **error)
{
if (!media) {
if (error)
@@ -167,7 +167,11 @@ BOOL BOBoot(BOMedia *media, BOOL nextOnly, NSError **error)
[args addObject:media.mountPoint];
}
[args addObject:@"-nextonly"];
- [args addObject:nextOnly ? @"yes" : @"no"];
+ [args addObject:@"yes"];
+ // --nextonly used to be a user-settable preference in 1.2 and previous versions,
+ // but in 1.2.1 it was removed, but we keep it here for now in the app to stay
+ // compatible with older versions of the helper tool so the user doesn't have to
+ // reinstall it.
ret = [NSTask launchTaskAtPath:toolDest arguments:args output:&output];
switch (ret) {
@@ -14,15 +14,13 @@
#define BOPrefsLaunchAtStartup @"LaunchAtStartup"
-#define BOPrefsNextOnly @"NextOnly"
@implementation BOStatusMenuController
+ (void)initialize
{
NSDictionary *defaults = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES], BOPrefsLaunchAtStartup,
- [NSNumber numberWithBool:YES], BOPrefsNextOnly,
nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
}
@@ -202,11 +200,6 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notif
[menuItem setRepresentedObject:BOPrefsLaunchAtStartup];
if ([[NSUserDefaults standardUserDefaults] boolForKey:BOPrefsLaunchAtStartup])
[menuItem setState:NSOnState];
- menuItem = [menu addItemWithTitle:NSLocalizedString(@"Next restart only", "next restart only menu item") action:@selector(preferenceAction:) keyEquivalent:@""];
- [menuItem setIndentationLevel:1];
- [menuItem setRepresentedObject:BOPrefsNextOnly];
- if ([[NSUserDefaults standardUserDefaults] boolForKey:BOPrefsNextOnly])
- [menuItem setState:NSOnState];
[menu addItem:[NSMenuItem separatorItem]];
[menu addItemWithTitle:NSLocalizedString(@"BootChamp Help", "help menu item") action:@selector(showHelp:) keyEquivalent:@""];
@@ -223,7 +216,7 @@ - (void)bootWindows:(id)sender
{
[NSApp activateIgnoringOtherApps:YES];
NSError *error = nil;
- if (BOBoot([sender representedObject], [[NSUserDefaults standardUserDefaults] boolForKey:BOPrefsNextOnly], &error))
+ if (BOBoot([sender representedObject], &error))
return;
[NSApp activateIgnoringOtherApps:YES]; // app may have gone inactive from auth dialog
NSString *msg = nil, *info = nil;
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 47d979d

Please sign in to comment.