changeset 0cb3fc3f8909 in /home/hg/repos/gajim
author: Yann Leboulanger <asterix(a)lagaule.org>
branches: gajim_0.16
details:http://hg.gajim.org/gajim?cmd=changeset;node=0cb3fc3f8909
description: don't crash when we rename local account that is activated but zeroconf not available. Fixes #7511
diffstat:
src/config.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r 9b66e4139a59 -r 0cb3fc3f8909 src/config.py
--- a/src/config.py Wed Oct 30 21:33:31 2013 +0100
+++ b/src/config.py Thu Oct 31 10:15:55 2013 +0100
@@ -2034,7 +2034,8 @@
def on_rename_button_clicked(self, widget):
if not self.current_account:
return
- active = gajim.config.get_per('accounts', self.current_account, 'active')
+ active = gajim.config.get_per('accounts', self.current_account,
+ 'active') and self.current_account in gajim.connections
if active and gajim.connections[self.current_account].connected != 0:
dialogs.ErrorDialog(
_('You are currently connected to the server'),
changeset 324c16fc8f10 in /home/hg/repos/gajim
author: Yann Leboulanger <asterix(a)lagaule.org>
branches: gajim_0.16
details:http://hg.gajim.org/gajim?cmd=changeset;node=324c16fc8f10
description: [Maranda] ignore directory category of type server, if an identity with server category is present. Fixes #7499
diffstat:
src/disco.py | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (24 lines):
diff -r aa7b42be930e -r 324c16fc8f10 src/disco.py
--- a/src/disco.py Wed Oct 30 15:28:24 2013 +0100
+++ b/src/disco.py Wed Oct 30 16:38:01 2013 +0100
@@ -942,9 +942,17 @@
Set the window title based on agent info
"""
# Set the banner and window title
- if 'name' in identities[0]:
- name = identities[0]['name']
- self.window._set_window_banner_text(self._get_agent_address(), 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)
# Add an icon to the banner.
pix = self.cache.get_icon(identities, addr=self._get_agent_address())