From 568bc5d4d5bc902f09b80865de9fe30fc9a70ea7 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 28 Oct 2007 04:35:49 +0000 Subject: [PATCH] use "Downloads" folder as default folder --- macosx/Controller.m | 10 +++++----- macosx/Defaults.plist | 6 ++---- macosx/PeerProgressIndicatorCell.m | 1 - 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 92270c67c..45488abe6 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -579,11 +579,13 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi //clear badge [fBadger clearBadge]; - + //wait for running transfers to stop and for NAT to be disabled (5 second timeout) NSDate * start = [NSDate date]; - while ([start timeIntervalSinceNow] >= -5.0 - && (tr_torrentCount(fLib) > 0 || tr_handleStatus(fLib)->natTraversalStatus != TR_NAT_TRAVERSAL_DISABLED)) + + tr_close(fLib); + + while ([start timeIntervalSinceNow] >= -5.0 && tr_handleStatus(fLib)->natTraversalStatus != TR_NAT_TRAVERSAL_DISABLED) usleep(100000); //remaining calls the same as dealloc @@ -603,8 +605,6 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi [fAutoImportedNames release]; [fPendingTorrentDownloads release]; [fTempTorrentFiles release]; - - tr_close(fLib); } - (void) handleOpenContentsEvent: (NSAppleEventDescriptor *) event replyEvent: (NSAppleEventDescriptor *) replyEvent diff --git a/macosx/Defaults.plist b/macosx/Defaults.plist index 379673180..5b16ff7b7 100644 --- a/macosx/Defaults.plist +++ b/macosx/Defaults.plist @@ -45,7 +45,7 @@ DownloadChoice Constant DownloadFolder - ~/Desktop + ~/Downloads DownloadLimit 100 DownloadSound @@ -59,7 +59,7 @@ FilterSearchType Name IncompleteDownloadFolder - ~/Desktop + ~/Downloads InfoVisible InspectorSelected @@ -68,8 +68,6 @@ 1 MoveChoice Constant - MoveFolder - ~/Desktop NatTraversal PiecesViewShowAvailability diff --git a/macosx/PeerProgressIndicatorCell.m b/macosx/PeerProgressIndicatorCell.m index 8afeae4ee..ae6037c02 100644 --- a/macosx/PeerProgressIndicatorCell.m +++ b/macosx/PeerProgressIndicatorCell.m @@ -26,7 +26,6 @@ @implementation PeerProgressIndicatorCell -#warning exists in 10.5 - (BOOL) hidden { return fIsHidden;