Re: [Gimp-developer] Problem with python save handler



On 9 September 2012 17:09, Rob Antonishen <rob antonishen gmail com> wrote:
>>> It seems the issue is related to adding extra parameters to the save handler....
>>>
>>> Is it not possible to have dialog parameters with a python save handler?
>>
>> Seems not, no.  Setting the menu="<FILE>" and/or setting the on_query
>> causes your extra float parameters to always be set to "0.0", and
>> there's no dialog. I can't tell if that's a bug, or by design.
>>
>> This is a quick and dirty hack, but seems to work:
>> http://pastebin.com/g1kriiqf
>>
>> It ends up at the bottom of the File menu, instead of being properly
>> registered as a save handler.

The openraster import/export plug-in ships with GIMP and should
be used as an example to take off any doubts.

Check the code at:
http://git.gnome.org/browse/gimp/tree/plug-ins/pygimp/plug-ins/file-openraster.py

(If, on the other hand, openraster import/export itself is not
working, than something is broken, and we will have to fix it)


   js
  -><-


>>
>
> Thanks Chris-
>
> I'll just set the scaling to be 0-100 and let users deal with the
> scaling in the receiving application.
>
> The odd thing is that I did manage to get a dialog showing up on the
> first save, then not on subsequent, the it stopped working completely,
> so I'm guessing there is a bug in there somewhere.
>
> -Rob A>
> _______________________________________________
> gimp-developer-list mailing list
> gimp-developer-list gnome org
> https://mail.gnome.org/mailman/listinfo/gimp-developer-list


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