RSS/Atom feed Twitter
Site is read-only, email is disabled

PDB Procedures for External Progress Bars

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

PDB Procedures for External Progress Bars C. Jason. B. 27 Aug 12:59
  CAH0mxTSgGJ=A1qDqe1gZGDbjB6... 27 Aug 14:41
   PDB Procedures for External Progress Bars C. Jason. B. 27 Aug 14:40
C. Jason. B.
2015-08-27 12:59:00 UTC (about 9 years ago)

PDB Procedures for External Progress Bars

List,

I am tasked with creating (python using GTK) a plugin which will utilize a great many other scripts and plugins within GIMP. The file which is being written runs in full screen mode most of the time so the progress bars in The GIMP are obscured, which leads to the use of an external progress bar. But a snag has been encountered. While trying to register a temporary function from within python, it balks at the number of parameters, and the parameter it is refusing is the callback function. A perusal of the source code lead me to gimpmodule.c in the pygimp directory (line 642).

I am not a c programmer, so I am attempting to translate this via my knowledge of Python.

It looks, at first glance, as if this function does not allow for a callback function to be passed in. If so, how would one register a temporary function from python?

On an additional note, the PDB function gimp_progress_init indicates that a '-1' is passed to instruct it to use an external window for a progress bar, but it chokes on that value with an error (either as a string or an int).

I have found the functions which (in Python) are accessed via gimp.progress_install, so I know that these can be used instead. What I am trying to find out is if the PDB variants of this are implemented, or am I using them in the wrong way? If I am using them wrong, would someone be kind enough to explain how they should be used?

Sincerely, C. Jason B.

C. Jason. B.
2015-08-27 14:40:58 UTC (about 9 years ago)

PDB Procedures for External Progress Bars

On Thu, 27 Aug 2015 11:02:09 -0300 "Joao S. O. Bueno" wrote:

It should allow for the callback - and the behavior you describe is a bug in the gimp=python.

As for any calls that require "-1" as a parameter for "nothing" or "cancel" , they should take in
a Python's "None" when used from Python.

On 27 August 2015 at 09:59, C. Jason. B. wrote:

List,

I am tasked with creating (python using GTK) a plugin which will utilize a great many other scripts and plugins within GIMP. The file which is being written runs in full screen mode most of the time so the progress bars in The GIMP are obscured, which leads to the use of an external progress bar. But a snag has been encountered. While trying to register a temporary function from within python, it balks at the number of parameters, and the parameter it is refusing is the callback function. A perusal of the source code lead me to gimpmodule.c in the pygimp directory (line 642).

I am not a c programmer, so I am attempting to translate this via my knowledge of Python.

It looks, at first glance, as if this function does not allow for a callback function to be passed in. If so, how would one register a temporary function from python?

On an additional note, the PDB function gimp_progress_init indicates that a '-1' is passed to instruct it to use an external window for a progress bar, but it chokes on that value with an error (either as a string or an int).

I have found the functions which (in Python) are accessed via gimp.progress_install, so I know that these can be used instead. What I am trying to find out is if the PDB variants of this are implemented, or am I using them in the wrong way? If I am using them wrong, would someone be kind enough to explain how they should be used?

Sincerely,
C. Jason B.
_______________________________________________ gimp-developer-list mailing list
List address: gimp-developer-list@gnome.org List membership:
https://mail.gnome.org/mailman/listinfo/gimp-developer-list List archives: https://mail.gnome.org/archives/gimp-developer-list