bigboard r7326 - trunk/bigboard/stocks/people



Author: marco
Date: Mon May  5 15:28:06 2008
New Revision: 7326
URL: http://svn.gnome.org/viewvc/bigboard?rev=7326&view=rev

Log:
Call Configure() on IMClient, if it fails launch pidgin

Modified:
   trunk/bigboard/stocks/people/PeopleStock.py

Modified: trunk/bigboard/stocks/people/PeopleStock.py
==============================================================================
--- trunk/bigboard/stocks/people/PeopleStock.py	(original)
+++ trunk/bigboard/stocks/people/PeopleStock.py	Mon May  5 15:28:06 2008
@@ -4,6 +4,7 @@
 import gtk
 import hippo
 import gnomevfs
+import dbus
 
 from pyonlinedesktop.fsutil import VfsMonitor
 
@@ -68,7 +69,14 @@
                                      not os.path.exists(self.__accounts_config))
 
     def __on_accounts_link_activated(self, link):
-        os.spawnlp(os.P_NOWAIT, 'pidgin', 'pidgin')
+        bus = dbus.SessionBus()
+
+        try:
+            obj = bus.get_object('im.pidgin.purple.PurpleService', '/org/freedesktop/od/im')
+            im = dbus.Interface(obj, 'org.freedesktop.od.IMClient')
+            im.Configure()
+        except dbus.DBusException:
+            os.spawnlp(os.P_NOWAIT, 'pidgin', 'pidgin')
 
     def get_authed_content(self, size):
         return self.__box



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