Adium

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#8145 closed defect (fixed)

Adium should download to the Downloads folder on Leopard by default

Reported by: cbarrett Owned by: nobody
Milestone: Adium X 1.1.4 Component: Adium Core
Version: Severity: normal
Keywords: Cc:
Patch Status:

Description

http://trac.adiumx.com/browser/trunk/Source/AIPreferenceController.m?rev=20000#L696

@"~/Desktop" need change on Leopard to be @"~/Downloads" instead (in both places it's used).

I'd also like for us to be a little more helpful there in the situation where the "user has worse problems to worry about".

Might be able to hit this tonight, but we should make sure this goes into 1.1.4 and that 1.1.4 gets released in the next week or so.

Change History (15)

comment:1 Changed 13 years ago by Evan Schoenberg

Oddly, we're getting ~/Desktop not from that line, which is a hardcoded fallback which I've never seen hit, but rather from

ICGetPref( inst, kICDownloadFolder, NULL, &folder, &length );

despite ~/Downloads being set in Safari as the download folder. This remains true after changing that setting in Safari and then changing it back. It appears Apple may have abandoned the IC pref for downloads entirely?

comment:2 Changed 13 years ago by Evan Schoenberg

Resolution: fixed
Status: newclosed

(In [21377]) Our default downlaods location now follows Safari's setting in 10.5 and falls back to ~/Downloads. Fixes #8145

comment:3 Changed 13 years ago by Evan Schoenberg

(In [21378]) Merged [21377]: Our default downlaods location now follows Safari's setting in 10.5 and falls back to ~/Downloads. Fixes #8145

comment:4 Changed 13 years ago by Colin Barrett

Resolution: fixed
Status: closedreopened

This will not work for people not using Safari.

comment:5 Changed 13 years ago by Zachary West

Safari comes with the system..

comment:6 Changed 13 years ago by Evan Schoenberg

(In [21391]) Only use the Safari preference in 10.5 and if Safari is the default browser, when determining the default downloads directory. Failing that, use NSDownloadsDirectory. Refs #8145

comment:7 Changed 13 years ago by Zachary West

~Downloads is definitely writable.

2007-10-29 16:39:50 Adium[30354] Could not obtain write access for ~/Downloads; defaulting to /Users/Zac/Desktop 
2007-10-29 16:42:57 Adium[30354] *** -[NSLock lock]: deadlock (<NSLock: 0xb627490> '(null)') 
2007-10-29 16:42:57 Adium[30354] *** -[NSLock unlock]: lock (<NSLock: 0xb627490> '(null)') unlocked from thread which did not lock it 
2007-10-29 16:42:57 Adium[30354] *** Break on _NSLockError() to debug. 
2007-10-29 16:42:57 Adium[30354] *** Break on _NSLockError() to debug. 
2007-10-29 16:42:57 Adium[30354] *** -[NSLock dealloc]: lock (<NSLock: 0xb627490> '(null)') deallocated while still in use 
2007-10-29 16:42:57 Adium[30354] *** Break on _NSLockError() to debug. 

comment:8 Changed 13 years ago by Zachary West

(In [21410]) We save the user's preferred path with -stringByAbbreviatingWithTildeInPath:, so we have to expand the tilde when reading it. Let's get more commits for this file! Teheee. Refs #8145.

comment:9 Changed 13 years ago by Evan Schoenberg

Hah! And don't forget to merge :)

comment:10 Changed 13 years ago by Evan Schoenberg

(In [21411]) Brought AIPreferenceController's userPreferredDownloadFolder up to date as of [21410] - stupid manual merging. Refs #8145

comment:11 in reply to:  9 Changed 13 years ago by Evan Schoenberg

Replying to evands:

Hah! And don't forget to merge :)

Nevermind, I realized I hadn't merged mine either, so I got them both at once.

comment:12 Changed 13 years ago by Zachary West

I need to figure out how to do non-manual (i.e., diff&svn ci) merges. >_>

comment:13 in reply to:  12 Changed 13 years ago by Evan Schoenberg

Resolution: fixed
Status: reopenedclosed

Replying to zacw:

I need to figure out how to do non-manual (i.e., diff&svn ci) merges. >_>

From the target checkout, do

svn merge -c REVISION_NUM path_to_source_checkout

e.g.

[~/adium-1.1]: svn merge -c 21410 ~/adium

comment:14 Changed 13 years ago by Eric Musgrove

An attempt to build the latest revision of Adium has resulted in me getting an error. The reason I post this here is it is directly related to the NSDownloadsDirectory.

To start off, a straight compile of 21411 results in an error that NSDownloadsDirectory is not defined. So, I did a quick modification of the code to set it up as such:

NSArray *searchPaths;
#if MAC_OS_X_VERSION_10_5 > MAC_OS_X_VERSION_MAX_ALLOWED
	//Only present in the enum if we're using the 10.5 or greater headers
	#define NSDownloadsDirectory 15
	searchPaths = NSSearchPathForDirectoriesInDomains(NSDownloadsDirectory, NSUserDomainMask, YES);
#endif

This resulted in a successful compile.

comment:15 in reply to:  14 Changed 13 years ago by Evan Schoenberg

Peter has fixed this compilation problem correctly.

Note: See TracTickets for help on using tickets.