~ubuntu-branches/ubuntu/oneiric/emesene/oneiric

« back to all changes in this revision

Viewing changes to emesenelib/core.py

  • Committer: Bazaar Package Importer
  • Author(s): Devid Antonio Filoni
  • Date: 2010-07-18 04:13:52 UTC
  • mfrom: (5.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100718041352-dsrfuyszjm7pnd3i
Tags: 1.6.3-1
* debian/control: add myself to Uploaders field.
* New upstream release.
* Add 21_svn2451_fix_avatar patch to fix avatars storage.
* Bump Standards-Version to 3.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
            (gobject.TYPE_STRING,gobject.TYPE_STRING)),
116
116
        'self-current-media-changed' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE,
117
117
            (gobject.TYPE_STRING,gobject.TYPE_STRING,gobject.TYPE_PYOBJECT)),
 
118
        # the filename of the new avatar and a boolean indication if it's changed
 
119
        # after retrieving it from Msn's server (True) or set by the user (False)
118
120
        'self-dp-changed' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE,
119
 
            (gobject.TYPE_STRING,)),
 
121
            (gobject.TYPE_STRING,gobject.TYPE_BOOLEAN)),
120
122
 
121
123
        'new-conversation' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE,
122
124
            (gobject.TYPE_STRING,gobject.TYPE_PYOBJECT)),
271
273
        self._allowedRedirects = 5
272
274
        self._onLogin = False
273
275
        self.canUseP4 = canUseP4
274
 
    
275
276
    # login() calls _redirect(), which calls loginInputHandler on socket input,
276
277
    # which calls loginProcess
277
278
 
486
487
 
487
488
        # change the nickname
488
489
        self.changeNick(self.nick, initial=True)
 
490
        gobject.timeout_add(10000, self.enable_notifications)
489
491
        soap.requests.get_profile(self.proxy, self.cid, self.onGetProfile)
490
492
 
 
493
    # a delay in case the UUX command doesn't enable notifications
 
494
    # see "processCommand()" method
 
495
    def enable_notifications(self):
 
496
        if not self.canNotify:
 
497
            self.emit('enable-notifications')
 
498
            self.canNotify = True
 
499
        return False
 
500
 
491
501
    def passportReAuth(self, hash=None):
492
502
        if hash == None:
493
503
            hash = self.hash
763
773
            # have something to do with this, but this seems safer
764
774
            self.accountConfirmed = False
765
775
            self.emit('account-unconfirmed')
766
 
        elif command == "PRP" and self.profile_retrieved and not self.canNotify:
767
 
            self.emit('enable-notifications')
768
 
            self.canNotify = True
 
776
        elif command == "UUX" and params == "0" and self.profile_retrieved:
 
777
            self.enable_notifications()
769
778
 
770
779
    def parseUBX(self, command, tid, params, payload):
771
780
        '''this function parses the UBX payload, and sets the personal