Bug 8611 - python-hildondesktop lacks get_dbus_connection()/get_dbus_g_connection() methods
: python-hildondesktop lacks get_dbus_connection()/get_dbus_g_connection() methods
Status: NEW
Product: PyMaemo
General
: unspecified
: All Maemo
: Medium normal with 1 vote (vote)
: ---
Assigned To: Anderson Lizardo
: general
: https://garage.maemo.org/pipermail/py...
:
:
:
  Show dependency tree
 
Reported: 2010-01-28 16:32 UTC by Anderson Lizardo
Modified: 2010-08-12 16:10 UTC (History)
1 user (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Anderson Lizardo (reporter) 2010-01-28 16:32:27 UTC
Currently these two methods are not supported due to this error:

Could not write method HDStatusPluginItem.get_dbus_connection: No ArgType for
DBusBusType
Could not write method HDStatusPluginItem.get_dbus_g_connection: No ArgType for
DBusBusType

This happens because DBusBusType is not a native Glib type. It comes from the
dbus library. This probably affects widgets that need to interact with dbus
signals (see attached URL).

This is usually fixed by implementing overrides for the two methods, and
creating wrappers for the type. The Python wrapper must be compatible with
python-dbus. python-dbus has a C API that could be useful:

/usr/include/dbus-1.0/dbus/dbus-python.h
Comment 1 Stefanos Harhalakis 2010-08-12 16:10:23 UTC
The problem can be worked-around by using:

dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
self.bus = dbus.bus.BusConnection("unix:path=/var/run/dbus/system_bus_socket")

instead of:

self.bus=dbus.SystemBus()

The above came from this post:
https://garage.maemo.org/pipermail/pymaemo-developers/2010-April/001452.html

Also see here:
https://garage.maemo.org/pipermail/pymaemo-developers/2010-April/thread.html