Changeset 7940 for branches/gajim_0.11/src/notify.py
- Timestamp:
- 02/06/07 20:54:30 (22 months ago)
- Files:
-
- 1 modified
-
branches/gajim_0.11/src/notify.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/gajim_0.11/src/notify.py
r7829 r7940 401 401 self.text = text 402 402 '''0.3.1 is the only version of notification daemon that has no way to determine which version it is. If no method exists, it means they're using that one.''' 403 self.default_version = '0.3.1'403 self.default_version = [0, 3, 1] 404 404 self.account = account 405 405 self.jid = jid … … 452 452 timeout = gajim.config.get('notification_timeout') # in seconds 453 453 ntype = self.ntype 454 if version .startswith('0.2'):454 if version[:2] == [0, 2]: 455 455 try: 456 456 self.notif.Notify( … … 470 470 error_handler=self.notify_another_way) 471 471 except AttributeError: 472 version = '0.3.1'# we're actually dealing with the newer version473 if version .startswith('0.3'):474 if version >= ( 0, 3, 2):472 version = [0, 3, 1] # we're actually dealing with the newer version 473 if version > [0, 3]: 474 if version >= [0, 3, 2]: 475 475 hints = {} 476 476 hints['urgency'] = dbus.Byte(0) # Low Urgency … … 519 519 520 520 def version_reply_handler(self, name, vendor, version, spec_version = None): 521 self.version = version 521 version_list = version.split('.') 522 self.version = [] 523 while len(version_list): 524 self.version.append(int(version_list.pop(0))) 522 525 self.attempt_notify() 523 526
