Re: API for bringing up a Save dialog

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <sven@xxxxxxxx> wrote:
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):
>     filename = tkFileDialog.asksaveasfilename(initialdir=initialdir, \
>                                               initialfile=initialfile,
> \
>                                               filetypes=filetypes)
>     return filename
>
> It would prettier to do a wxPython gtk one, but that requires a parent
> frame AFAIK.

Any particular reason you are not using a GtkFileChooserDialog? That is
the dialog that the GIMP user expects and knows to use. GTK+ is the only
toolkit that you can definitely rely on being installed and available.
GTK+ is part of the GIMP plug-in API.


Sen



_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux