Re: [PD-dev] recentfiles_list explanation

2011-03-17 Thread yvan volochine

On 03/16/2011 05:02 AM, yv wrote:

also, I created a new file and put all this recentfiles stuff in it,
tcl/pd_guiprefs.tcl and I didn't find out where I should add it so it
ends up in tcl/pkgIndex.tcl.
any hints ?


hiho

I still don't really know what to do with tcl/pkgIndex.tcl
I ran tcl/pkg_mkIndex.tcl and now my new file 'pd_guiprefs.tcl' is in 
there but I'm not sure I had to do this.


also I edited po/Makefile.am and tcl/Makefile.am and added 
pd_guiprefs.tcl there but I'm not a Makefile guru so any advices on this 
is welcome.


I finally have the recentfiles thing working on both osx and linux =)
I'll try to test it on win32 and pd-extended next w-end.

what's your rules about patches ? should I post my patch on sf.net ?

cheers,
_y

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] recentfiles_list explanation

2011-03-16 Thread yv

I got it working on linux =)
here is a small video showing the behavior:

http://www.yvanvolochine.com/tmp/pd_recentfiles.ogg

as Iohannes suggested I use ~/.pd/recentfiles.conf
I'll try to make it for osx/win in the next days if I get my hands on a 
win machine


comments are welcome!

cheers,
_y

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] recentfiles_list explanation

2011-03-16 Thread Hans-Christoph Steiner


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 h...@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



___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] recentfiles_list explanation

2011-03-16 Thread Hans-Christoph Steiner


On Mar 16, 2011, at 12:02 AM, yv wrote:


~/.pd/recentfiles.conf would always only contain recentfiles
configuration.


ok I have a couple more questions:

now I have a ~/.pd/recentfiles.conf that is parsed and all filenames  
are added to a new Open Recent submenu when pd launches instead of  
putting them directly in the File menu (I removed one of the bottom  
separators in there). (that looks nice!)

so the new layout of the file menu would be:
[New]
[Open]
[Open Recent ]
[---]
[Save]
[Save As]
[---]
[Message]
[Print]
[---]
[Close]
[Quit]

what do you think of this idea ?

then I wonder when it would be better to write this file.
I'd like to do it only when closing pd but I'm not sure..

also, I created a new file and put all this recentfiles stuff in it,  
tcl/pd_guiprefs.tcl and I didn't find out where I should add it so  
it ends up in tcl/pkgIndex.tcl.

any hints ?

cheers,
_y



The way that the recent files are currently written to the File menu  
are carefully tailored to the way its normally done on the native  
platform.  GNOME and Windows do it by putting them directly inline on  
the File menu, Mac OS X does it on the Open Recent menu.  I think KDE  
does a Open Recent menu like Mac OS X, but GNOME is quite a bit more  
prevalent from what I've seen.


I think this should stay like it is by default, but you can do  
anything you want in a GUI plugin.


.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



___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] recentfiles_list explanation

2011-03-16 Thread yvan volochine

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

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] recentfiles_list explanation

2011-03-16 Thread yvan volochine

On 03/16/2011 06:28 PM, Hans-Christoph Steiner wrote:

The way that the recent files are currently written to the File menu are
carefully tailored to the way its normally done on the native platform.
GNOME and Windows do it by putting them directly inline on the File
menu, Mac OS X does it on the Open Recent menu. I think KDE does a Open
Recent menu like Mac OS X, but GNOME is quite a bit more prevalent from
what I've seen.

I think this should stay like it is by default, but you can do anything
you want in a GUI plugin.


alright I 'll think about it and write a gui-plugin instead.
I don't have neither gnome nor kde but I think inlining 10 recent items 
in the file menu is a bit too much =)


cheers,
_y

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] recentfiles_list explanation

2011-03-16 Thread Hans-Christoph Steiner


On Mar 16, 2011, at 1:39 PM, yvan volochine wrote:


On 03/16/2011 06:28 PM, Hans-Christoph Steiner wrote:
The way that the recent files are currently written to the File  
menu are
carefully tailored to the way its normally done on the native  
platform.

GNOME and Windows do it by putting them directly inline on the File
menu, Mac OS X does it on the Open Recent menu. I think KDE does a  
Open
Recent menu like Mac OS X, but GNOME is quite a bit more prevalent  
from

what I've seen.

I think this should stay like it is by default, but you can do  
anything

you want in a GUI plugin.


alright I 'll think about it and write a gui-plugin instead.
I don't have neither gnome nor kde but I think inlining 10 recent  
items in the file menu is a bit too much =)


cheers,
_y


