Author: asterix Date: 2007-06-30 00:25:50 +0200 (Sat, 30 Jun 2007) New Revision: 8346
Modified: trunk/src/roster_window.py Log: don't try to do Awn code if it's not available
Modified: trunk/src/roster_window.py =================================================================== --- trunk/src/roster_window.py 2007-06-29 21:21:08 UTC (rev 8345) +++ trunk/src/roster_window.py 2007-06-29 22:25:50 UTC (rev 8346) @@ -3538,6 +3538,13 @@ if not dbus_support.supported: # do nothing if user doesn't have D-Bus bindings return + bus = dbus.SessionBus() + try: + if not 'com.google.code.Awn' in bus.list_names(): + # Awn is not installed + return + except: + pass iconset = gajim.config.get('iconset') prefix = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '32x32') if status in ('chat', 'away', 'xa', 'dnd', 'invisible', 'offline'): @@ -3547,7 +3554,6 @@ status = 'gajim.png' path = os.path.join(prefix, status) try: - bus = dbus.SessionBus() obj = bus.get_object('com.google.code.Awn', '/com/google/code/Awn') awn = dbus.Interface(obj, 'com.google.code.Awn') awn.SetTaskIconByName('Gajim', os.path.abspath(path))