Logo Search packages:      
Sourcecode: mago version File versions  Download package

def mago::application::pidgin::pidgin::Pidgin::account_connected (   self,
  account_info 
)

Checks to see if a specified account is connected,
@param account_info: The account information.
@type account_info: L{AccountInfo}

@return True, if the account if connected, False if not.

Definition at line 194 of file pidgin.py.

00194                                              :
        '''
        Checks to see if a specified account is connected,
        @param account_info: The account information.
        @type account_info: L{AccountInfo}

        @return True, if the account if connected, False if not.
        '''
        ldtp.remap(self.WINDOW)
        window = ooldtp.context(self.WINDOW)
        objs = window.getobjectlist()
        # It parses the account's submenu, if there is a menu 
        # item "no actions available", then the account is not yet connected.
        for obj in objs:
            if obj.startswith('mnuNoactionsavailable'):
                parent = ldtp.getobjectproperty(self.WINDOW,obj, 'parent')
                # TODO, put in resource and protocol for more accuracy.
                if parent.startswith(
                    'mnu%s' % account_info.username_and_domain) and \
                    parent.endswith('(%s)' % account_info.protocol):
                    return False
        return True

    def buddy_available(self, alias):


Generated by  Doxygen 1.6.0   Back to index