2

Using python and the gi.repository module, I am trying to call Gdk.threads_add_idle, but I get the error message that three arguments are required. The documentation, however, only mentions two args.

You can try the function (on a linux only, i guess) by typing the following in a python interpreter:

from gi.repository import Gdk

Gdk.threads_add_idle(...)

Any ideas what the three args are?

Pouria
  • 159
  • 12

1 Answers1

3

By looking on a source code search engine, I was able to find a python project using that call.

Gdk.threads_add_idle(GLib.PRIORITY_DEFAULT_IDLE, self._idle_call, data)

It looks like introspection data is wrong, the priority should already default to PRIORITY_DEFAULT_IDLE (as specified in the the documentation you pointed out). You should file a bug on http://bugzilla.gnome.org.

UPDATE:

Pouria's bug report has been resolved NOTABUG, as this is a naming confusion between the C and Python API.

liberforce
  • 11,189
  • 37
  • 48
  • Thanks, I'll give this a try in my project, when I have the time, and will file a bug as well if necessary. – Pouria Jan 19 '13 at 21:57
  • This works, thanks again. I also filed a [bug](https://bugzilla.gnome.org/show_bug.cgi?id=692280). – Pouria Jan 22 '13 at 12:57