summaryrefslogtreecommitdiffstats
path: root/python/examples
diff options
context:
space:
mode:
Diffstat (limited to 'python/examples')
-rw-r--r--python/examples/example-service.py6
-rw-r--r--python/examples/gconf-proxy-service.py5
-rw-r--r--python/examples/gconf-proxy-service2.py5
3 files changed, 9 insertions, 7 deletions
diff --git a/python/examples/example-service.py b/python/examples/example-service.py
index ce871a1f..cb25d203 100644
--- a/python/examples/example-service.py
+++ b/python/examples/example-service.py
@@ -3,8 +3,7 @@
import dbus
import dbus.service
import dbus.glib
-import pygtk
-import gtk
+import gobject
class SomeObject(dbus.service.Object):
def __init__(self, bus_name, object_path="/SomeObject"):
@@ -27,4 +26,5 @@ session_bus = dbus.SessionBus()
name = dbus.service.BusName("org.designfu.SampleService", bus=session_bus)
object = SomeObject(name)
-gtk.main()
+mainloop = gobject.MainLoop()
+mainloop.run()
diff --git a/python/examples/gconf-proxy-service.py b/python/examples/gconf-proxy-service.py
index b9bdef14..a899cf21 100644
--- a/python/examples/gconf-proxy-service.py
+++ b/python/examples/gconf-proxy-service.py
@@ -2,7 +2,7 @@
#FIXME: Doesn't work with the new bindings
import dbus
-import gtk
+import gobject
import gconf
class GConfService(dbus.Service):
@@ -39,4 +39,5 @@ gconf_service = GConfService()
print ("GConf Proxy service started.")
print ("Run 'gconf-proxy-client.py' to fetch a GConf key through the proxy...")
-gtk.main()
+mainloop = gobject.MainLoop()
+mainloop.run()
diff --git a/python/examples/gconf-proxy-service2.py b/python/examples/gconf-proxy-service2.py
index ba8d249b..5731ab28 100644
--- a/python/examples/gconf-proxy-service2.py
+++ b/python/examples/gconf-proxy-service2.py
@@ -2,7 +2,7 @@
#FIXME: doesn't work with the new bindings
import dbus
-import gtk
+import gobject
import gconf
class GConfService(dbus.Service):
@@ -35,4 +35,5 @@ gconf_service = GConfService()
print ("GConf Proxy service started.")
print ("Run 'gconf-proxy-client.py' to fetch a GConf key through the proxy...")
-gtk.main()
+mainloop = gobject.MainLoop()
+mainloop.run()