[gDesklets] events in controls


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 changes (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()

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)



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