Re: [Gimp-developer] API for bringing up a Save dialog

2009-07-12 Thread Joao S. O. Bueno
k!! The E-mail client is showing me unread messages from months ago as if they where "New" :-( Sorry for digging into this ancient thread. :-( js -><- ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https

Re: [Gimp-developer] API for bringing up a Save dialog

2009-07-12 Thread Joao S. O. Bueno
On Friday 29 May 2009, Martin Nordholts wrote: > Akkana Peck wrote: > > I'd like a way of bringing up a Save-as or Export-as dialog > > from a Python script. There's no API for this currently, as far > > as I can tell. > > The Save and Export dialogs are rather tightly coupled to the core > current

Re: [Gimp-developer] API for bringing up a Save dialog

2009-05-30 Thread Sven Neumann
Hi, On Fri, 2009-05-29 at 16:02 -0700, Akkana Peck wrote: > Sven Neumann writes: > > On Fri, 2009-05-29 at 10:18 -0700, Akkana Peck wrote: > > > I need to show the dialogs because the plug-in needs to save a > > > file (that's the whole point of the plug-in) and it seems like > > > bad UI to pop u

Re: [Gimp-developer] API for bringing up a Save dialog

2009-05-30 Thread Ryan Krauss
pyGTK: http://www.pygtk.org/ On Sat, May 30, 2009 at 6:56 AM, Esteban Barahona wrote: > speaking of python... are there any wrappers of python (or perl) in gtk? > > .../5/29 Ryan Krauss > >> No, I have no good reason :) I am not really familiar with any Python GUI >> toolkit other than wxPython

Re: [Gimp-developer] API for bringing up a Save dialog

2009-05-30 Thread Esteban Barahona
speaking of python... are there any wrappers of python (or perl) in gtk? .../5/29 Ryan Krauss > No, I have no good reason :) I am not really familiar with any Python GUI > toolkit other than wxPython. When I realized that wouldn't work, I googled > for Tk because I thought that was the one tha

Re: [Gimp-developer] API for bringing up a Save dialog

2009-05-29 Thread Ryan Krauss
No, I have no good reason :) I am not really familiar with any Python GUI toolkit other than wxPython. When I realized that wouldn't work, I googled for Tk because I thought that was the one that ships with Python. On Fri, May 29, 2009 at 4:57 PM, Sven Neumann wrote: > Hi, > > On Fri, 2009-05-

Re: [Gimp-developer] API for bringing up a Save dialog

2009-05-29 Thread Akkana Peck
Sven Neumann writes: > On Fri, 2009-05-29 at 10:18 -0700, Akkana Peck wrote: > > I need to show the dialogs because the plug-in needs to save a > > file (that's the whole point of the plug-in) and it seems like > > bad UI to pop up the JPEG save dialog without ever showing the > > user where the fi

Re: [Gimp-developer] API for bringing up a Save dialog

2009-05-29 Thread Sven Neumann
Hi, On Fri, 2009-05-29 at 12:34 -0500, Ryan Krauss wrote: > This is mildly hackish, but my approach is to pop up a Tk save as > dialog: > > filetypes = [('png files', '*.png'), ('jpg files', '*.jpg'),\ > ('all files', '.*')] > > > def save_as(initialdir=None, initialfile=None): >

Re: [Gimp-developer] API for bringing up a Save dialog

2009-05-29 Thread Ryan Krauss
But how would you progromatically suggest a good filename before popping up the dialog? That is what my code does. On Fri, May 29, 2009 at 3:37 PM, Sven Neumann wrote: > On Fri, 2009-05-29 at 10:18 -0700, Akkana Peck wrote: > > Martin Nordholts writes: > > > IMO we should not reuse gimp_file_sa

Re: [Gimp-developer] API for bringing up a Save dialog

2009-05-29 Thread Sven Neumann
On Fri, 2009-05-29 at 10:18 -0700, Akkana Peck wrote: > Martin Nordholts writes: > > IMO we should not reuse gimp_file_save() for this but instead introduce > > gimp_show_save_dialog() and gimp_show_export_dialog(). I am a bit > > worried however that plug-ins will abuse this power. In your case,

Re: [Gimp-developer] API for bringing up a Save dialog

2009-05-29 Thread Ryan Krauss
This is mildly hackish, but my approach is to pop up a Tk save as dialog: filetypes = [('png files', '*.png'), ('jpg files', '*.jpg'),\ ('all files', '.*')] def save_as(initialdir=None, initialfile=None): filename = tkFileDialog.asksaveasfilename(initialdir=initialdir, \

Re: [Gimp-developer] API for bringing up a Save dialog

2009-05-29 Thread Akkana Peck
Martin Nordholts writes: > IMO we should not reuse gimp_file_save() for this but instead introduce > gimp_show_save_dialog() and gimp_show_export_dialog(). I am a bit > worried however that plug-ins will abuse this power. In your case, why > do you need to show these dialogs? Isn't it better if

Re: [Gimp-developer] API for bringing up a Save dialog

2009-05-29 Thread Martin Nordholts
Akkana Peck wrote: > I'd like a way of bringing up a Save-as or Export-as dialog > from a Python script. There's no API for this currently, as far > as I can tell. The Save and Export dialogs are rather tightly coupled to the core currently so it will not be trivial to extend the plug-in API to s