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

def roster_window::RosterWindow::on_req_usub (   self,

Remove a contact

Definition at line 1792 of file roster_window.py.

01792                                                      :
            '''Remove a contact'''
            def on_ok(widget, contact, account):
                  remove_auth = True
                  if contact.sub != 'to' and self.dialog.is_checked():
                        remove_auth = False
                  gajim.connections[account].unsubscribe(contact.jid, remove_auth)
                  for c in gajim.contacts.get_contact(account, contact.jid):
                        self.remove_contact(c, account)
                  gajim.contacts.remove_jid(account, c.jid)
                  if not remove_auth and contact.sub == 'both':
                        contact.name = ''
                        contact.groups = []
                        contact.sub = 'from'
                        gajim.contacts.add_contact(account, contact)
                        self.add_contact_to_roster(contact.jid, account)
                  elif gajim.interface.msg_win_mgr.has_window(contact.jid, account) or \
                        c = gajim.contacts.create_contact(jid = contact.jid,
                              name = '', groups = [_('Not in Roster')],
                              show = 'not in roster', status = '', ask = 'none',
                              keyID = contact.keyID)
                        gajim.contacts.add_contact(account, c)
                        self.add_contact_to_roster(contact.jid, account)
            pritext = _('Contact "%s" will be removed from your roster') % \
            if contact.sub == 'to':
                  self.dialog = dialogs.ConfirmationDialog(pritext,
                        _('By removing this contact you also remove authorization resulting in him or her always seeing you as offline.'),
                        on_response_ok = (on_ok, contact, account))
                  self.dialog = dialogs.ConfirmationDialogCheck(pritext,
                        _('By removing this contact you also by default remove authorization resulting in him or her always seeing you as offline.'),
                        _('I want this contact to know my status after removal'),
                        on_response_ok = (on_ok, contact, account))

      def forget_gpg_passphrase(self, keyid):

Generated by  Doxygen 1.6.0   Back to index