~cairo-dock-team/cairo-dock-plug-ins/3.0.x

« back to all changes in this revision

Viewing changes to Dbus/interfaces/python/CDApplet.py.in

  • Committer: Matthieu Baerts
  • Author(s): Eduardo Mucelli R. Oliveira
  • Date: 2012-03-06 13:45:46 UTC
  • mfrom: (2312.1.1 cairo-dock-plug-ins)
  • Revision ID: matttbe@gmail.com-20120306134546-xuz9k3hpthi0na8g
Enabling threads on the Python Interface. The Twitter applet is going to need to use threads to act as a consumer of the Twitter Stream API. Well, hopefully future applets also are going to utilize it too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
import dbus
31
31
from dbus.mainloop.glib import DBusGMainLoop
32
32
 
 
33
gobject.threads_init()                                    # Enabling threading
 
34
dbus.mainloop.glib.threads_init()
 
35
 
33
36
DBusGMainLoop(set_as_default=True)
34
37
 
35
38
INSTALL_PREFIX = os.path.abspath("..")  # applets are launched from their install directory, so ".." is the folder containing all applets.