gajim: Typo.Fixes #7551
changeset 1361dbec53af in /home/hg/repos/gajim author: Denis Fomin fomi...@gmail.com branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=1361dbec53af description: Typo.Fixes #7551 diffstat: src/disco.py | 20 ++-- 1 файлов изменено, 10 вставок(+), 10 удалений(-) различия (31 строк): diff -r cab3da8ca8ea -r 1361dbec53af src/disco.py --- a/src/disco.py Tue Nov 05 13:12:38 2013 +0100 +++ b/src/disco.py Wed Nov 06 21:49:27 2013 +0400 @@ -942,17 +942,17 @@ Set the window title based on agent info # Set the banner and window title - if len(identities) 1: - # Check if an identity with server category is present - for i, _identity in enumerate(identities): - if _identity['category'] == 'server' and 'name' in _identity: - name = _identity['name'] - break - elif 'name' in identities[0]: - name = identities[0]['name'] +if len(identities) 1: + # Check if an identity with server category is present + for i, _identity in enumerate(identities): +if _identity['category'] == 'server' and 'name' in _identity: + name = _identity['name'] + break +elif 'name' in identities[0]: + name = identities[0]['name'] - if name: - self.window._set_window_banner_text(self._get_agent_address(), name) +if name: + self.window._set_window_banner_text(self._get_agent_address(), name) # Add an icon to the banner. pix = self.cache.get_icon(identities, addr=self._get_agent_address()) ___ Commits mailing list Commits@gajim.org http://lists.gajim.org/cgi-bin/listinfo/commits
gajim: fix variable initialization. Fixes #7551
changeset 80b6bc2509b8 in /home/hg/repos/gajim author: Yann Leboulanger aste...@lagaule.org branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=80b6bc2509b8 description: fix variable initialization. Fixes #7551 diffstat: src/disco.py | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diffs (26 lines): diff -r 1361dbec53af -r 80b6bc2509b8 src/disco.py --- a/src/disco.py Wed Nov 06 21:49:27 2013 +0400 +++ b/src/disco.py Wed Nov 06 19:02:37 2013 +0100 @@ -942,14 +942,15 @@ Set the window title based on agent info # Set the banner and window title +name = '' if len(identities) 1: - # Check if an identity with server category is present - for i, _identity in enumerate(identities): -if _identity['category'] == 'server' and 'name' in _identity: - name = _identity['name'] - break -elif 'name' in identities[0]: - name = identities[0]['name'] +# Check if an identity with server category is present +for i, _identity in enumerate(identities): +if _identity['category'] == 'server' and 'name' in _identity: +name = _identity['name'] +break +elif 'name' in identities[0]: +name = identities[0]['name'] if name: self.window._set_window_banner_text(self._get_agent_address(), name) ___ Commits mailing list Commits@gajim.org http://lists.gajim.org/cgi-bin/listinfo/commits
gajim: prevent traceback. Fixes #7503
changeset c8d945a5b22f in /home/hg/repos/gajim author: Yann Leboulanger aste...@lagaule.org branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=c8d945a5b22f description: prevent traceback. Fixes #7503 diffstat: src/common/stanza_session.py | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diffs (27 lines): diff -r 80b6bc2509b8 -r c8d945a5b22f src/common/stanza_session.py --- a/src/common/stanza_session.py Wed Nov 06 19:02:37 2013 +0100 +++ b/src/common/stanza_session.py Wed Nov 06 21:17:15 2013 +0100 @@ -810,7 +810,10 @@ # the offset of the group we chose (need it to match up with the dhhash) group_order = 0 -self.modp = int(form.getField('modp').getOptions()[group_order][1]) +modp_f = form.getField('modp') +if not modp_f: +return +self.modp = int(modp_f.getOptions()[group_order][1]) x.addChild(node=nbxmpp.DataField(name='modp', value=self.modp)) g = dh.generators[self.modp] @@ -818,7 +821,10 @@ self.n_o = base64.b64decode(form['my_nonce']) -dhhashes = form.getField('dhhashes').getValues() +dhhashes_f = form.getField('dhhashes') +if not dhhashes_f: +return +dhhashes = dhhashes_f.getValues() self.negotiated['He'] = base64.b64decode(dhhashes[group_order].encode( 'utf8')) ___ Commits mailing list Commits@gajim.org http://lists.gajim.org/cgi-bin/listinfo/commits
gajim: improve manage bookmark behaviour when copy/pasting room ...
changeset 53c0972a4ab4 in /home/hg/repos/gajim author: Yann Leboulanger aste...@lagaule.org branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=53c0972a4ab4 description: improve manage bookmark behaviour when copy/pasting room JID. Fixes room jid checking. Fixes #7547 diffstat: src/config.py | 21 - 1 files changed, 12 insertions(+), 9 deletions(-) diffs (57 lines): diff -r c8d945a5b22f -r 53c0972a4ab4 src/config.py --- a/src/config.py Wed Nov 06 21:17:15 2013 +0100 +++ b/src/config.py Wed Nov 06 22:00:21 2013 +0100 @@ -3413,7 +3413,7 @@ nick = helpers.parse_resource(nick) except helpers.InvalidFormat, e: dialogs.ErrorDialog(_('Invalid nickname'), -_('Character not allowed')) +_('Character not allowed'), transient_for=self.window) self.nick_entry.set_text(model[iter_][6]) return True model[iter_][6] = nick @@ -3424,16 +3424,17 @@ return server = widget.get_text().decode('utf-8') if '@' in server: -dialogs.ErrorDialog(_('Invalid server'), _('Character not allowed')) +dialogs.ErrorDialog(_('Invalid server'), _('Character not allowed'), +transient_for=self.window) widget.set_text(server.replace('@', '')) room_jid = self.room_entry.get_text().decode('utf-8').strip() + '@' + \ server.strip() try: -room_jid = helpers.parse_resource(room_jid) +room_jid = helpers.parse_jid(room_jid) except helpers.InvalidFormat, e: dialogs.ErrorDialog(_('Invalid server'), -_('Character not allowed')) +_('Character not allowed'), transient_for=self.window) self.server_entry.set_text(model[iter_][2].split('@')[1]) return True model[iter_][2] = room_jid @@ -3444,16 +3445,18 @@ return room = widget.get_text().decode('utf-8') if '@' in room: -dialogs.ErrorDialog(_('Invalid server'), _('Character not allowed')) -widget.set_text(room.replace('@', '')) +room, server = room.split('@', 1) +widget.set_text(room) +if server: +self.server_entry.set_text(server) +self.server_entry.grab_focus() room_jid = room.strip() + '@' + \ self.server_entry.get_text().decode('utf-8').strip() try: -room_jid = helpers.parse_resource(room_jid) +room_jid = helpers.parse_jid(room_jid) except helpers.InvalidFormat, e: dialogs.ErrorDialog(_('Invalid room'), -_('Character not allowed')) -self.room_entry.set_text(model[iter_][2].split('@')[0]) +_('Character not allowed'), transient_for=self.window) return True model[iter_][2] = room_jid ___ Commits mailing list Commits@gajim.org http://lists.gajim.org/cgi-bin/listinfo/commits