mirror of
https://github.com/transmission/transmission
synced 2025-02-21 21:57:01 +00:00
(mac) #2478: popup dialog for first-time users
This commit is contained in:
parent
9d87314eb0
commit
53c81d46fd
3 changed files with 26 additions and 1 deletions
|
@ -183,7 +183,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
||||||
"Transmission already running alert -> title")];
|
"Transmission already running alert -> title")];
|
||||||
[alert setInformativeText: NSLocalizedString(@"There is already a copy of Transmission running. "
|
[alert setInformativeText: NSLocalizedString(@"There is already a copy of Transmission running. "
|
||||||
"This copy cannot be opened until that instance is quit.", "Transmission already running alert -> message")];
|
"This copy cannot be opened until that instance is quit.", "Transmission already running alert -> message")];
|
||||||
[alert setAlertStyle: NSWarningAlertStyle];
|
[alert setAlertStyle: NSCriticalAlertStyle];
|
||||||
|
|
||||||
[alert runModal];
|
[alert runModal];
|
||||||
[alert release];
|
[alert release];
|
||||||
|
@ -202,6 +202,27 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
||||||
|
|
||||||
ExpandedPathToIconTransformer * iconTransformer = [[[ExpandedPathToIconTransformer alloc] init] autorelease];
|
ExpandedPathToIconTransformer * iconTransformer = [[[ExpandedPathToIconTransformer alloc] init] autorelease];
|
||||||
[NSValueTransformer setValueTransformer: iconTransformer forName: @"ExpandedPathToIconTransformer"];
|
[NSValueTransformer setValueTransformer: iconTransformer forName: @"ExpandedPathToIconTransformer"];
|
||||||
|
|
||||||
|
//cover our asses
|
||||||
|
if (YES || [[NSUserDefaults standardUserDefaults] boolForKey: @"WarningLegal"])
|
||||||
|
{
|
||||||
|
NSAlert * alert = [[NSAlert alloc] init];
|
||||||
|
[alert addButtonWithTitle: NSLocalizedString(@"I Accept", "Legal alert -> button")];
|
||||||
|
[alert addButtonWithTitle: NSLocalizedString(@"Quit", "Legal alert -> button")];
|
||||||
|
[alert setMessageText: NSLocalizedString(@"Hear ye, hear ye!", "Legal alert -> title")];
|
||||||
|
[alert setInformativeText: [NSString stringWithFormat: @"%@\n\n%@",
|
||||||
|
NSLocalizedString(@"Transmission is a file-sharing program. When you add a torrent for download, all of its data will"
|
||||||
|
" also be made available to others by means of upload."
|
||||||
|
" And of course, any content you do choose to share is your sole responsibility.", "Legal alert -> message"),
|
||||||
|
NSLocalizedString(@"You probably knew this already, so we won't tell you again.", "Legal alert -> message")]];
|
||||||
|
[alert setAlertStyle: NSInformationalAlertStyle];
|
||||||
|
|
||||||
|
if ([alert runModal] == NSAlertSecondButtonReturn)
|
||||||
|
exit(0);
|
||||||
|
[alert release];
|
||||||
|
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool: NO forKey: @"WarningLegal"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) init
|
- (id) init
|
||||||
|
@ -1900,6 +1921,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
||||||
descriptors = [[NSArray alloc] initWithObjects: progressDescriptor, ratioProgressDescriptor, ratioDescriptor,
|
descriptors = [[NSArray alloc] initWithObjects: progressDescriptor, ratioProgressDescriptor, ratioDescriptor,
|
||||||
nameDescriptor, nil];
|
nameDescriptor, nil];
|
||||||
}
|
}
|
||||||
|
#warning broken
|
||||||
else if ([sortType isEqualToString: SORT_TRACKER])
|
else if ([sortType isEqualToString: SORT_TRACKER])
|
||||||
{
|
{
|
||||||
NSSortDescriptor * trackerDescriptor = [[[NSSortDescriptor alloc] initWithKey: @"trackerAddressAnnounce" ascending: asc
|
NSSortDescriptor * trackerDescriptor = [[[NSSortDescriptor alloc] initWithKey: @"trackerAddressAnnounce" ascending: asc
|
||||||
|
|
|
@ -190,6 +190,8 @@
|
||||||
<true/>
|
<true/>
|
||||||
<key>WarningInvalidOpen</key>
|
<key>WarningInvalidOpen</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>WarningLegal</key>
|
||||||
|
<true/>
|
||||||
<key>WarningRemainingSpace</key>
|
<key>WarningRemainingSpace</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>WarningRemoveTrackers</key>
|
<key>WarningRemoveTrackers</key>
|
||||||
|
|
|
@ -681,6 +681,7 @@ tr_session * fHandle;
|
||||||
[fDefaults removeObjectForKey: @"WarningRemoveTrackers"];
|
[fDefaults removeObjectForKey: @"WarningRemoveTrackers"];
|
||||||
[fDefaults removeObjectForKey: @"WarningInvalidOpen"];
|
[fDefaults removeObjectForKey: @"WarningInvalidOpen"];
|
||||||
[fDefaults removeObjectForKey: @"WarningDonate"];
|
[fDefaults removeObjectForKey: @"WarningDonate"];
|
||||||
|
//[fDefaults removeObjectForKey: @"WarningLegal"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setQueue: (id) sender
|
- (void) setQueue: (id) sender
|
||||||
|
|
Loading…
Reference in a new issue