correct some typos
This commit is contained in:
parent
e8911a661e
commit
0c2fb7ffe3
|
@ -228,9 +228,9 @@ class Config:
|
|||
return 0
|
||||
|
||||
def get_per(self, optname, key = None, subname = None):
|
||||
if not self.__options_per_key.has_key(typename):
|
||||
if not self.__options_per_key.has_key(optname):
|
||||
return None
|
||||
dict = self.__options_per_key[typename][1]
|
||||
dict = self.__options_per_key[optname][1]
|
||||
if not key:
|
||||
return dict.keys()
|
||||
if not dict.has_key(key):
|
||||
|
|
|
@ -23,7 +23,8 @@ import time
|
|||
|
||||
import common.jabber
|
||||
|
||||
from Core import GnuPG
|
||||
from common import gajim
|
||||
from common import GnuPG
|
||||
USE_GPG = GnuPG.USE_GPG
|
||||
|
||||
from common import i18n
|
||||
|
@ -219,7 +220,7 @@ class connection:
|
|||
jid = prs.getFrom()
|
||||
self.dispatch('SUBSCRIBED', (jid.getStripped(), jid.getResource()))
|
||||
self.dispatch('UPDUSER', (jid.getStripped(), jid.getNode(), \
|
||||
['General'])))
|
||||
['General']))
|
||||
#BE CAREFUL : no con.updateRosterItem() in a callback
|
||||
gajim.log.debug('we are now subscribed to %s' % who)
|
||||
elif ptype == 'unsubscribe':
|
||||
|
@ -374,9 +375,9 @@ class connection:
|
|||
|
||||
#create connexion if it doesn't already existe
|
||||
if not self.connection:
|
||||
if gajim.config.get_per('accounts', self.name, 'use_proxy')
|
||||
if gajim.config.get_per('accounts', self.name, 'use_proxy'):
|
||||
proxy = {'host': gajim.config.get_per('accounts', self.name, \
|
||||
'proxyhost')
|
||||
'proxyhost')}
|
||||
proxy['port'] = gajim.config.get_per('accounts', self.name, \
|
||||
'proxyport')
|
||||
else:
|
||||
|
@ -503,8 +504,8 @@ class connection:
|
|||
self.connection.sendPresence(ptype, prio, status, msg, signed)
|
||||
self.dispatch('STATUS', status)
|
||||
|
||||
def send_message(jid, msg, keyID)
|
||||
if inot self.connection:
|
||||
def send_message(jid, msg, keyID):
|
||||
if not self.connection:
|
||||
return
|
||||
msgtxt = msg
|
||||
msgenc = ''
|
||||
|
@ -518,7 +519,7 @@ class connection:
|
|||
self.connection.send(msg_iq)
|
||||
self.dispatch('MSGSENT', (jid, msg, keyID))
|
||||
|
||||
def request_subscription(self, jid, msg)
|
||||
def request_subscription(self, jid, msg):
|
||||
if not self.connection:
|
||||
return
|
||||
gajim.log.debug('subscription request for %s' % jid)
|
||||
|
@ -528,12 +529,12 @@ class connection:
|
|||
pres.setStatus(msg)
|
||||
self.connection.send(pres)
|
||||
|
||||
def send_authorization(self, jid)
|
||||
def send_authorization(self, jid):
|
||||
if not self.connection:
|
||||
return
|
||||
self.connection.send(common.jabber.Presence(jid, 'subscribed'))
|
||||
|
||||
def refuse_authorization(self, jid)
|
||||
def refuse_authorization(self, jid):
|
||||
if not self.connection:
|
||||
return
|
||||
self.connection.send(common.jabber.Presence(jid, 'unsubscribed'))
|
||||
|
|
|
@ -22,6 +22,7 @@ import gtk.glade
|
|||
import gobject
|
||||
import os
|
||||
import common.sleepy
|
||||
from common import connection
|
||||
from common import i18n
|
||||
_ = i18n._
|
||||
APP = i18n.APP
|
||||
|
@ -1121,6 +1122,7 @@ class Account_modification_window:
|
|||
if name in gajim.connections:
|
||||
Error_dialog(_('An account already has this name'))
|
||||
return
|
||||
gajim.connections[name] = connection.connection(name)
|
||||
#if we neeed to register a new account
|
||||
if new_account_checkbutton.get_active():
|
||||
self.plugin.send('NEW_ACC', None, (hostname, login, password, name, \
|
||||
|
@ -1149,7 +1151,7 @@ class Account_modification_window:
|
|||
#update variables
|
||||
self.plugin.windows[name] = {'infos': {}, 'chats': {}, 'gc': {}}
|
||||
self.plugin.queues[name] = {}
|
||||
gajim.config.connections[name].connected = 0
|
||||
gajim.connections[name].connected = 0
|
||||
self.plugin.roster.groups[name] = {}
|
||||
self.plugin.roster.contacts[name] = {}
|
||||
self.plugin.roster.newly_added[name] = []
|
||||
|
|
|
@ -964,7 +964,7 @@ class Roster_window:
|
|||
if message == -1:
|
||||
message = ''
|
||||
for acct in accounts:
|
||||
if gajim.connections[acct].connected:
|
||||
if gajim.connections[acct].connected:
|
||||
self.send_status(acct, 'offline', message)
|
||||
self.quit_gtkgui_plugin()
|
||||
return True # do NOT destory the window
|
||||
|
|
Loading…
Reference in New Issue