On Dec 9, 2010, at 10:25 AM, Lorenzo Sutton wrote:

Hans-Christoph Steiner wrote:

On Nov 25, 2010, at 6:27 AM, Lorenzo Sutton wrote:

Hans-Christoph Steiner wrote:

On Nov 24, 2010, at 10:59 PM, Ivica Ico Bukvic wrote:


(and a random aside, perhaps you'd be interested in getting Pd to use
the GTK open panel?  I've always hated the Tcl/Tk one).

How would one go about doing this?

I believe that gnocl is the thing that you are looking for:

http://wiki.tcl.tk/5151
Actually a really 'quick and dirty' solution would be to call zenity [1] from within the tk.. Which IMHO is better than the Tk file opener.. Attached a version of pd.tk (0.42.5-extended-rc5 linux) which will try touse zenity for open, falling back to Tk if zeniy is not found (sorry my tcl is really really rusty :-)

Lorenzo.

[1]: http://freshmeat.net/projects/zenity


That would make a great GUI plugin for Pd 0.43. Basically the plugin would just override pdtk_openpanel and pdtk_savepanel (now in pd/tcl/wheredoesthisgo.tcl). Just 'rename' the existing ones in your plugin, then create your own procs with the same names.
Actually I was replacing the menu items. I see that in 0.43 these are in pd_menucommands.tcl but from the examples I have no clue how to replace that... Hints would be appreciated :)

You can see lots of example plugins in SVN here so you can either browse via the web or "svn checkout" this URL:
https://pure-data.svn.sourceforge.net/svnroot/pure-data/trunk/scripts/guiplugins

So something like:

rename pdtk_openpanel pdtk_openpanel_original
proc pdtk_openpanel {target localdir} {
# my own custom open panel code
}

You can see this in these two plugins:
simple_examples/font_doesnt_follow_focus-plugin.tcl
simple_examples/pdwindow_popup_mode-plugin.tcl

.hc




----------------------------------------------------------------------------

I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone." --Bjarne Stroustrup (creator of C++)


_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to