Daniel Brötzmann pushed to branch mainwindow at gajim / gajim
Commits:
4a8c9e89 by wurstsalat at 2021-10-24T15:59:08+02:00
Main: Don’t open control for chatstates etc.
- - - - -
ce0bf6a2 by wurstsalat at 2021-10-24T16:05:15+02:00
NotificationManager: Fix tray notifications
- - - - -
7289a04e by wurstsalat at 2021-10-24T16:08:17+02:00
Notifications: Fix getting icon
- - - - -
3 changed files:
- gajim/gtk/main.py
- gajim/gtk/notification.py
- gajim/gtk/notification_manager.py
Changes:
=====================================
gajim/gtk/main.py
=====================================
@@ -560,6 +560,9 @@ def _on_event(self, event):
if not self.chat_exists(event.account, event.jid):
if event.name == 'message-received':
+ if not event.properties.body:
+ # Don’t open control on chatstate etc.
+ return
if event.properties.is_muc_pm:
self.add_private_chat(event.account,
event.properties.jid,
=====================================
gajim/gtk/notification.py
=====================================
@@ -133,7 +133,7 @@ def _on_notification(self, event):
icon_name = event.icon_name
else:
icon_name = NOTIFICATION_ICONS.get(
- event.notif_detail, 'mail-message-new')
+ notif_detail, 'mail-message-new')
self._issue_notification(
event.notif_type,
=====================================
gajim/gtk/notification_manager.py
=====================================
@@ -143,8 +143,8 @@ def add_subscription_request(self, event):
app.nec.push_incoming_event(
NetworkEvent('notification',
- account=self.account,
- jid=self.contact.jid,
+ account=self._account,
+ jid=event.jid,
notif_type='subscription-request',
title=_('Subscription Request'),
text=text))
@@ -162,8 +162,8 @@ def add_unsubscribed(self, event):
app.nec.push_incoming_event(
NetworkEvent('notification',
- account=self.account,
- jid=self.contact.jid,
+ account=self._account,
+ jid=event.jid,
notif_type='unsubscribed',
title=_('Contact Unsubscribed'),
text=text))
@@ -186,8 +186,8 @@ def add_invitation_received(self, event):
app.nec.push_incoming_event(
NetworkEvent('notification',
- account=self.account,
- jid=self.contact.jid,
+ account=self._account,
+ jid=jid,
notif_type='group-chat-invitation',
title=_('Group Chat Invitation'),
text=text))
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/638e5bf31d1bfbb2fee9453524780c9c363f1065...7289a04e41aba8d1464371137bade0abbf09ff69
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/638e5bf31d1bfbb2fee9453524780c9c363f1065...7289a04e41aba8d1464371137bade0abbf09ff69
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits