[gDesklets] events in controls



Hi!

I'm developing a desklets to monitor my laptop battery. So I started with writing an control to provide the information to the desklet. I'm asking the info from HAL via dbus. To let HAL notify me of changed (i.e. an connected power cable) i would normally start a loop with:

        self.__ac_obj.connect_to_signal ("PropertyModified", self.__property_modified)
        self.__batt_obj.connect_to_signal ("PropertyModified", self.__property_modified)

        self.__loop = gobject.MainLoop()
        self.__loop.run()

But this seems to mess up gdesklets: I can only get it working again with killing python and start gdesklets again.

Is there a way to get this working and/or am I doing things totally wrong? (these are  my first experiences with python)

Regards,

Johan


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