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 335547 - [configuration] Use XDG (freedesktop) locations
[configuration] Use XDG (freedesktop) locations
Status: RESOLVED FIXED
Product: pitivi
Classification: Other
Component: General
Git
Other Linux
: Normal normal
: 0.13.1
Assigned To: Brandon Lewis
Pitivi maintainers
: 335482 335829 337737 498906 (view as bug list)
Depends on:
Blocks: 335482 523057
 
 
Reported: 2006-03-22 17:45 UTC by Edward Hervey
Modified: 2010-12-22 19:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screencast showing the bug (963.60 KB, application/x-bzip)
2010-12-22 09:08 UTC, Jean-Philippe Fleury
Details

Description Edward Hervey 2006-03-22 17:45:29 UTC
PiTiVi needs to remember the various configurations (window position, which mode, default and user presets, ...).

I'm still hesitating between having a .pitivi configuration file/directory and using gconf keys.

GConf is the way to go for gnome apps, but using file/directory would allow PiTiVi to be used by non-gnome users too.
Comment 1 Edward Hervey 2006-03-24 12:33:35 UTC
*** Bug 335829 has been marked as a duplicate of this bug. ***
Comment 2 Edward Hervey 2008-10-11 10:34:26 UTC
*** Bug 335482 has been marked as a duplicate of this bug. ***
Comment 3 Edward Hervey 2008-10-11 10:34:38 UTC
*** Bug 337737 has been marked as a duplicate of this bug. ***
Comment 4 Edward Hervey 2008-10-11 10:35:11 UTC
See also other comments from duplicated bugs.
Comment 5 Jean-François Fortin Tam 2008-10-11 13:57:02 UTC
for the record, the 
- main window size
- pane positions
- maximization state
are still not saved in trunk.
Comment 6 Jean-François Fortin Tam 2009-01-31 17:43:53 UTC
Also, for the "file chooser": remember which folder was last used for importing clips.
Comment 7 Brandon Lewis 2009-02-03 04:04:52 UTC
*** Bug 498906 has been marked as a duplicate of this bug. ***
Comment 8 Brandon Lewis 2009-02-12 03:54:15 UTC
started a branch to work on this
Comment 9 Brandon Lewis 2009-02-12 05:44:22 UTC
have a configuration branch available from my git repository, in case anyone cares to test it.
Comment 10 Brandon Lewis 2009-02-13 19:09:40 UTC
we have support for saving window and tab positions into a global config file in git master.
Comment 11 Jean-François Fortin Tam 2009-02-13 20:12:45 UTC
Seems to work, but there's an implemantion detail missing (I thought had mentionned it in one of the dupes, but turns out I forgot, it seems). As this project's settings saving is still a young/unimplemented feature at the moment, I guess now is the time to make sure that we get the user data directory locations "done right" from the start. What I'm referring to is this Freedesktop spec: http://standards.freedesktop.org/basedir-spec/latest/
Especially: http://standards.freedesktop.org/basedir-spec/latest/ar01s03.html

I first heard about the xdg desktop dirs thing through this post, which does a good job at explaining the issue/challenges that this spec addresses: http://ploum.frimouvy.org/?184-cleaning-user-preferences-keeping-user-data

So, for example, we could store files like this:
- $XDG_DATA_HOME/pitivi/plugins/
- $XDG_CONFIG_HOME/pitivi/pitivi.conf
- $XDG_CONFIG_HOME/pitivi/plugins-settings/
- $XDG_CACHE_HOME/pitivi/thumbnails (if needed)

... with their respective fallbacks (as described in the specs), of course. Here is an example implementation in Python, which tries to use the environment variables and falls back on hardcoded paths otherwise (I don't know if there's a more elegant way):

http://bazaar.launchpad.net/%7Especto/specto/main/annotate/100/spectlib/util.py
(between lines 68 and 88).

"Recently used" file lists, however, go in a separate storage:  http://standards.freedesktop.org/recent-file-spec/recent-file-spec-0.2.html
Comment 12 Brandon Lewis 2009-02-19 21:03:07 UTC
I'm alright with doing this as long as edward's alright with moving the location of the local plugins directory.
Comment 13 Edward Hervey 2009-02-20 14:50:56 UTC
you have my blessing.
Comment 14 Brandon Lewis 2009-02-26 20:15:28 UTC
started working on this today: couple of things.

1) the specification for XDG_CONFIG_DIRS/XDG_DATA_DIRS specifies that paths be spearated with colons. Would this break on Mac OS X?

2) do we really know where we're going to put plugins? do plugins count as user data or user configuration?
Comment 15 Brandon Lewis 2009-02-26 21:15:03 UTC
Well, I basically followed the spec for everything except the source list thumbnails (which are stored in /tmp, using tempfile()).
Comment 16 Edward Hervey 2009-03-03 08:25:34 UTC
The plugins will either be system-wide or user-specific, but not project-specific.

If a project requires a specific plugin but the user doesn't have it, we should have a way to allow the user to install the required plugin (maybe also have a way to add online (local and/or internet) databses where pitivi can query for the missing plugin).
Comment 17 Jean-Philippe Fleury 2010-12-22 09:08:54 UTC
Created attachment 176888 [details]
Screencast showing the bug

With version 0.13.5 (on Ubuntu 10.10), PiTiVi doesn't remember neither the position of the main window nor its size.

PiTiVi seems to always open in a default position and with a default size.
Comment 18 Jean-François Fortin Tam 2010-12-22 19:34:29 UTC
JP, do not comment on closed bugs. Open a new bug report. 

By the way, remembering the settings works for me here... try running from the terminal and see if it outputs anything, and also check that there's something in ~/.config/pitivi/