On Wed, 13 Mar 2013 10:09:15 +0100, Riccardo Mottola wrote:
Hi,
I'd like to Localize the "special" directories handled by
NSWorkspace, specifically to return the appropriate custom icon.
That is, if the Directory has a localized name, it should get the
proper icon anyway!
When I implemented this in NSWorkspace (not in GWorkspace, thus it is
available to all applications) I had two class of Directories.
"Images" and "Music" are simple. For example:
[folderPathIconDict setObject: @"MusicFolder"
forKey: [NSHomeDirectory () stringByAppendingPathComponent:
@"Music"]];
just Localizing "Music" should do the trick, thus I would have a
localizable string for NSWorkspace.
For other directories, like the Desktop or the Document, I use NS
constants:
Dir = NSSearchPathForDirectoriesInDomains(NSDesktopDirectory,
NSUserDomainMask, YES);
I wonder, also with mac compatibility, if I NSDesktopDirectory should
return already the localized string (I guess yes, but how?) or if I
should use that constant to localize it. It would make less sense
though.
Riccardo
Hi,
on Linux & related systems, the correct way is to use
~/.config/user-dirs.dirs
I couldn't find more information on this, but I think I've heard about
desktop environments (in the future) using only English folder names
physically, but doing some trickery to display localized names.
--
Luboš Doležel
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev