Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
99a75dae by wurstsalat at 2022-01-24T18:43:07+01:00
PluginManager: Fix undefined var
- - - - -
1 changed file:
- gajim/plugins/pluginmanager.py
Changes:
=====================================
gajim/plugins/pluginmanager.py
=====================================
@@ -528,7 +528,7 @@ def _unregister_modules_with_handlers(self, plugin: GajimPlugin) -> None:
return
for client in app.connections.values():
for module in plugin.modules:
- instance = con.get_module(module.name)
+ instance = client.get_module(module.name)
modules.unregister_single_module(client, module.name)
for handler in instance.handlers:
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/99a75dae9d4651cd5c850388391706b7…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/99a75dae9d4651cd5c850388391706b7…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
ef52d49b by lovetox at 2022-01-24T14:13:10+01:00
Notifications: Don’t send nullable types via DBus
DBus does not support nullable types like GLib.Variant('ms', 'test')
- - - - -
3 changed files:
- gajim/gtk/application.py
- gajim/gtk/notification.py
- gajim/gtk/structs.py
Changes:
=====================================
gajim/gtk/application.py
=====================================
@@ -750,8 +750,9 @@ def _on_open_event_action(_action: Gio.SimpleAction,
'incoming-call',
'file-transfer'):
- assert params.jid is not None
- app.window.select_chat(params.account, params.jid)
+ assert params.jid
+ jid = JID.from_string(params.jid)
+ app.window.select_chat(params.account, jid)
app.window.present_with_time(Gtk.get_current_event_time())
=====================================
gajim/gtk/notification.py
=====================================
@@ -212,12 +212,13 @@ def _on_button_press(self,
event: Gdk.EventButton
) -> None:
if event.button == 1:
- jid = self._event.jid
- if jid is not None and isinstance(jid, str):
- jid = JID.from_string(jid)
+
+ jid = ''
+ if self._event.jid is not None:
+ jid = str(self._event.jid)
params = OpenEventActionParams(type=self._event.type,
- sub_type=self._event.sub_type,
+ sub_type=self._event.sub_type or '',
account=self._event.account,
jid=jid)
app.app.activate_action(f'app.{self._event.account}-open-event',
@@ -304,12 +305,12 @@ def _add_actions(self,
if 'actions' not in self._daemon_capabilities:
return
- jid = event.jid
- if jid is not None and isinstance(jid, str):
- jid = JID.from_string(jid)
+ jid = ''
+ if event.jid is not None:
+ jid = str(event.jid)
params = OpenEventActionParams(type=event.type,
- sub_type=event.sub_type,
+ sub_type=event.sub_type or '',
account=event.account,
jid=jid)
=====================================
gajim/gtk/structs.py
=====================================
@@ -31,10 +31,12 @@
@dataclass
class OpenEventActionParams(VariantMixin):
+ # Event which is used for Notifications and gets sent over DBus
+ # Don’t use Optional types here because DBus does not support "None"
type: str
- sub_type: Optional[str]
+ sub_type: str
account: str
- jid: Optional[JID]
+ jid: str
@dataclass
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/ef52d49b2801eae4317a08fa7fdb7c25…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/ef52d49b2801eae4317a08fa7fdb7c25…
You're receiving this email because of your account on dev.gajim.org.