Show
Ignore:
Timestamp:
02/06/07 20:54:30 (22 months ago)
Author:
asterix
Message:

merge diff from trunk

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/gajim_0.11/src/notify.py

    r7829 r7940  
    401401                self.text = text 
    402402                '''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] 
    404404                self.account = account 
    405405                self.jid = jid 
     
    452452                timeout = gajim.config.get('notification_timeout') # in seconds 
    453453                ntype = self.ntype 
    454                 if version.startswith('0.2'): 
     454                if version[:2] == [0, 2]: 
    455455                        try: 
    456456                                self.notif.Notify( 
     
    470470                                        error_handler=self.notify_another_way) 
    471471                        except AttributeError: 
    472                                 version = '0.3.1' # we're actually dealing with the newer version 
    473                 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]: 
    475475                                hints = {} 
    476476                                hints['urgency'] = dbus.Byte(0) # Low Urgency 
     
    519519 
    520520        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))) 
    522525                self.attempt_notify() 
    523526