On Tue, 2016-03-08 at 21:44 +0100, Bertrand Dekoninck wrote: > I'm thinking about adding a custom icon to my Movies folder in my home, > as the Movies folder on osx. So I would like to add it a constants in > base or gui. > > Looking at gui and base, I've found that some constants of > > https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Constants/index.html#//apple_ref/c/tdef/NSSearchPathDirectory > > are defined in base/NSPathUtilities.m and that others like > NSMusicDirectory are defined in gui/NSWorkspace.m. > > But the NSMoviesDirectory is lacking. > > Should I try to add it to base or to NSWorkspace.m as NSMusicDirectory > is already ?
I don't see NSMusicDirectory. But referring to NSDownloadsDirectory, you should: - add new constant to base/Headers/Foundation/NSPathUtilities.h - add new constant to base/Source/NSPathUtilities.m - add new icon code to gui/NSWorkspace.m's -[NSWorkspace init] If you care about NSMusicDirectory, feel free to replace existing handling of the NSHomeDirectory() + "Music" directory in gui/NSWorkspace.m. Current implementation seems like a hack. Please add appropriate guard statements based on the release in which the constants first appeared on the 'other' implementation; NSMusicDirectory has, for example, first appeared in 10.6. Similarly to how Music handling should be fixed, I believe we should deprecate use of NSHomeDirectory() + "/Images". (Not remove, because we don't want to break people's systems just yet.) If you'd like to do this in your patch, just add "/* This is a deprecated special case and should be removed in a future release. */" The correct folder name is NSHomeDirectory() + "/Pictures" and there should be a corresponding constant in NSPathUtilities. If you decide to also add NSPicturesDirectory, for compatibility it should use "ImageFolder" icon (there is no need to add "PictureFolder" or so). If you have signed copyright assignment documents (and sent them off to FSF), feel free to commit this. Or, I will be happy to review an incoming patchseries. (Note that we are still transitioning to Git, so we can't accept a pull request on any platform.) Alternatively, if you would prefer not to assign copyright or contribute code, feel free to file a bug and assign it to me in Savannah. This looks trivial enough. Thank you for your interest! _______________________________________________ Gnustep-dev mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnustep-dev
