After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 337250 - Option to rename "Photos" directory
Option to rename "Photos" directory
Status: RESOLVED DUPLICATE of bug 325166
Product: f-spot
Classification: Other
Component: General
0.1.10
Other All
: Normal enhancement
: ---
Assigned To: F-spot maintainers
F-spot maintainers
: 344753 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-04-04 19:35 UTC by Chris Wailes
Modified: 2006-08-16 13:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to change place for Photos Directory (1.99 KB, patch)
2006-06-07 14:44 UTC, nicklas boman
reviewed Details | Review
Patch to change the Photos Directorys location, 2nd try, abit f-spot-ified and cleaned up (2.18 KB, patch)
2006-06-09 23:23 UTC, nicklas boman
none Details | Review
3rd try, cleaned up (2.10 KB, patch)
2006-06-11 21:12 UTC, nicklas boman
none Details | Review
now change photos.db place and the old diff. merged. (2.70 KB, patch)
2006-07-08 15:23 UTC, nicklas boman
none Details | Review

Description Chris Wailes 2006-04-04 19:35:07 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.
Comment 1 nicklas boman 2006-06-07 14:44:33 UTC
Created attachment 66913 [details] [review]
patch to change place for Photos Directory
Comment 2 nicklas boman 2006-06-07 14:48:42 UTC
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)
Comment 3 Stephane Delcroix 2006-06-08 14:25:46 UTC
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)
Comment 4 Ruben Vermeersch 2006-06-09 10:02:39 UTC
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.
Comment 5 nicklas boman 2006-06-09 23:23:01 UTC
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 6 Ruben Vermeersch 2006-06-10 06:18:56 UTC
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);
Comment 7 nicklas boman 2006-06-11 21:12:17 UTC
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.
Comment 8 Bengt Thuree 2006-06-13 12:57:23 UTC
*** Bug 344753 has been marked as a duplicate of this bug. ***
Comment 9 Bengt Thuree 2006-06-28 21:54:49 UTC
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?
Comment 10 Bengt Thuree 2006-06-28 21:56:37 UTC
Similar request in bug #346149 (including the database)
Comment 11 nicklas boman 2006-07-08 15:23:43 UTC
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.
Comment 12 Bengt Thuree 2006-08-14 23:20:33 UTC
This patch is now part of Goal #3, and hopefully will be accepted in two weeks.
Comment 13 Stephane Delcroix 2006-08-16 12:47:57 UTC
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 ***
Comment 14 Stephane Delcroix 2006-08-16 13:47:05 UTC
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.