Author: asterix Date: 2009-03-11 20:14:32 +0100 (Wed, 11 Mar 2009) New Revision: 11161
Modified: branches/gajim_0.12/src/common/GnuPG.py branches/gajim_0.12/src/common/dataforms.py branches/gajim_0.12/src/common/helpers.py branches/gajim_0.12/src/config.py Log: import buxfixes from trunk: [11151] [11152] [11153] [11154] [11160]
Fixes #4857 #4893 #4894 #4895
Modified: branches/gajim_0.12/src/common/GnuPG.py =================================================================== --- branches/gajim_0.12/src/common/GnuPG.py 2009-03-11 19:12:56 UTC (rev 11160) +++ branches/gajim_0.12/src/common/GnuPG.py 2009-03-11 19:14:32 UTC (rev 11161) @@ -111,7 +111,7 @@ # Encryption succeeded, even if there is output on stderr. Maybe # verbose is on error = '' - return self._stripHeaderFooter(output), error + return self._stripHeaderFooter(output), helpers.decode_string(error)
def decrypt(self, str_, keyID): proc = self.run(['--decrypt', '-q', '-u %s'%keyID], create_fhs=['stdin', 'stdout'])
Modified: branches/gajim_0.12/src/common/dataforms.py =================================================================== --- branches/gajim_0.12/src/common/dataforms.py 2009-03-11 19:12:56 UTC (rev 11160) +++ branches/gajim_0.12/src/common/dataforms.py 2009-03-11 19:14:32 UTC (rev 11161) @@ -146,7 +146,10 @@ def label(): '''Human-readable field name.''' def fget(self): - return self.getAttr('label') + l = self.getAttr('label') + if not l: + l = self.var + return l def fset(self, value): assert isinstance(value, basestring) self.setAttr('label', value) @@ -232,7 +235,10 @@ for element in self.getTags('option'): v = element.getTagData('value') if v is None: raise WrongFieldValue - options.append((element.getAttr('label'), v)) + l = element.getAttr('label') + if not l: + l = v + options.append((l, v)) return options def fset(self, values): fdel(self)
Modified: branches/gajim_0.12/src/common/helpers.py =================================================================== --- branches/gajim_0.12/src/common/helpers.py 2009-03-11 19:12:56 UTC (rev 11160) +++ branches/gajim_0.12/src/common/helpers.py 2009-03-11 19:14:32 UTC (rev 11161) @@ -733,6 +733,9 @@ if kind == 'mail' and not uri.startswith('mailto:'): uri = 'mailto:' + uri
+ if kind == 'url' and uri.startswith('www.'): + uri = 'http://' + uri + if gajim.config.get('openwith') == 'gnome-open': command = 'gnome-open' elif gajim.config.get('openwith') == 'kfmclient exec':
Modified: branches/gajim_0.12/src/config.py =================================================================== --- branches/gajim_0.12/src/config.py 2009-03-11 19:12:56 UTC (rev 11160) +++ branches/gajim_0.12/src/config.py 2009-03-11 19:14:32 UTC (rev 11161) @@ -536,8 +536,11 @@ self.window.hide()
def get_per_account_option(self, opt): - '''Return the value of the option opt if it's the same in all accoutns + '''Return the value of the option opt if it's the same in all accounts else returns "mixed"''' + if len(gajim.connections) == 0: + # a non existant key return default value + return gajim.config.get_per('accounts', '__default__', opt) val = None for account in gajim.connections: v = gajim.config.get_per('accounts', account, opt)