Philipp Hörist pushed to branch master at gajim / gajim
Commits:
ae397ca8 by lovetox at 2020-04-30T21:51:19+02:00
Message: Allow plugins to add arbitrary xml elements
- - - - -
2 changed files:
- gajim/common/modules/message.py
- gajim/common/structs.py
Changes:
=====================================
gajim/common/modules/message.py
=====================================
@@ -343,6 +343,11 @@ class Message(BaseModule):
stanza.setTag('no-store',
namespace=Namespace.MSG_HINTS)
+ # Add other nodes
+ if message.nodes is not None:
+ for node in message.nodes:
+ stanza.addChild(node=node)
+
return stanza
def log_message(self, message):
=====================================
gajim/common/structs.py
=====================================
@@ -65,7 +65,8 @@ class OutgoingMessage:
correct_id=None,
automatic_message=False,
oob_url=None,
- xhtml=None):
+ xhtml=None,
+ nodes=None):
if type_ not in ('chat', 'groupchat', 'normal', 'headline'):
raise ValueError('Unknown message type: %s' % type_)
@@ -110,6 +111,8 @@ class OutgoingMessage:
if xhtml is not None:
self.additional_data.set_value('gajim', 'xhtml', xhtml)
+ self.nodes = nodes
+
self.timestamp = None
self.message_id = None
self.stanza = None
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/ae397ca83385adc46e4e5510752360ee…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/ae397ca83385adc46e4e5510752360ee…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch gajim_1.2 at gajim / gajim
Commits:
8d609c8d by lovetox at 2020-04-29T21:12:14+02:00
Change default tabs position to left
This should users get accustomed to the UI changes we plan for 1.3
Also it hides the problems with the not scrollable tabs list because much more tabs fit the window
- - - - -
20b4ce54 by lovetox at 2020-04-29T22:11:39+02:00
Remove unused code
- - - - -
65506e31 by lovetox at 2020-04-29T22:11:39+02:00
Adapt nbxmpp handler registration
- - - - -
3 changed files:
- gajim/common/client.py
- gajim/common/config.py
- gajim/plugins/pluginmanager.py
Changes:
=====================================
gajim/common/client.py
=====================================
@@ -374,12 +374,7 @@ class Client(ConnectionHandlers):
def _register_new_handlers(self):
for handler in modules.get_handlers(self):
- if len(handler) == 5:
- name, func, typ, ns, priority = handler
- self._client.register_handler(
- name, func, typ, ns, priority=priority)
- else:
- self._client.register_handler(*handler)
+ self._client.register_handler(handler)
self.handlers_registered = True
def get_module(self, name):
=====================================
gajim/common/config.py
=====================================
@@ -170,7 +170,7 @@ class Config:
'last_save_dir': [opt_str, ''],
'last_send_dir': [opt_str, ''],
'last_sounds_dir': [opt_str, ''],
- 'tabs_position': [opt_str, 'top'],
+ 'tabs_position': [opt_str, 'left'],
'tabs_always_visible': [opt_bool, False, _('Show tab when only one conversation?')],
'tabs_border': [opt_bool, False, _('Show tabbed notebook border in chat windows?')],
'tabs_close_button': [opt_bool, True, _('Show close button in tab?')],
=====================================
gajim/plugins/pluginmanager.py
=====================================
@@ -412,7 +412,7 @@ class PluginManager(metaclass=Singleton):
# in connection_handlers._register_handlers()
if con.handlers_registered:
for handler in instance.handlers:
- con.connection.register_handler(*handler)
+ con.connection.register_handler(handler)
def _unregister_modules_with_handlers(self, plugin):
if not hasattr(plugin, 'modules'):
@@ -428,7 +428,7 @@ class PluginManager(metaclass=Singleton):
for handler in instance.handlers:
if len(handler) > 4:
handler = handler[:4]
- con.connection.unregister_handler(*handler)
+ con.connection.unregister_handler(handler)
def activate_plugin(self, plugin):
'''
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/6266db68b326ba3d9816ff013493ad9…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/6266db68b326ba3d9816ff013493ad9…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
d41e99f3 by lovetox at 2020-04-29T21:01:06+02:00
Change default tabs position to left
This should users get accustomed to the UI changes we plan for 1.3
Also it hides the problems with the not scrollable tabs list because much more tabs fit the window
- - - - -
135be5ca by lovetox at 2020-04-29T21:40:23+02:00
Remove unused code
- - - - -
147ed3c5 by lovetox at 2020-04-29T22:08:53+02:00
Adapt nbxmpp handler registration
- - - - -
3 changed files:
- gajim/common/client.py
- gajim/common/config.py
- gajim/plugins/pluginmanager.py
Changes:
=====================================
gajim/common/client.py
=====================================
@@ -374,12 +374,7 @@ class Client(ConnectionHandlers):
def _register_new_handlers(self):
for handler in modules.get_handlers(self):
- if len(handler) == 5:
- name, func, typ, ns, priority = handler
- self._client.register_handler(
- name, func, typ, ns, priority=priority)
- else:
- self._client.register_handler(*handler)
+ self._client.register_handler(handler)
self.handlers_registered = True
def get_module(self, name):
=====================================
gajim/common/config.py
=====================================
@@ -170,7 +170,7 @@ class Config:
'last_save_dir': [opt_str, ''],
'last_send_dir': [opt_str, ''],
'last_sounds_dir': [opt_str, ''],
- 'tabs_position': [opt_str, 'top'],
+ 'tabs_position': [opt_str, 'left'],
'tabs_always_visible': [opt_bool, False, _('Show tab when only one conversation?')],
'tabs_border': [opt_bool, False, _('Show tabbed notebook border in chat windows?')],
'tabs_close_button': [opt_bool, True, _('Show close button in tab?')],
=====================================
gajim/plugins/pluginmanager.py
=====================================
@@ -412,7 +412,7 @@ class PluginManager(metaclass=Singleton):
# in connection_handlers._register_handlers()
if con.handlers_registered:
for handler in instance.handlers:
- con.connection.register_handler(*handler)
+ con.connection.register_handler(handler)
def _unregister_modules_with_handlers(self, plugin):
if not hasattr(plugin, 'modules'):
@@ -428,7 +428,7 @@ class PluginManager(metaclass=Singleton):
for handler in instance.handlers:
if len(handler) > 4:
handler = handler[:4]
- con.connection.unregister_handler(*handler)
+ con.connection.unregister_handler(handler)
def activate_plugin(self, plugin):
'''
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/9b7ae7d5efc15dedb4e458dc63915d8…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/9b7ae7d5efc15dedb4e458dc63915d8…
You're receiving this email because of your account on dev.gajim.org.