GNOME Bugzilla – Bug 335547
[configuration] Use XDG (freedesktop) locations
Last modified: 2010-12-22 19:34: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.
*** Bug 335829 has been marked as a duplicate of this bug. ***
*** Bug 335482 has been marked as a duplicate of this bug. ***
*** Bug 337737 has been marked as a duplicate of this bug. ***
See also other comments from duplicated bugs.
for the record, the - main window size - pane positions - maximization state are still not saved in trunk.
Also, for the "file chooser": remember which folder was last used for importing clips.
*** Bug 498906 has been marked as a duplicate of this bug. ***
started a branch to work on this
have a configuration branch available from my git repository, in case anyone cares to test it.
we have support for saving window and tab positions into a global config file in git master.
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
I'm alright with doing this as long as edward's alright with moving the location of the local plugins directory.
you have my blessing.
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?
Well, I basically followed the spec for everything except the source list thumbnails (which are stored in /tmp, using tempfile()).
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).
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.
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/