merge
This commit is contained in:
commit
453fd46427
|
@ -1,50 +1,52 @@
|
||||||
# coding=utf-8
|
# coding=utf-8
|
||||||
emoticons = {
|
from collections import OrderedDict
|
||||||
'smile.png': [':-)', ':)'],
|
|
||||||
'coolglasses.png': ['B-)', '(H)'],
|
emoticons = OrderedDict((
|
||||||
'wink.gif': [';-)', ';)'],
|
('smile.png', [':-)', ':)']),
|
||||||
'biggrin.png': [':-D', ':D'],
|
('coolglasses.png', ['B-)', '(H)']),
|
||||||
'unhappy.png': [':-(', ':('],
|
('wink.gif', [';-)', ';)']),
|
||||||
'cry.gif': [":'-(", ":'(", ';-(', ';(', ";'-("],
|
('biggrin.png', [':-D', ':D']),
|
||||||
'frowning.png': [':-/', ':/', ':-\\', ':\\', ':-S', ':S'],
|
('unhappy.png', [':-(', ':(']),
|
||||||
'blush.png': [':-$', ':$'],
|
('cry.gif', [":'-(", ":'(", ';-(', ';(', ";'-("]),
|
||||||
'angry.png': [':-@', ':@'],
|
('frowning.png', [':-/', ':/', ':-\\', ':\\', ':-S', ':S']),
|
||||||
'bat.gif': [':-[', ':['],
|
('blush.png', [':-$', ':$']),
|
||||||
'kiss.png': [':-{}', ':-*', ':*', '(K)'],
|
('angry.png', [':-@', ':@']),
|
||||||
'stare.png': [':-|', ':|'],
|
('bat.gif', [':-[', ':[']),
|
||||||
'devil.png': [']:->', '>:-)', '>:)', '(6)'],
|
('kiss.png', [':-{}', ':-*', ':*', '(K)']),
|
||||||
'tongue.png': [':-P', ':P', ':-þ', ':þ'],
|
('stare.png', [':-|', ':|']),
|
||||||
'oh.png': ['=-O', ':-O', ':O'],
|
('devil.png', [']:->', '>:-)', '>:)', '(6)']),
|
||||||
'heart.png': ['<3', '(L)', '*IN LOVE*'],
|
('tongue.png', [':-P', ':P', ':-þ', ':þ']),
|
||||||
'pussy.png': ['(@)'],
|
('oh.png', ['=-O', ':-O', ':O']),
|
||||||
'cuffs.png': ['(%)'],
|
('heart.png', ['<3', '(L)', '*IN LOVE*']),
|
||||||
'moon.png': ['(S)'],
|
('pussy.png', ['(@)']),
|
||||||
'lamp.png': ['(I)'],
|
('cuffs.png', ['(%)']),
|
||||||
'music.png': ['(8)'],
|
('moon.png', ['(S)']),
|
||||||
'beer.png': ['(B)', '*DRINK*'],
|
('lamp.png', ['(I)']),
|
||||||
'brflower.png': ['(W)'],
|
('music.png', ['(8)']),
|
||||||
'boy.png': ['(Z)'],
|
('beer.png', ['(B)', '*DRINK*']),
|
||||||
'girl.png': ['(X)'],
|
('brflower.png', ['(W)']),
|
||||||
'mail.png': ['(E)'],
|
('boy.png', ['(Z)']),
|
||||||
'thumbdown.png': ['(N)'],
|
('girl.png', ['(X)']),
|
||||||
'photo.png': ['(P)'],
|
('mail.png', ['(E)']),
|
||||||
'thumbup.png': ['(Y)', '*THUMBS UP*'],
|
('thumbdown.png', ['(N)']),
|
||||||
'hugleft.png': ['(})'],
|
('photo.png', ['(P)']),
|
||||||
'brheart.png': ['</3', '(U)'],
|
('thumbup.png', ['(Y)', '*THUMBS UP*']),
|
||||||
'flower.png': ['@}->--', '(F)'],
|
('hugleft.png', ['(})']),
|
||||||
'drink.png': ['(D)'],
|
('brheart.png', ['</3', '(U)']),
|
||||||
'phone.png': ['(T)'],
|
('flower.png', ['@}->--', '(F)']),
|
||||||
'coffee.png': ['(C)'],
|
('drink.png', ['(D)']),
|
||||||
'hugright.png': ['({)'],
|
('phone.png', ['(T)']),
|
||||||
'star.png': ['(*)'],
|
('coffee.png', ['(C)']),
|
||||||
'rainbow.png': ['(R)'],
|
('hugright.png', ['({)']),
|
||||||
'cigarette.gif': ['(ci)'],
|
('star.png', ['(*)']),
|
||||||
'cake.gif': ['(^)'],
|
('rainbow.png', ['(R)']),
|
||||||
'dontknow.gif': [':^)'],
|
('cigarette.gif', ['(ci)']),
|
||||||
'eyeroll.gif': ['8-)'],
|
('cake.gif', ['(^)']),
|
||||||
'lightning.gif': ['(li)'],
|
('dontknow.gif', [':^)']),
|
||||||
'party.gif': ['<:o)'],
|
('eyeroll.gif', ['8-)']),
|
||||||
'sleepy.gif': ['|-)'],
|
('lightning.gif', ['(li)']),
|
||||||
'think.gif': ['*-)'],
|
('party.gif', ['<:o)']),
|
||||||
'puke.gif': [':-!'],
|
('sleepy.gif', ['|-)']),
|
||||||
}
|
('think.gif', ['*-)']),
|
||||||
|
('puke.gif', [':-!']),
|
||||||
|
))
|
||||||
|
|
|
@ -1,43 +1,45 @@
|
||||||
# coding=utf-8
|
# coding=utf-8
|
||||||
emoticons = {
|
from collections import OrderedDict
|
||||||
'smile.png': [':-)', ':)'],
|
|
||||||
'coolglasses.png': ['8-)', 'B-)', '(H)'],
|
emoticons = OrderedDict((
|
||||||
'wink.png': [';-)', ';)'],
|
('smile.png', [':-)', ':)']),
|
||||||
'biggrin.png': [':-D', ':D'],
|
('coolglasses.png', ['8-)', 'B-)', '(H)']),
|
||||||
'unhappy.png': [':-(', ':('],
|
('wink.png', [';-)', ';)']),
|
||||||
'cry.png': [":'-(", ":'(", ';-(', ';(', ";'-("],
|
('biggrin.png', [':-D', ':D']),
|
||||||
'frowning.png': [':-/', ':/', ':-\\', ':\\', ':-S', ':S'],
|
('unhappy.png', [':-(', ':(']),
|
||||||
'blush.png': [':-$', ':$'],
|
('cry.png', [":'-(", ":'(", ';-(', ';(', ";'-("]),
|
||||||
'angry.png': [':-@', ':@'],
|
('frowning.png', [':-/', ':/', ':-\\', ':\\', ':-S', ':S']),
|
||||||
'bat.png': [':-[', ':['],
|
('blush.png', [':-$', ':$']),
|
||||||
'kiss.png': [':-{}', ':-*', ':*', '(K)'],
|
('angry.png', [':-@', ':@']),
|
||||||
'stare.png': [':-|', ':|'],
|
('bat.png', [':-[', ':[']),
|
||||||
'devil.png': [']:->', '>:-)', '>:)', '(6)'],
|
('kiss.png', [':-{}', ':-*', ':*', '(K)']),
|
||||||
'tongue.png': [':-P', ':P', ':-þ', ':þ'],
|
('stare.png', [':-|', ':|']),
|
||||||
'oh.png': ['=-O', ':-O', ':O'],
|
('devil.png', [']:->', '>:-)', '>:)', '(6)']),
|
||||||
'heart.png': ['<3', '(L)', '*IN LOVE*'],
|
('tongue.png', [':-P', ':P', ':-þ', ':þ']),
|
||||||
'lion.png': [':3', '>:3'],
|
('oh.png', ['=-O', ':-O', ':O']),
|
||||||
'pussy.png': ['(@)', '=^.^='],
|
('heart.png', ['<3', '(L)', '*IN LOVE*']),
|
||||||
'cuffs.png': ['(%)'],
|
('lion.png', [':3', '>:3']),
|
||||||
'moon.png': ['(S)'],
|
('pussy.png', ['(@)', '=^.^=']),
|
||||||
'lamp.png': ['(I)'],
|
('cuffs.png', ['(%)']),
|
||||||
'music.png': ['(8)'],
|
('moon.png', ['(S)']),
|
||||||
'beer.png': ['(B)', '*DRINK*'],
|
('lamp.png', ['(I)']),
|
||||||
'brflower.png': ['(W)'],
|
('music.png', ['(8)']),
|
||||||
'boy.png': ['(Z)'],
|
('beer.png', ['(B)', '*DRINK*']),
|
||||||
'girl.png': ['(X)'],
|
('brflower.png', ['(W)']),
|
||||||
'mail.png': ['(E)'],
|
('boy.png', ['(Z)']),
|
||||||
'thumbdown.png': ['(N)'],
|
('girl.png', ['(X)']),
|
||||||
'photo.png': ['(P)'],
|
('mail.png', ['(E)']),
|
||||||
'thumbup.png': ['(Y)', '*THUMBS UP*'],
|
('thumbdown.png', ['(N)']),
|
||||||
'hugleft.png': ['(})'],
|
('photo.png', ['(P)']),
|
||||||
'brheart.png': ['</3', '(U)'],
|
('thumbup.png', ['(Y)', '*THUMBS UP*']),
|
||||||
'flower.png': ['@}->--', '(F)'],
|
('hugleft.png', ['(})']),
|
||||||
'drink.png': ['(D)'],
|
('brheart.png', ['</3', '(U)']),
|
||||||
'phone.png': ['(T)'],
|
('flower.png', ['@}->--', '(F)']),
|
||||||
'coffee.png': ['(C)'],
|
('drink.png', ['(D)']),
|
||||||
'hugright.png': ['({)'],
|
('phone.png', ['(T)']),
|
||||||
'star.png': ['(*)'],
|
('coffee.png', ['(C)']),
|
||||||
'rainbow.png': ['(R)'],
|
('hugright.png', ['({)']),
|
||||||
'puke.png': [':-!'],
|
('star.png', ['(*)']),
|
||||||
}
|
('rainbow.png', ['(R)']),
|
||||||
|
('puke.png', [':-!']),
|
||||||
|
))
|
||||||
|
|
|
@ -1,43 +1,45 @@
|
||||||
# coding=utf-8
|
# coding=utf-8
|
||||||
emoticons = {
|
from collections import OrderedDict
|
||||||
'smile.png': [':-)', ':)'],
|
|
||||||
'coolglasses.png': ['8-)', 'B-)', '(H)'],
|
emoticons = OrderedDict((
|
||||||
'wink.png': [';-)', ';)'],
|
('smile.png', [':-)', ':)']),
|
||||||
'biggrin.png': [':-D', ':D'],
|
('coolglasses.png', ['8-)', 'B-)', '(H)']),
|
||||||
'unhappy.png': [':-(', ':('],
|
('wink.png', [';-)', ';)']),
|
||||||
'cry.png': [":'-(", ":'(", ';-(', ';(', ";'-("],
|
('biggrin.png', [':-D', ':D']),
|
||||||
'frowning.png': [':-/', ':/', ':-\\', ':\\', ':-S', ':S'],
|
('unhappy.png', [':-(', ':(']),
|
||||||
'blush.png': [':-$', ':$'],
|
('cry.png', [":'-(", ":'(", ';-(', ';(', ";'-("]),
|
||||||
'angry.png': [':-@', ':@'],
|
('frowning.png', [':-/', ':/', ':-\\', ':\\', ':-S', ':S']),
|
||||||
'bat.png': [':-[', ':['],
|
('blush.png', [':-$', ':$']),
|
||||||
'kiss.png': [':-{}', ':-*', ':*', '(K)'],
|
('angry.png', [':-@', ':@']),
|
||||||
'stare.png': [':-|', ':|'],
|
('bat.png', [':-[', ':[']),
|
||||||
'devil.png': [']:->', '>:-)', '>:)', '(6)'],
|
('kiss.png', [':-{}', ':-*', ':*', '(K)']),
|
||||||
'tongue.png': [':-P', ':P', ':-þ', ':þ'],
|
('stare.png', [':-|', ':|']),
|
||||||
'oh.png': ['=-O', ':-O', ':O'],
|
('devil.png', [']:->', '>:-)', '>:)', '(6)']),
|
||||||
'heart.png': ['<3', '(L)', '*IN LOVE*'],
|
('tongue.png', [':-P', ':P', ':-þ', ':þ']),
|
||||||
'lion.png': [':3', '>:3'],
|
('oh.png', ['=-O', ':-O', ':O']),
|
||||||
'pussy.png': ['(@)', '=^.^='],
|
('heart.png', ['<3', '(L)', '*IN LOVE*']),
|
||||||
'cuffs.png': ['(%)'],
|
('lion.png', [':3', '>:3']),
|
||||||
'moon.png': ['(S)'],
|
('pussy.png', ['(@)', '=^.^=']),
|
||||||
'lamp.png': ['(I)'],
|
('cuffs.png', ['(%)']),
|
||||||
'music.png': ['(8)'],
|
('moon.png', ['(S)']),
|
||||||
'beer.png': ['(B)', '*DRINK*'],
|
('lamp.png', ['(I)']),
|
||||||
'brflower.png': ['(W)'],
|
('music.png', ['(8)']),
|
||||||
'boy.png': ['(Z)'],
|
('beer.png', ['(B)', '*DRINK*']),
|
||||||
'girl.png': ['(X)'],
|
('brflower.png', ['(W)']),
|
||||||
'mail.png': ['(E)'],
|
('boy.png', ['(Z)']),
|
||||||
'thumbdown.png': ['(N)'],
|
('girl.png', ['(X)']),
|
||||||
'photo.png': ['(P)'],
|
('mail.png', ['(E)']),
|
||||||
'thumbup.png': ['(Y)', '*THUMBS UP*'],
|
('thumbdown.png', ['(N)']),
|
||||||
'hugleft.png': ['(})'],
|
('photo.png', ['(P)']),
|
||||||
'brheart.png': ['</3', '(U)'],
|
('thumbup.png', ['(Y)', '*THUMBS UP*']),
|
||||||
'flower.png': ['@}->--', '(F)'],
|
('hugleft.png', ['(})']),
|
||||||
'drink.png': ['(D)'],
|
('brheart.png', ['</3', '(U)']),
|
||||||
'phone.png': ['(T)'],
|
('flower.png', ['@}->--', '(F)']),
|
||||||
'coffee.png': ['(C)'],
|
('drink.png', ['(D)']),
|
||||||
'hugright.png': ['({)'],
|
('phone.png', ['(T)']),
|
||||||
'star.png': ['(*)'],
|
('coffee.png', ['(C)']),
|
||||||
'rainbow.png': ['(R)'],
|
('hugright.png', ['({)']),
|
||||||
'puke.png': [':-!'],
|
('star.png', ['(*)']),
|
||||||
}
|
('rainbow.png', ['(R)']),
|
||||||
|
('puke.png', [':-!']),
|
||||||
|
))
|
||||||
|
|
|
@ -1,52 +1,54 @@
|
||||||
# coding=utf-8
|
# coding=utf-8
|
||||||
emoticons = {
|
from collections import OrderedDict
|
||||||
'angel.png': ['O:-)', 'o:-)', '0:-)'],
|
|
||||||
'curl-lip.png': [':-)', ':)', '=)'],
|
emoticons = OrderedDict((
|
||||||
'sarcastic.png': [';D', ';-D'],
|
('angel.png', ['O:-)', 'o:-)', '0:-)']),
|
||||||
'sad.png': [':-(', ':(', '=('],
|
('curl-lip.png', [':-)', ':)', '=)']),
|
||||||
'wink.png': [';-)', ';)'],
|
('sarcastic.png', [';D', ';-D']),
|
||||||
'tongue.png': [':-P', ':P', ':-p', ':p'],
|
('sad.png', [':-(', ':(', '=(']),
|
||||||
'glasses-cool': ['8-)', 'B-)', '(H)'],
|
('wink.png', [';-)', ';)']),
|
||||||
'laugh.png': [':-D', ':D'],
|
('tongue.png', [':-P', ':P', ':-p', ':p']),
|
||||||
'embarrassed.png': [':-[', ':['],
|
('glasses-cool', ['8-)', 'B-)', '(H)']),
|
||||||
'shout.png': ['=-O', ':-O', ':O'],
|
('laugh.png', [':-D', ':D']),
|
||||||
'kiss.png': [':-{}', ':-*', ':*', '(K)'],
|
('embarrassed.png', [':-[', ':[']),
|
||||||
'crying.png': [":'-(", ":'(", ';-(', ';(', ";'-("],
|
('shout.png', ['=-O', ':-O', ':O']),
|
||||||
'shut-mouth': [':-X'],
|
('kiss.png', [':-{}', ':-*', ':*', '(K)']),
|
||||||
'hypnotized.png': ['%)', '%-)'],
|
('crying.png', [":'-(", ":'(", ';-(', ';(', ";'-("]),
|
||||||
'freaked-out.png': [':o'],
|
('shut-mouth', [':-X']),
|
||||||
'thinking.png': [':-|', ':|'],
|
('hypnotized.png', ['%)', '%-)']),
|
||||||
'arrogant.png': [':-/', ':/', ':-\\', ':\\', ':-S', ':S'],
|
('freaked-out.png', [':o']),
|
||||||
'devil.png': [':->', ']:->', '>:-)', '>:)', '(6)'],
|
('thinking.png', [':-|', ':|']),
|
||||||
'musical-note.png': ['[:-}'],
|
('arrogant.png', [':-/', ':/', ':-\\', ':\\', ':-S', ':S']),
|
||||||
'sick.png': [':-!'],
|
('devil.png', [':->', ']:->', '>:-)', '>:)', '(6)']),
|
||||||
'giggle.png': ['*JOKINGLY*'],
|
('musical-note.png', ['[:-}']),
|
||||||
'cute.png': ['*KISSED*'],
|
('sick.png', [':-!']),
|
||||||
'sleepy.png': ['*TIRED*'],
|
('giggle.png', ['*JOKINGLY*']),
|
||||||
'terror.png': ['*STOP*'],
|
('cute.png', ['*KISSED*']),
|
||||||
'handshake.png': ['*KISSING*'],
|
('sleepy.png', ['*TIRED*']),
|
||||||
'rose.png': ['@}->--', '(F)'],
|
('terror.png', ['*STOP*']),
|
||||||
'good.png': ['(Y)', '*THUMBS UP*'],
|
('handshake.png', ['*KISSING*']),
|
||||||
'beer.png': ['(B)', '*DRINK*'],
|
('rose.png', ['@}->--', '(F)']),
|
||||||
'love.png': ['<3', '(L)', '*IN LOVE*'],
|
('good.png', ['(Y)', '*THUMBS UP*']),
|
||||||
'bomb.png': ['@='],
|
('beer.png', ['(B)', '*DRINK*']),
|
||||||
'question.png': ['*HELP*'],
|
('love.png', ['<3', '(L)', '*IN LOVE*']),
|
||||||
'cowboy.png': ['\m/'],
|
('bomb.png', ['@=']),
|
||||||
'fingers-crossed.png': ['*OK*'],
|
('question.png', ['*HELP*']),
|
||||||
'alien.png': ['*WASSUP*'],
|
('cowboy.png', ['\m/']),
|
||||||
'disapointed.png': ['*SORRY*'],
|
('fingers-crossed.png', ['*OK*']),
|
||||||
'clap.png': ['*BRAVO*'],
|
('alien.png', ['*WASSUP*']),
|
||||||
'rotfl.png': ['*ROFL*'],
|
('disapointed.png', ['*SORRY*']),
|
||||||
'dont-know.png': ['*PARDON*'],
|
('clap.png', ['*BRAVO*']),
|
||||||
'confused.png': ['*NO*'],
|
('rotfl.png', ['*ROFL*']),
|
||||||
'silly.png': ['*CRAZY*'],
|
('dont-know.png', ['*PARDON*']),
|
||||||
'doh.png': ['*DONT_KNOW*'],
|
('confused.png', ['*NO*']),
|
||||||
'party.png': ['*DANCE*'],
|
('silly.png', ['*CRAZY*']),
|
||||||
'dance.png': ['*YAHOO*'],
|
('doh.png', ['*DONT_KNOW*']),
|
||||||
'victory.png': ['*HI*'],
|
('party.png', ['*DANCE*']),
|
||||||
'go-away.png': ['*BYE*'],
|
('dance.png', ['*YAHOO*']),
|
||||||
'smirk.png': ['*YES*'],
|
('victory.png', ['*HI*']),
|
||||||
'pissed-off.png': ['*WALL*'],
|
('go-away.png', ['*BYE*']),
|
||||||
'mail.png': ['*WRITE*', '(E)'],
|
('smirk.png', ['*YES*']),
|
||||||
'tremble.png': ['*SCRATCH*'],
|
('pissed-off.png', ['*WALL*']),
|
||||||
}
|
('mail.png', ['*WRITE*', '(E)']),
|
||||||
|
('tremble.png', ['*SCRATCH*']),
|
||||||
|
))
|
||||||
|
|
|
@ -2755,7 +2755,7 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
msg_iq = nbxmpp.Message(obj.jid, obj.message, typ='groupchat',
|
msg_iq = nbxmpp.Message(obj.jid, obj.message, typ='groupchat',
|
||||||
xhtml=obj.xhtml)
|
xhtml=obj.xhtml)
|
||||||
if obj.label is not None:
|
if obj.label is not None:
|
||||||
msg_iq.addChild(node=label)
|
msg_iq.addChild(node=obj.label)
|
||||||
obj.msg_id = self.connection.send(msg_iq)
|
obj.msg_id = self.connection.send(msg_iq)
|
||||||
gajim.nec.push_incoming_event(MessageSentEvent(None, conn=self,
|
gajim.nec.push_incoming_event(MessageSentEvent(None, conn=self,
|
||||||
jid=obj.jid, message=obj.message, keyID=None, chatstate=None,
|
jid=obj.jid, message=obj.message, keyID=None, chatstate=None,
|
||||||
|
|
|
@ -741,8 +741,10 @@ class GPG(object):
|
||||||
si = STARTUPINFO()
|
si = STARTUPINFO()
|
||||||
si.dwFlags = STARTF_USESHOWWINDOW
|
si.dwFlags = STARTF_USESHOWWINDOW
|
||||||
si.wShowWindow = SW_HIDE
|
si.wShowWindow = SW_HIDE
|
||||||
|
env = os.environ
|
||||||
|
env['LANG'] = 'C'
|
||||||
return Popen(cmd, shell=False, stdin=PIPE, stdout=PIPE, stderr=PIPE,
|
return Popen(cmd, shell=False, stdin=PIPE, stdout=PIPE, stderr=PIPE,
|
||||||
startupinfo=si)
|
env=env, startupinfo=si)
|
||||||
|
|
||||||
def _read_response(self, stream, result):
|
def _read_response(self, stream, result):
|
||||||
# Internal method: reads all the stderr output from GPG, taking notice
|
# Internal method: reads all the stderr output from GPG, taking notice
|
||||||
|
|
|
@ -364,8 +364,8 @@ class ConnectionSocks5Bytestream(ConnectionBytestream):
|
||||||
from common.connection_handlers_events import FileRequestErrorEvent
|
from common.connection_handlers_events import FileRequestErrorEvent
|
||||||
gajim.nec.push_incoming_event(FileRequestErrorEvent(None, conn=self,
|
gajim.nec.push_incoming_event(FileRequestErrorEvent(None, conn=self,
|
||||||
jid=receiver, file_props=file_props, error_msg=''))
|
jid=receiver, file_props=file_props, error_msg=''))
|
||||||
self._connect_error(receiver, file_props.sid,
|
self._connect_error(file_props.sid, error='not-acceptable',
|
||||||
file_props.sid, code=406)
|
error_type='modify')
|
||||||
else:
|
else:
|
||||||
iq = nbxmpp.Iq(to=receiver, typ='set')
|
iq = nbxmpp.Iq(to=receiver, typ='set')
|
||||||
file_props.request_id = 'id_' + file_props.sid
|
file_props.request_id = 'id_' + file_props.sid
|
||||||
|
@ -557,7 +557,7 @@ class ConnectionSocks5Bytestream(ConnectionBytestream):
|
||||||
file_props.hash_ = hash_id
|
file_props.hash_ = hash_id
|
||||||
return
|
return
|
||||||
|
|
||||||
def _connect_error(self,sid, code=404):
|
def _connect_error(self, sid, error, error_type, msg=None):
|
||||||
"""
|
"""
|
||||||
Called when there is an error establishing BS connection, or when
|
Called when there is an error establishing BS connection, or when
|
||||||
connection is rejected
|
connection is rejected
|
||||||
|
@ -568,23 +568,17 @@ class ConnectionSocks5Bytestream(ConnectionBytestream):
|
||||||
if file_props is None:
|
if file_props is None:
|
||||||
log.error('can not send iq error on failed transfer')
|
log.error('can not send iq error on failed transfer')
|
||||||
return
|
return
|
||||||
msg_dict = {
|
|
||||||
404: 'Could not connect to given hosts',
|
|
||||||
405: 'Cancel',
|
|
||||||
406: 'Not acceptable',
|
|
||||||
}
|
|
||||||
msg = msg_dict[code]
|
|
||||||
if file_props.type_ == 's':
|
if file_props.type_ == 's':
|
||||||
to = file_props.receiver
|
to = file_props.receiver
|
||||||
else:
|
else:
|
||||||
to = file_props.sender
|
to = file_props.sender
|
||||||
iq = nbxmpp.Iq(to=to, typ='error')
|
iq = nbxmpp.Iq(to=to, typ='error')
|
||||||
iq.setAttr('id', file_props.sid)
|
iq.setAttr('id', file_props.request_id)
|
||||||
err = iq.setTag('error')
|
err = iq.setTag('error')
|
||||||
err.setAttr('code', str(code))
|
err.setAttr('type', error_type)
|
||||||
err.setData(msg)
|
err.setTag(error, namespace=nbxmpp.NS_STANZAS)
|
||||||
self.connection.send(iq)
|
self.connection.send(iq)
|
||||||
if code == 404:
|
if msg:
|
||||||
self.disconnect_transfer(file_props)
|
self.disconnect_transfer(file_props)
|
||||||
file_props.error = -3
|
file_props.error = -3
|
||||||
from common.connection_handlers_events import \
|
from common.connection_handlers_events import \
|
||||||
|
@ -667,9 +661,12 @@ class ConnectionSocks5Bytestream(ConnectionBytestream):
|
||||||
raise nbxmpp.NodeProcessed
|
raise nbxmpp.NodeProcessed
|
||||||
|
|
||||||
file_props.streamhosts = streamhosts
|
file_props.streamhosts = streamhosts
|
||||||
|
def _connection_error(sid):
|
||||||
|
self._connect_error(sid, 'item-not-found', 'cancel',
|
||||||
|
msg='Could not connect to given hosts')
|
||||||
if file_props.type_ == 'r':
|
if file_props.type_ == 'r':
|
||||||
gajim.socks5queue.connect_to_hosts(self.name, sid,
|
gajim.socks5queue.connect_to_hosts(self.name, sid,
|
||||||
self.send_success_connect_reply, self._connect_error)
|
self.send_success_connect_reply, _connection_error)
|
||||||
raise nbxmpp.NodeProcessed
|
raise nbxmpp.NodeProcessed
|
||||||
|
|
||||||
def _ResultCB(self, con, iq_obj):
|
def _ResultCB(self, con, iq_obj):
|
||||||
|
|
|
@ -153,19 +153,19 @@ class PreferencesWindow:
|
||||||
# user themes
|
# user themes
|
||||||
if os.path.isdir(gajim.MY_EMOTS_PATH):
|
if os.path.isdir(gajim.MY_EMOTS_PATH):
|
||||||
emoticons_list += os.listdir(gajim.MY_EMOTS_PATH)
|
emoticons_list += os.listdir(gajim.MY_EMOTS_PATH)
|
||||||
|
emoticons_list.sort()
|
||||||
renderer_text = Gtk.CellRendererText()
|
renderer_text = Gtk.CellRendererText()
|
||||||
emoticons_combobox.pack_start(renderer_text, True)
|
emoticons_combobox.pack_start(renderer_text, True)
|
||||||
emoticons_combobox.add_attribute(renderer_text, 'text', 0)
|
emoticons_combobox.add_attribute(renderer_text, 'text', 0)
|
||||||
model = Gtk.ListStore(str)
|
model = Gtk.ListStore(str)
|
||||||
emoticons_combobox.set_model(model)
|
emoticons_combobox.set_model(model)
|
||||||
l = []
|
l = [_('Disabled')]
|
||||||
for dir_ in emoticons_list:
|
for dir_ in emoticons_list:
|
||||||
if not os.path.isdir(os.path.join(gajim.DATA_DIR, 'emoticons', dir_)) \
|
if not os.path.isdir(os.path.join(gajim.DATA_DIR, 'emoticons', dir_)) \
|
||||||
and not os.path.isdir(os.path.join(gajim.MY_EMOTS_PATH, dir_)) :
|
and not os.path.isdir(os.path.join(gajim.MY_EMOTS_PATH, dir_)) :
|
||||||
continue
|
continue
|
||||||
if dir_ != '.svn':
|
if dir_ != '.svn':
|
||||||
l.append(dir_)
|
l.append(dir_)
|
||||||
l.append(_('Disabled'))
|
|
||||||
for i in range(len(l)):
|
for i in range(len(l)):
|
||||||
model.append([l[i]])
|
model.append([l[i]])
|
||||||
if gajim.config.get('emoticons_theme') == l[i]:
|
if gajim.config.get('emoticons_theme') == l[i]:
|
||||||
|
|
|
@ -74,6 +74,7 @@ class HistoryWindow:
|
||||||
scrolledwindow.add(self.history_textview.tv)
|
scrolledwindow.add(self.history_textview.tv)
|
||||||
self.history_buffer = self.history_textview.tv.get_buffer()
|
self.history_buffer = self.history_textview.tv.get_buffer()
|
||||||
self.history_buffer.create_tag('highlight', background = 'yellow')
|
self.history_buffer.create_tag('highlight', background = 'yellow')
|
||||||
|
self.history_buffer.create_tag('invisible', invisible=True)
|
||||||
self.checkbutton = xml.get_object('log_history_checkbutton')
|
self.checkbutton = xml.get_object('log_history_checkbutton')
|
||||||
self.checkbutton.connect('toggled',
|
self.checkbutton.connect('toggled',
|
||||||
self.on_log_history_checkbutton_toggled)
|
self.on_log_history_checkbutton_toggled)
|
||||||
|
@ -429,6 +430,12 @@ class HistoryWindow:
|
||||||
tim = time.strftime('%X ', time.localtime(float(tim)))
|
tim = time.strftime('%X ', time.localtime(float(tim)))
|
||||||
buf.insert_with_tags_by_name(end_iter, tim + '\n',
|
buf.insert_with_tags_by_name(end_iter, tim + '\n',
|
||||||
'time_sometimes')
|
'time_sometimes')
|
||||||
|
else: # don't print time. So we print it as invisible to be able to
|
||||||
|
# search for it
|
||||||
|
timestamp_str = gajim.config.get('time_stamp')
|
||||||
|
timestamp_str = helpers.from_one_line(timestamp_str)
|
||||||
|
tim = time.strftime(timestamp_str, time.localtime(float(tim)))
|
||||||
|
buf.insert_with_tags_by_name(end_iter, tim, 'invisible')
|
||||||
|
|
||||||
tag_name = ''
|
tag_name = ''
|
||||||
tag_msg = ''
|
tag_msg = ''
|
||||||
|
@ -605,8 +612,8 @@ class HistoryWindow:
|
||||||
timestamp_str = gajim.config.get('time_stamp')
|
timestamp_str = gajim.config.get('time_stamp')
|
||||||
timestamp_str = helpers.from_one_line(timestamp_str)
|
timestamp_str = helpers.from_one_line(timestamp_str)
|
||||||
tim = time.strftime(timestamp_str, local_time)
|
tim = time.strftime(timestamp_str, local_time)
|
||||||
result = start_iter.forward_search(tim, Gtk.TextSearchFlags.VISIBLE_ONLY,
|
result = start_iter.forward_search(tim, Gtk.TextSearchFlags.TEXT_ONLY,
|
||||||
None)
|
None)
|
||||||
if result is not None:
|
if result is not None:
|
||||||
match_start_iter, match_end_iter = result
|
match_start_iter, match_end_iter = result
|
||||||
match_start_iter.backward_char() # include '[' or other character before time
|
match_start_iter.backward_char() # include '[' or other character before time
|
||||||
|
|
|
@ -2473,9 +2473,6 @@ class RosterWindow:
|
||||||
gajim.config.set('roster_x-position', x)
|
gajim.config.set('roster_x-position', x)
|
||||||
gajim.config.set('roster_y-position', y)
|
gajim.config.set('roster_y-position', y)
|
||||||
width, height = self.window.get_size()
|
width, height = self.window.get_size()
|
||||||
# For the width use the size of the vbox containing the tree and
|
|
||||||
# status combo, this will cancel out any hpaned width
|
|
||||||
width = self.xml.get_object('roster_vbox2').get_allocation().width
|
|
||||||
gajim.config.set('roster_width', width)
|
gajim.config.set('roster_width', width)
|
||||||
gajim.config.set('roster_height', height)
|
gajim.config.set('roster_height', height)
|
||||||
if not self.xml.get_object('roster_vbox2').get_property('visible'):
|
if not self.xml.get_object('roster_vbox2').get_property('visible'):
|
||||||
|
|
Loading…
Reference in New Issue