It seems that almost everything that you are doing should go into the  
core.  I am saying just the Open Recent versus File-inline issue  
might be best resolved using GUI plugins.  If there was overwhelming  
support for using Open Recent by default on GNU/Linux, I could be  
fine with that too.


.hc



I have the audacity to believe that peoples everywhere can have three  
meals a day for their bodies, education and culture for their minds,  
and dignity, equality and freedom for their spirits.  - Martin  
Luther King, Jr.




___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] recentfiles_list explanation

2011-03-16 Thread Hans-Christoph Steiner


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




___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] recentfiles_list explanation

2011-03-16 Thread yvan volochine

On 03/16/2011 08:18 PM, Hans-Christoph Steiner wrote:

alright I 'll think about it and write a gui-plugin instead.
I don't have neither gnome nor kde but I think inlining 10 recent
items in the file menu is a bit too much =)


It seems that almost everything that you are doing should go into the
core.


indeed

I am saying just the Open Recent versus File-inline issue might

be best resolved using GUI plugins. If there was overwhelming support
for using Open Recent by default on GNU/Linux, I could be fine with
that too.


I don't mind having an OS specific behavior but I think that if we 
inline recent files in Menu.file we should restrain it to 5 items 
(imagine 10 recent files list in there...).


so my proposal is:
- linux/win keep the recentfiles list inlined in Menu.file (5 items max, 
no clear button, oh well..) and osx has a Recent (or Open recent) 
submenu with 5 (or more? dunno the mac-way-of-life for that) recent 
items in it and a clear option (well, they paid for it =)


does that make sense ?

cheers,
_y

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] recentfiles_list explanation

2011-03-16 Thread Hans-Christoph Steiner


On Mar 16, 2011, at 7:55 PM, yvan volochine wrote:


On 03/16/2011 08:18 PM, Hans-Christoph Steiner wrote:

alright I 'll think about it and write a gui-plugin instead.
I don't have neither gnome nor kde but I think inlining 10 recent
items in the file menu is a bit too much =)


It seems that almost everything that you are doing should go into the
core.


indeed

I am saying just the Open Recent versus File-inline issue might

be best resolved using GUI plugins. If there was overwhelming support
for using Open Recent by default on GNU/Linux, I could be fine with
that too.


I don't mind having an OS specific behavior but I think that if we  
inline recent files in Menu.file we should restrain it to 5 items  
(imagine 10 recent files list in there...).


so my proposal is:
- linux/win keep the recentfiles list inlined in Menu.file (5 items  
max, no clear button, oh well..) and osx has a Recent (or Open  
recent) submenu with 5 (or more? dunno the mac-way-of-life for  
that) recent items in it and a clear option (well, they paid for  
it =)


does that make sense ?

cheers,
_y



Sure, works for me.

.hc




[W]e have invented the technology to eliminate scarcity, but we are  
deliberately throwing it away to benefit those who profit from  
scarcity.-John Gilmore




___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] recentfiles_list explanation

2011-03-15 Thread Hans-Christoph Steiner
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


___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] recentfiles_list explanation

2011-03-15 Thread Yvan Volochine
On 3/15/11, Hans-Christoph Steiner h...@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

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] recentfiles_list explanation

2011-03-15 Thread IOhannes zmölnig
On 03/15/2011 10:15 PM, Yvan Volochine wrote:
 On 3/15/11, Hans-Christoph Steiner h...@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



signature.asc
Description: OpenPGP digital signature
___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] recentfiles_list explanation

2011-03-15 Thread yv

~/.pd/recentfiles.conf would always only contain recentfiles
configuration.


ok I have a couple more questions:

now I have a ~/.pd/recentfiles.conf that is parsed and all filenames are 
added to a new Open Recent submenu when pd launches instead of putting 
them directly in the File menu (I removed one of the bottom separators 
in there). (that looks nice!)

so the new layout of the file menu would be:
[New]
[Open]
[Open Recent ]
[---]
[Save]
[Save As]
[---]
[Message]
[Print]
[---]
[Close]
[Quit]

what do you think of this idea ?

then I wonder when it would be better to write this file.
I'd like to do it only when closing pd but I'm not sure..

also, I created a new file and put all this recentfiles stuff in it, 
tcl/pd_guiprefs.tcl and I didn't find out where I should add it so it 
ends up in tcl/pkgIndex.tcl.

any hints ?

cheers,
_y

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] recentfiles_list explanation

2011-03-15 Thread yv

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

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] recentfiles_list explanation

2011-03-14 Thread Yvan Volochine
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


0001-testing-writing-recentfiles-to-pdsettings.patch
Description: Binary data
___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] recentfiles_list explanation

2011-03-14 Thread Yvan Volochine
 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

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev