hello
sorry if this is obvious but I'm looking into pd source for the 1st time today...
I'm trying to get recentfiles written to ~/.pdsettings and I think I'm missing something obvious. (see my patch attached or here: http://pastebin.com/3apUXLzs ).
so far I can read from .pdsettings and get the recentfiles in the File menu (when I wrote them in theremanually) but, in s_files.c/glob_savepreferences():
char *pathelem = namelist_get(recentfiles_list, i)
does not make it. I think that I don't really understand the way pd and the gui communicate with each other. IIUC, recentfiles_list is updated when a file is opened (in tcl/wheredoesthisgo.tcl) but how come in glob_savepreferences() sys_searchpath and other globals are "found" if recentfiles_list is not ?
also, maybe having recentfiles written to another file than .pdsettings would be easier (like it seems to be the case on osx by looking at the code but I'm not sure) but another dot file just for this would be ugly IMHO
thanks for your advices or for pointing me to other threads where this is discussed (couldn't find any).
cheers, _yvan
I'm trying to get recentfiles written to ~/.pdsettings and I think I'm missing something obvious. (see my patch attached or here: http://pastebin.com/3apUXLzs ).
so far I can read from .pdsettings and get the recentfiles in the File menu (when I wrote them in theremanually) but, in s_files.c/glob_savepreferences():
char *pathelem = namelist_get(recentfiles_list, i)
does not make it. I think that I don't really understand the way pd and the gui communicate with each other.
I think I found my error. should I add a method in m_glob.c that appends a filename to recentfiles_list. then when opening a window in Tcl, send the new filename to pd (please correct me if I'm wrong) ? I'll try after sleeping a bit :)
cheers, _y
On Tue, 2011-03-15 at 03:45 +0100, Yvan Volochine wrote:
I'm trying to get recentfiles written to ~/.pdsettings and I think I'm missing something obvious. (see my patch attached or here: http://pastebin.com/3apUXLzs ).
so far I can read from .pdsettings and get the recentfiles in the File menu (when I wrote them in theremanually) but, in s_files.c/glob_savepreferences():
char *pathelem = namelist_get(recentfiles_list, i)
does not make it. I think that I don't really understand the way pd and the gui communicate with each other.
I think I found my error. should I add a method in m_glob.c that appends a filename to recentfiles_list. then when opening a window in Tcl, send the new filename to pd (please correct me if I'm wrong) ? I'll try after sleeping a bit :)
Hey Yvan,
It's great that you are taking this on, its definitely useful. I think that it might make more sense to create a separate GUI-only preference system. Its something that I had planned on trying, but hadn't found the time, so it'd be great if you beat me to it!
This way it would be a lot easier to deal with, you can do everything from Tcl.
.hc
On 3/15/11, Hans-Christoph Steiner hans@at.or.at wrote:
On Tue, 2011-03-15 at 03:45 +0100, Yvan Volochine wrote:
I'm trying to get recentfiles written to ~/.pdsettings and I think I'm missing something obvious.
[snip]
Hey Yvan,
It's great that you are taking this on, its definitely useful. I think that it might make more sense to create a separate GUI-only preference system. Its something that I had planned on trying, but hadn't found the time, so it'd be great if you beat me to it!
This way it would be a lot easier to deal with, you can do everything from Tcl.
hi,
well I'm trying.. a "separate GUI-only preference system" would mean a separate dot file then (like .pdgui) ? and so far, this would contain only recentfiles right ?
cheers, _y
On 03/15/2011 10:15 PM, Yvan Volochine wrote:
On 3/15/11, Hans-Christoph Steiner hans@at.or.at wrote:
On Tue, 2011-03-15 at 03:45 +0100, Yvan Volochine wrote:
I'm trying to get recentfiles written to ~/.pdsettings and I think I'm missing something obvious.
[snip]
Hey Yvan,
It's great that you are taking this on, its definitely useful. I think that it might make more sense to create a separate GUI-only preference system. Its something that I had planned on trying, but hadn't found the time, so it'd be great if you beat me to it!
This way it would be a lot easier to deal with, you can do everything from Tcl.
hi,
well I'm trying.. a "separate GUI-only preference system" would mean a separate dot file then (like .pdgui) ?
why not make a ~/.pd/ folder and put your preferences for your plugin in there? this woul dallow for less clutter in the home-directory and bundle all the pd-related settings nicely together.
and so far, this would contain only recentfiles right ?
~/.pd/recentfiles.conf would always only contain recentfiles configuration.
fgamsdr IOhannes
On 03/15/2011 11:20 PM, IOhannes zmölnig wrote:
a "separate GUI-only preference system" would mean a separate dot file then (like .pdgui) ?
why not make a ~/.pd/ folder and put your preferences for your plugin in there? this woul dallow for less clutter in the home-directory and bundle all the pd-related settings nicely together.
and so far, this would contain only recentfiles right ?
~/.pd/recentfiles.conf would always only contain recentfiles configuration.
yes you're absolutely right.
cheers, _y
On Mar 15, 2011, at 6:20 PM, IOhannes zmölnig wrote:
On 03/15/2011 10:15 PM, Yvan Volochine wrote:
On 3/15/11, Hans-Christoph Steiner hans@at.or.at wrote:
On Tue, 2011-03-15 at 03:45 +0100, Yvan Volochine wrote:
I'm trying to get recentfiles written to ~/.pdsettings and I think I'm missing something obvious.
[snip]
Hey Yvan,
It's great that you are taking this on, its definitely useful. I think that it might make more sense to create a separate GUI-only preference system. Its something that I had planned on trying, but hadn't found the time, so it'd be great if you beat me to it!
This way it would be a lot easier to deal with, you can do everything from Tcl.
hi,
well I'm trying.. a "separate GUI-only preference system" would mean a separate dot file then (like .pdgui) ?
why not make a ~/.pd/ folder and put your preferences for your plugin in there? this woul dallow for less clutter in the home-directory and bundle all the pd-related settings nicely together.
and so far, this would contain only recentfiles right ?
~/.pd/recentfiles.conf would always only contain recentfiles configuration.
That's a good idea, but I think it should fit into the Free Desktop Standards. Isn't that something like ~/.local/pd? Then that does not cover Windows, which uses the registry, and Mac OS X, which uses the 'defaults' system.
.hc
----------------------------------------------------------------------------
"We have nothing to fear from love and commitment." - New York Senator Diane Savino, trying to convince the NY Senate to pass a gay marriage bill
On 03/16/2011 06:16 PM, Hans-Christoph Steiner wrote:
~/.pd/recentfiles.conf would always only contain recentfiles configuration.
That's a good idea, but I think it should fit into the Free Desktop Standards. Isn't that something like ~/.local/pd? Then that does not cover Windows, which uses the registry, and Mac OS X, which uses the 'defaults' system.
isn't it ~/.config/pd ?
_y
On Mar 16, 2011, at 1:35 PM, yvan volochine wrote:
On 03/16/2011 06:16 PM, Hans-Christoph Steiner wrote:
~/.pd/recentfiles.conf would always only contain recentfiles configuration.
That's a good idea, but I think it should fit into the Free Desktop Standards. Isn't that something like ~/.local/pd? Then that does not cover Windows, which uses the registry, and Mac OS X, which uses the 'defaults' system.
isn't it ~/.config/pd ?
_y
Seems this is called XDG_CONFIG_HOME: http://www.freedesktop.org/wiki/Software/xdg-user-dirs
Yeah ~/.config/pure-data and ~/.config.pd-extended might make the most sense.
.hc
----------------------------------------------------------------------------
All mankind is of one author, and is one volume; when one man dies, one chapter is not torn out of the book, but translated into a better language; and every chapter must be so translated.... -John Donne