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 344361 - Need to be able to select new photo repository from the command line
Need to be able to select new photo repository from the command line
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
CVS
Other All
: Normal enhancement
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2006-06-09 03:35 UTC by wjbaird
Modified: 2006-09-14 13:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add --photoDir argument to select a directory for photos (2.62 KB, patch)
2006-06-09 03:46 UTC, wjbaird
none Details | Review
An updated version containing also the fix for bug #325166 (10.45 KB, patch)
2006-08-17 14:33 UTC, Stephane Delcroix
none Details | Review
updated version. contains also the fix for bug #325166 (10.46 KB, patch)
2006-08-20 07:45 UTC, Stephane Delcroix
none Details | Review
updated version (11.09 KB, patch)
2006-08-21 12:24 UTC, Stephane Delcroix
none Details | Review
updated version (11.08 KB, patch)
2006-08-23 15:19 UTC, Stephane Delcroix
committed Details | Review

Description wjbaird 2006-06-09 03:35:06 UTC
I want to be able to have several collections of photos that are accessed separately. The main use case is to have a collection of photos on my laptop hard drive, and another collection of photos on an external hard drive, and to be able to select which collection f-spot shows on the command line. 

Each collection should be completely independant, and should contain it's own imported photos and database.
Comment 1 Elijah Newren 2006-06-09 03:41:30 UTC
Closely related to bug 325166
Comment 2 wjbaird 2006-06-09 03:46:06 UTC
Created attachment 67013 [details] [review]
add --photoDir argument to select a directory for photos

adds a --photoDir argument that allows the user to select a directory to contain both the database file and the imported photos.

also adds a --baseDir argument that allows the user to select just the location of the database file.
Comment 3 Bengt Thuree 2006-06-09 06:26:51 UTC
How about related to bug #331953

Regarding related to bug #325166, this one is abount importing photos to user configurable location. The current bug is about using different Photos and photos.db like, one set for work and one set for private.
Comment 4 Gabriel Burt 2006-08-14 21:25:10 UTC
This seems like it could be more usefully implemented by having two GConf keys for these locations.  Then people who want to change it can (via the cmd line or gconf-editor) do it now and we leave the option open to having that as an exposed preference in the prefs dialog at some point.  Also, then you don't have to specify that argument each time you run.

Only downside is if you have multiple photo DBs or directories it would be a little more annoying to switch between them...
Comment 5 wjbaird 2006-08-14 22:04:37 UTC
The whole point is that I *do* have multiple photo DBs --- and need to switch between them easily.   I really don't want to have to edit gconf everytime I switch...

it's also really slick for testing, since you can maintain multiple
photo dirs with different configurations and load up an appropriate one
to test the features you are trying to test...
Comment 6 Bengt Thuree 2006-08-14 23:00:55 UTC
Gabriel: Check bug #337250 – Option to rename "Photos" directory and how it is 
organized (which is part of Goal #3). This one stores everything in gconf.
Comment 7 Stephane Delcroix 2006-08-17 14:33:09 UTC
Created attachment 71085 [details] [review]
An updated version containing also the fix for bug #325166

this one is an integration of patch #67013 and patch #71072.

you can set --photodir and --basedir separately, you can also change the default via the preference dialog.
Comment 8 Stephane Delcroix 2006-08-20 07:45:54 UTC
Created attachment 71234 [details] [review]
updated version. contains also the fix for bug #325166

Applied the 2 changes from the latest version of the fix for bug #325166 i.e. :
- small fix in the dialog
- creates Photos localized
Comment 9 Stephane Delcroix 2006-08-21 12:24:39 UTC
Created attachment 71297 [details] [review]
updated version

UI fix from bug #325166

This patch contains also the latest version of the one proposed to bug #325166
Comment 10 Bengt Thuree 2006-08-23 11:40:50 UTC
This patch is small and very usefull.

Applies cleanly to latest HEAD, and compiles cleanly.
Works without a problem.

I only have a nitpicky thing.

If you run

f-spot --help

you get the following printout

  --view <file>     view a file or directory
  --basedir <dir>           <dir> where the photo database is located
  --photodir <file>         import photos in <dir>
  --shutdown        shutdown a running f-spot server

Also, why not store the basedir (photos.db path) in preferences?

Comment 11 Stephane Delcroix 2006-08-23 15:19:41 UTC
Created attachment 71468 [details] [review]
updated version

fixed the identation thing

We agreed on the mailing list to not giving the user a way to change the basedir via the preference dialog. My opinion is if it's not changeable, there's no reason to have it in gconf. 
Having it fixed (like now) will prevent the user to loose/erase their db. I don't want to give any chance to 'average joe' to start playing with it and then giving a bad press to f-spot. We can't afford this.
Comment 12 Ben Monnahan 2006-08-28 12:47:20 UTC
Couple comments:

1) We use import directory everywhere else.  Probably should change to --importdir for consistency (and clarity).

2) When I run
/home/bmon/mylocal/bin/f-spot --basedir /home/bmon/.gnome2/f-spot.cvs/ --photodir /tmp/FSPOT

And I open the preference dialog, the import dir combo is disabled and contains 'src' (without quotes).  Locking the import dialog may be what we want since it was passed in, but it would be nice to show the actual import dir.  I just tried creating the directory, and now it shows FSPOT as it should so it looks like an issue only when the directory doesn't already exist.


Other than that it looks good and should save tons of time for those who need to maintain multiple dbs.
Comment 13 Bengt Thuree 2006-09-07 12:31:54 UTC
This one do not apply cleanly anymore, but it is only a trivial change to preferences.cs that fails.

Also, the f-spot --help gives the following which should be changed:
  --photodir <file>         import photos in <dir>

should be
  --photodir <dir>         import photos in <dir>
Comment 14 Bengt Thuree 2006-09-11 21:21:07 UTC
Change status to ready for commit.

Should modify the help text according to above comment though.
Comment 15 Stephane Delcroix 2006-09-14 13:56:08 UTC
Larry committed this in CVS