Changeset 9232


Ignore:
Timestamp:
Oct 2, 2009, 9:51:09 PM (13 years ago)
Author:
livings124
Message:

(mac) #2478: popup dialog for first-time users

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r9197 r9232  
    184184            [alert setInformativeText: NSLocalizedString(@"There is already a copy of Transmission running. "
    185185                "This copy cannot be opened until that instance is quit.", "Transmission already running alert -> message")];
    186             [alert setAlertStyle: NSWarningAlertStyle];
     186            [alert setAlertStyle: NSCriticalAlertStyle];
    187187           
    188188            [alert runModal];
     
    203203    ExpandedPathToIconTransformer * iconTransformer = [[[ExpandedPathToIconTransformer alloc] init] autorelease];
    204204    [NSValueTransformer setValueTransformer: iconTransformer forName: @"ExpandedPathToIconTransformer"];
     205   
     206    //cover our asses
     207    if (YES || [[NSUserDefaults standardUserDefaults] boolForKey: @"WarningLegal"])
     208    {
     209        NSAlert * alert = [[NSAlert alloc] init];
     210        [alert addButtonWithTitle: NSLocalizedString(@"I Accept", "Legal alert -> button")];
     211        [alert addButtonWithTitle: NSLocalizedString(@"Quit", "Legal alert -> button")];
     212        [alert setMessageText: NSLocalizedString(@"Hear ye, hear ye!", "Legal alert -> title")];
     213        [alert setInformativeText: [NSString stringWithFormat: @"%@\n\n%@",
     214            NSLocalizedString(@"Transmission is a file-sharing program. When you add a torrent for download, all of its data will"
     215            " also be made available to others by means of upload."
     216            " And of course, any content you do choose to share is your sole responsibility.", "Legal alert -> message"),
     217            NSLocalizedString(@"You probably knew this already, so we won't tell you again.", "Legal alert -> message")]];
     218        [alert setAlertStyle: NSInformationalAlertStyle];
     219       
     220        if ([alert runModal] == NSAlertSecondButtonReturn)
     221            exit(0);
     222        [alert release];
     223       
     224        [[NSUserDefaults standardUserDefaults] setBool: NO forKey: @"WarningLegal"];
     225    }
    205226}
    206227
     
    19011922                                                                nameDescriptor, nil];
    19021923        }
     1924        #warning broken
    19031925        else if ([sortType isEqualToString: SORT_TRACKER])
    19041926        {
  • trunk/macosx/Defaults.plist

    r9126 r9232  
    191191        <key>WarningInvalidOpen</key>
    192192        <true/>
     193        <key>WarningLegal</key>
     194        <true/>
    193195        <key>WarningRemainingSpace</key>
    194196        <true/>
  • trunk/macosx/PrefsController.m

    r9151 r9232  
    682682    [fDefaults removeObjectForKey: @"WarningInvalidOpen"];
    683683    [fDefaults removeObjectForKey: @"WarningDonate"];
     684    //[fDefaults removeObjectForKey: @"WarningLegal"];
    684685}
    685686
Note: See TracChangeset for help on using the changeset viewer.