Re: API for bringing up a Save dialog

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

 



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 show 
and interact these dialogs but I would not reject patches that 
implemented it properly.

> Would be be possible to add an API for this, or maybe an optional
> argument in gimp_file_save and the corresponding _export function?
>   

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 the user has to go 
through a single place to save or export?

> In the new framework, will gimp_file_save() fail if the filename isn't
> xcf?

No, the existing API needs to be backwards compatible so even though it 
is unfortunate that _save() can be used to export, we need to allow that 
for the sake of backwards compatibility.

 / Martin
_______________________________________________
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