#2045 hold down option key on launch to start with all torrents paused

This commit is contained in:
Mitchell Livingston 2009-05-12 00:58:22 +00:00
parent 722eed060f
commit deeeee3d05
6 changed files with 17 additions and 4 deletions

5
NEWS
View File

@ -1,5 +1,10 @@
NEWS file for Transmission <http://www.transmissionbt.com/>
1.70 (2009/mm/dd)
<http://trac.transmissionbt.com/query?milestone=1.70&group=component&groupdesc=1&order=severity>
- Mac
+ Hold down the option key on launch to pause all transfers
1.61 (2009/05/11)
<http://trac.transmissionbt.com/query?milestone=1.61&group=component&groupdesc=1&order=severity>
- All Platforms

View File

@ -86,6 +86,7 @@
A2265F420B5EF5F40093DDA5 /* FileNameCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A2265F400B5EF5F40093DDA5 /* FileNameCell.m */; };
A226FDAC0D0CDF20005A7F71 /* libnatpmp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C7A118D0D0B2EB800B5701F /* libnatpmp.a */; };
A22A8D560AEEAFA5007E9CB9 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A22A8D540AEEAFA5007E9CB9 /* Localizable.strings */; };
A22CFB820FB66EF30009BD3E /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A22CFB810FB66EF30009BD3E /* Carbon.framework */; };
A22D3AA60D00D1790079CFED /* TurtleTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = A22D3AA30D00D1790079CFED /* TurtleTemplate.png */; };
A22E59A70DC11A1D00F4BE15 /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A29EBE700DC06068006CEE80 /* libcurl.dylib */; };
A22E59A80DC11A1F00F4BE15 /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A29EBE700DC06068006CEE80 /* libcurl.dylib */; };
@ -483,6 +484,7 @@
A22CF7CC0FA5E2DB0009BD3E /* nl */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = nl; path = macosx/nl.lproj/GroupRules.xib; sourceTree = "<group>"; };
A22CF7CF0FA6750E0009BD3E /* tr */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = tr; path = macosx/tr.lproj/GroupRules.xib; sourceTree = "<group>"; };
A22CF7D10FA6A19B0009BD3E /* ru */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ru; path = macosx/ru.lproj/GroupRules.xib; sourceTree = "<group>"; };
A22CFB810FB66EF30009BD3E /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
A22D3AA30D00D1790079CFED /* TurtleTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = TurtleTemplate.png; path = macosx/Images/TurtleTemplate.png; sourceTree = "<group>"; };
A22F1E540E7DA8030065DB9D /* sparkle_dsa_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = sparkle_dsa_pub.pem; path = macosx/sparkle_dsa_pub.pem; sourceTree = "<group>"; };
A231274B0D11D0B7003F9AFF /* AboutWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = AboutWindow.xib; path = macosx/AboutWindow.xib; sourceTree = "<group>"; };
@ -801,6 +803,7 @@
A261F1DC0A69A1610002815A /* Growl.framework in Frameworks */,
A29EBE710DC06068006CEE80 /* libcurl.dylib in Frameworks */,
A2E669790F5B8E5A00B4251A /* Security.framework in Frameworks */,
A22CFB820FB66EF30009BD3E /* Carbon.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -1062,6 +1065,7 @@
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
A2E669780F5B8E5A00B4251A /* Security.framework */,
A22CFB810FB66EF30009BD3E /* Carbon.framework */,
A261F1DB0A69A1610002815A /* Growl.framework */,
A24F19070A3A790800C9C145 /* Sparkle.framework */,
);

View File

@ -97,6 +97,7 @@ typedef enum
IBOutlet NSButton * fURLSheetOpenButton;
BOOL fUpdateInProgress;
BOOL fPauseOnLaunch;
Badger * fBadger;
IBOutlet NSMenu * fDockMenu;

View File

@ -24,6 +24,7 @@
#import <IOKit/IOMessage.h>
#import <IOKit/pwr_mgt/IOPMLib.h>
#import <Carbon/Carbon.h>
#import "Controller.h"
#import "Torrent.h"
@ -306,6 +307,8 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
[[SUUpdater sharedUpdater] setDelegate: self];
fUpdateInProgress = NO;
fPauseOnLaunch = (GetCurrentKeyModifiers() & (optionKey | rightOptionKey)) != 0;
}
return self;
}
@ -401,7 +404,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
for (NSDictionary * historyItem in history)
{
Torrent * torrent;
if ((torrent = [[Torrent alloc] initWithHistory: historyItem lib: fLib]))
if ((torrent = [[Torrent alloc] initWithHistory: historyItem lib: fLib forcePause: fPauseOnLaunch]))
{
[fTorrents addObject: torrent];
[torrent release];

View File

@ -75,7 +75,7 @@ typedef enum
- (id) initWithPath: (NSString *) path location: (NSString *) location deleteTorrentFile: (torrentFileState) torrentDelete
lib: (tr_session *) lib;
- (id) initWithTorrentStruct: (tr_torrent *) torrentStruct location: (NSString *) location lib: (tr_session *) lib;
- (id) initWithHistory: (NSDictionary *) history lib: (tr_session *) lib;
- (id) initWithHistory: (NSDictionary *) history lib: (tr_session *) lib forcePause: (BOOL) pause;
- (NSDictionary *) history;

View File

@ -116,7 +116,7 @@ int trashDataFile(const char * filename)
return self;
}
- (id) initWithHistory: (NSDictionary *) history lib: (tr_session *) lib
- (id) initWithHistory: (NSDictionary *) history lib: (tr_session *) lib forcePause: (BOOL) pause
{
self = [self initWithHash: [history objectForKey: @"TorrentHash"]
path: [history objectForKey: @"TorrentPath"] torrentStruct: NULL lib: lib
@ -132,7 +132,7 @@ int trashDataFile(const char * filename)
{
//start transfer
NSNumber * active;
if ((active = [history objectForKey: @"Active"]) && [active boolValue])
if (!pause && (active = [history objectForKey: @"Active"]) && [active boolValue])
{
fStat = tr_torrentStat(fHandle);
[self startTransfer];