{"action":"created","issue":{"url":"https://api.github.com/repos/pure-data/pure-data/issues/47","repository_url":"https://api.github.com/repos/pure-data/pure-data","labels_url":"https://api.github.com/repos/pure-data/pure-data/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/pure-data/pure-data/issues/47/comments","events_url":"https://api.github.com/repos/pure-data/pure-data/issues/47/events","html_url":"https://github.com/pure-data/pure-data/pull/47","id":211541747,"number":47,"title":"Gui Preferences","user":{"login":"umlaeute","id":214034,"avatar_url":"https://avatars2.githubusercontent.com/u/214034?v=3","gravatar_id":"","url":"https://api.github.com/users/umlaeute","html_url":"https://github.com/umlaeute","followers_url":"https://api.github.com/users/umlaeute/followers","following_url":"https://api.github.com/users/umlaeute/following{/other_user}","gists_url":"https://api.github.com/users/umlaeute/gists{/gist_id}","starred_url":"https://api.github.com/users/umlaeute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umlaeute/subscriptions","organizations_url":"https://api.github.com/users/umlaeute/orgs","repos_url":"https://api.github.com/users/umlaeute/repos","events_url":"https://api.github.com/users/umlaeute/events{/privacy}","received_events_url":"https://api.github.com/users/umlaeute/received_events","type":"User","site_admin":false},"labels":[{"id":122642816,"url":"https://api.github.com/repos/pure-data/pure-data/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"millerpuckette","id":2308323,"avatar_url":"https://avatars1.githubusercontent.com/u/2308323?v=3","gravatar_id":"","url":"https://api.github.com/users/millerpuckette","html_url":"https://github.com/millerpuckette","followers_url":"https://api.github.com/users/millerpuckette/followers","following_url":"https://api.github.com/users/millerpuckette/following{/other_user}","gists_url":"https://api.github.com/users/millerpuckette/gists{/gist_id}","starred_url":"https://api.github.com/users/millerpuckette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/millerpuckette/subscriptions","organizations_url":"https://api.github.com/users/millerpuckette/orgs","repos_url":"https://api.github.com/users/millerpuckette/repos","events_url":"https://api.github.com/users/millerpuckette/events{/privacy}","received_events_url":"https://api.github.com/users/millerpuckette/received_events","type":"User","site_admin":false},"assignees":[{"login":"millerpuckette","id":2308323,"avatar_url":"https://avatars1.githubusercontent.com/u/2308323?v=3","gravatar_id":"","url":"https://api.github.com/users/millerpuckette","html_url":"https://github.com/millerpuckette","followers_url":"https://api.github.com/users/millerpuckette/followers","following_url":"https://api.github.com/users/millerpuckette/following{/other_user}","gists_url":"https://api.github.com/users/millerpuckette/gists{/gist_id}","starred_url":"https://api.github.com/users/millerpuckette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/millerpuckette/subscriptions","organizations_url":"https://api.github.com/users/millerpuckette/orgs","repos_url":"https://api.github.com/users/millerpuckette/repos","events_url":"https://api.github.com/users/millerpuckette/events{/privacy}","received_events_url":"https://api.github.com/users/millerpuckette/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-03-02T22:45:09Z","updated_at":"2017-03-03T08:59:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pure-data/pure-data/pulls/47","html_url":"https://github.com/pure-data/pure-data/pull/47","diff_url":"https://github.com/pure-data/pure-data/pull/47.diff","patch_url":"https://github.com/pure-data/pure-data/pull/47.patch"},"body":"this PR extends the `tcl/pd_guiprefs` to be more generally useful (the current implementation was tied to the very specific recentfiles functionality).\r\n\r\nif you prefer a squashed PR, let me know.\r\n\r\n### new features\r\n\r\n- simple API that requires a minimum amount of data:\r\n\r\n      ::pd_guiprefs::write foo \"bla\" # write a key/value pair to the default domain\r\n      ::pd_guiprefs::read foo        # read a value associated with the key from the default domain\r\n\r\n- consistent use of `$::pd_guiprefs::domain` (it's always a domain-like string, that can be used regardless of the actual storage backend); the default is `org.puredata.pd.pd-gui`\r\n- honours `PD_CONFIG_DIR` environment variable to specify the filesystem location of Pd's config directory\r\n- honours [`XDG_CONFIG_HOME`](https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) (on linux) to specify the filesystem location of the configuration\r\n- easy to switch to filesystem-based storage on OSX and W32 (though the default is still the native storage), simply by setting the `PD_CONFIG_DIR` variable (if set to an empty-value, sane defaults are assumed)\r\n\r\n- as a side-effect, Pd now also exposes a `::platform` variable, that can be used to distinguish between OSX/linux/W32/... (rather than abusing the `windowingsystem` for that kind of information)\r\n\r\n- some trailing whitespace has also been removed from the edited files\r\n\r\n\r\n### (in)compatibility with old system\r\nthe rewrite retains API-compatibility with the old system.\r\nhowever, i expect that after applying this fix, any data stored with an old version of Pd might not be availble in the new version.\r\nAfaict, this only affects the recentfiles (which i consider non-critical data).\r\n\r\nwe are now using a slightly different domain `org.puredata.pd.pd-gui`, which changes the actual storage path of the preferences (compared to older versions of Pd).\r\nthe main effect of this is, that the old settings stored via the guiprefs will not be available anymore.\r\n\r\n\r\n### tested systems\r\nthe new implementation has been tested on linux and W32.\r\ni haven't tested on OSX (yet).\r\n\r\nalso the default-domain on OSX is still `org.puredata`, because i don't know whether the *RecentFiles* functionality is somehow bound to that key.\r\neventually, that should be changed to  `org.puredata.pd.pd-gui` as well."},"comment":{"url":"https://api.github.com/repos/pure-data/pure-data/issues/comments/283901299","html_url":"https://github.com/pure-data/pure-data/pull/47#issuecomment-283901299","issue_url":"https://api.github.com/repos/pure-data/pure-data/issues/47","id":283901299,"user":{"login":"umlaeute","id":214034,"avatar_url":"https://avatars2.githubusercontent.com/u/214034?v=3","gravatar_id":"","url":"https://api.github.com/users/umlaeute","html_url":"https://github.com/umlaeute","followers_url":"https://api.github.com/users/umlaeute/followers","following_url":"https://api.github.com/users/umlaeute/following{/other_user}","gists_url":"https://api.github.com/users/umlaeute/gists{/gist_id}","starred_url":"https://api.github.com/users/umlaeute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umlaeute/subscriptions","organizations_url":"https://api.github.com/users/umlaeute/orgs","repos_url":"https://api.github.com/users/umlaeute/repos","events_url":"https://api.github.com/users/umlaeute/events{/privacy}","received_events_url":"https://api.github.com/users/umlaeute/received_events","type":"User","site_admin":false},"created_at":"2017-03-03T08:59:42Z","updated_at":"2017-03-03T08:59:42Z","body":"btw, this is required for pure-data/deken#140 (\"remember last download-path between restarts) to work correctly"}}
{"actor":{"display_login":"umlaeute"}}