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?
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.