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


_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to