Changeset 2239


Ignore:
Timestamp:
Jun 29, 2007, 11:54:36 PM (15 years ago)
Author:
livings124
Message:

add an option in the duplicate alert to not prompt again

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r2238 r2239  
    465465                                    "Debug log alert -> informative message")];
    466466        [alert addButtonWithTitle: NSLocalizedString(@"OK", "Debug log alert -> button")];
    467         [alert addButtonWithTitle: NSLocalizedString(@"Don't Remind Again", "Debug log alert -> button")];
     467        [alert addButtonWithTitle: NSLocalizedString(@"Don't Alert Again", "Debug log alert -> button")];
    468468       
    469469        if ([alert runModal] == NSAlertSecondButtonReturn)
     
    897897- (void) duplicateOpenAlert: (NSString *) name
    898898{
     899    if (![fDefaults boolForKey: @"WarningDuplicate"])
     900        return;
     901   
    899902    NSAlert * alert = [[NSAlert alloc] init];
    900     [alert addButtonWithTitle: NSLocalizedString(@"OK", "Open duplicate alert -> button")];
    901     [alert setMessageText: [NSString stringWithFormat: NSLocalizedString(@"Transfer of \"%@\" is already running.",
     903    [alert setMessageText: [NSString stringWithFormat: NSLocalizedString(@"A transfer of \"%@\" is already running.",
    902904                            "Open duplicate alert -> title"), name]];
    903905    [alert setInformativeText:
    904906            NSLocalizedString(@"The torrent file cannot be opened because it is a duplicate of an already running transfer.",
    905907                            "Open duplicate alert -> message")];
     908    [alert addButtonWithTitle: NSLocalizedString(@"OK", "Open duplicate alert -> button")];
     909    [alert addButtonWithTitle: NSLocalizedString(@"Don't Alert Again", "Open duplicate alert -> button")];
    906910    [alert setAlertStyle: NSWarningAlertStyle];
    907911   
    908     [alert runModal];
     912    if ([alert runModal] == NSAlertSecondButtonReturn)
     913        [fDefaults setBool: NO forKey: @"WarningDuplicate"];
    909914    [alert release];
    910915}
  • trunk/macosx/Defaults.plist

    r2175 r2239  
    117117        <key>WarningDebug</key>
    118118        <true/>
     119        <key>WarningDuplicate</key>
     120        <true/>
    119121        <key>WarningRemainingSpace</key>
    120122        <true/>
  • trunk/macosx/PrefsController.m

    r1970 r2239  
    439439{
    440440    [fDefaults setBool: YES forKey: @"WarningDebug"];
     441    [fDefaults setBool: YES forKey: @"WarningDuplicate"];
    441442    [fDefaults setBool: YES forKey: @"WarningRemainingSpace"];
    442443}
Note: See TracChangeset for help on using the changeset viewer.