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