Philipp Hörist pushed to branch master at gajim / gajim
Commits:
21438499 by Philipp Hörist at 2019-08-31T20:58:32Z
CSSConfig: Cache missing values
Iterating over the css data causes performance issues on older machines
Fixes #9820
- - - - -
1 changed file:
- gajim/gtk/css_config.py
Changes:
=====================================
gajim/gtk/css_config.py
=====================================
@@ -334,6 +334,8 @@ class CSSConfig():
self._add_to_cache(selector, 'fontdescription', desc)
return desc
+ self._add_to_cache(selector, 'fontdescription', None)
+
def _get_description_from_css(self, family, size, style, weight):
if family is None:
return
@@ -398,9 +400,9 @@ class CSSConfig():
# search in default theme
if not pre:
rule = self._get_default_rule(selector, attr)
- if rule is not None:
- self._add_to_cache(selector, attr, rule.style[attr])
- return rule.style[attr]
+ value = rule if rule is None else rule.style[attr]
+ self._add_to_cache(selector, attr, value)
+ return value
def remove_value(self, selector, attr, pre=False):
if attr == StyleAttr.FONT:
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/2143849981a79c65d0f8629820d9005078…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/2143849981a79c65d0f8629820d9005078…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
c72b4fbd by Philipp Hörist at 2019-08-28T21:05:21Z
CommonError: Add support for condition data
This is used for example to advertise a new MUC after destruction
<gone>xmpp:new@chat.example.org?join</gone>
- - - - -
1 changed file:
- nbxmpp/structs.py
Changes:
=====================================
nbxmpp/structs.py
=====================================
@@ -361,6 +361,7 @@ class CommonError:
def __init__(self, stanza):
self._error_node = stanza.getTag('error')
self.condition = stanza.getError()
+ self.condition_data = self._error_node.getTagData(self.condition)
self.app_condition = stanza.getAppError()
self.type = stanza.getErrorType()
self.jid = stanza.getFrom()
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/c72b4fbdbda1a8f954ad9c2865…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/c72b4fbdbda1a8f954ad9c2865…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
3745f883 by Philipp Hörist at 2019-08-28T20:52:10Z
GroupchatCreation: Handle <gone> error better
- - - - -
1 changed file:
- gajim/gtk/groupchat_creation.py
Changes:
=====================================
gajim/gtk/groupchat_creation.py
=====================================
@@ -159,7 +159,10 @@ class CreateGroupchatWindow(Gtk.ApplicationWindow):
self._ui.create_button.set_sensitive(False)
def _set_warning_from_error(self, error):
- text = MUC_DISCO_ERRORS.get(error.condition, to_user_string(error))
+ condition = error.condition
+ if condition == 'gone':
+ condition = 'already-exists'
+ text = MUC_DISCO_ERRORS.get(condition, to_user_string(error))
self._set_warning(text)
def _set_warning_from_error_code(self, error_code):
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/3745f88313a17a8613d618a3e71571707a…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/3745f88313a17a8613d618a3e71571707a…
You're receiving this email because of your account on dev.gajim.org.