improve comments

This commit is contained in:
Nikos Kouremenos 2006-09-24 19:27:52 +00:00
parent 70a28b4724
commit 4062d3d3a8
2 changed files with 4 additions and 4 deletions

View File

@ -24,9 +24,8 @@ from common import exceptions
try: try:
import dbus import dbus
import dbus.service import dbus.service
# cause dbus 0.35+ doesn't return signal replies without it
import dbus.glib import dbus.glib
supported = True supported = True # does use have D-Bus bindings?
except ImportError: except ImportError:
supported = False supported = False
if not os.name == 'nt': # only say that to non Windows users if not os.name == 'nt': # only say that to non Windows users
@ -34,7 +33,7 @@ except ImportError:
print _('D-Bus capabilities of Gajim cannot be used') print _('D-Bus capabilities of Gajim cannot be used')
class SessionBus: class SessionBus:
'''A Singleton for the DBus SessionBus''' '''A Singleton for the D-Bus SessionBus'''
def __init__(self): def __init__(self):
self.session_bus = None self.session_bus = None

View File

@ -2392,7 +2392,8 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
'''if enabled is True, we listen to events from music players about '''if enabled is True, we listen to events from music players about
currently played music track, and we update our currently played music track, and we update our
status message accordinly''' status message accordinly'''
if not dbus_support.supported: # do nothing if we haven't D-Bus running if not dbus_support.supported:
# do nothing if user doesn't have D-Bus bindings
return return
if enabled: if enabled:
if self._music_track_changed_signal is None: if self._music_track_changed_signal is None: