GNOME Bugzilla – Bug 337250
Option to rename "Photos" directory
Last modified: 2006-08-16 13:47:05 UTC
It would be nice to be able to change the name of the default "Photos" folder to whatever you wanted. As well, I would like to have my phots organized in said folder by something other then the date, such as by tags or one of several other choices that the user may select from.
Created attachment 66913 [details] [review] patch to change place for Photos Directory
patch applies fine against current CVS. nothing fancy and or wild. Simply creates a gconf key, /apps/f-spot/PhotoDirectory wich holds the path to where to import the Photos. Change it manually with gconf-editor and the next import will be to the new location. No gui yet (since i know very little about glade)
Not providing an ui is a good way to have this as a 'advanced users only' option. Since very few people *really* asks for this, why not letting this as you proposed. I did'nt tried the code yet, but a first comment about the code itself: - all preferences in f-spot are handled by the Preferences class. the Preferences class is in charge of getting/storing value of the preferences storage (GConf in this case). So, to be more f-spot style compliant, add your key in Preferences.cs and get it using Preferences.Get(Preferences.STORAGE_FOLDER)
Also, there's no gconf-schema (which makes this key totally undocumented). There should probably a default-empty key definition in the schemas file, with f-spot using the user dir when empty.
Created attachment 67075 [details] [review] Patch to change the Photos Directorys location, 2nd try, abit f-spot-ified and cleaned up Hope ive f-spot-ified my patch abit, and this applies fine for the current CVS aswell. Cleaned it up abit too. + I have the Photos directory set to $HOME/Photos as default. So, people wouldnt notice.
Comment on attachment 67075 [details] [review] Patch to change the Photos Directorys location, 2nd try, abit f-spot-ified and cleaned up > public static string PhotoDirectory { > get { >- return System.IO.Path.Combine (HomeDirectory, "Photos"); >+ if (Preferences.Get (Preferences.PHOTO_DIRECTORY) == null) { >+ Preferences.Set (Preferences.PHOTO_DIRECTORY, >+ System.IO.Path.Combine (HomeDirectory, "Photos")); >+ >+ return (string)Preferences.Get (Preferences.PHOTO_DIRECTORY); >+ } else return (string)Preferences.Get (Preferences.PHOTO_DIRECTORY); > } Why not just write this as: if (Preferences.Get (Preferences.PHOTO_DIRECTORY) == null) { Preferences.Set (Preferences.PHOTO_DIRECTORY, System.IO.Path.Combine (HomeDirectory, "Photos")); } return (string)Preferences.Get (Preferences.PHOTO_DIRECTORY);
Created attachment 67149 [details] [review] 3rd try, cleaned up yes, i dont really know why i didnt think about that. must have been something that was left from before. fixed it now.
*** Bug 344753 has been marked as a duplicate of this bug. ***
Why not also have an option to store the photos.db on a user defined place? Like an NFS drive? Or is this a new bug?
Similar request in bug #346149 (including the database)
Created attachment 68622 [details] [review] now change photos.db place and the old diff. merged. this is my previous patch + you can now change the position of the photos.db databases path.
This patch is now part of Goal #3, and hopefully will be accepted in two weeks.
I close this one as dup of bug #325166 but keep the patch proposed in mind *** This bug has been marked as a duplicate of 325166 ***
Changing title. From "Option to rename "Photos" directory and how it is organized" to "Option to rename "Photos" directory" For the 'and how it is organized', look at bug #351624. One bug, one bug entry. It's a bijection.