diff --git a/src/common/connection_handlers_events.py b/src/common/connection_handlers_events.py index 6d1144eef..fb24effad 100644 --- a/src/common/connection_handlers_events.py +++ b/src/common/connection_handlers_events.py @@ -2350,7 +2350,7 @@ class NotificationEvent(nec.NetworkIncomingEvent): iconset = gajim.config.get('iconset') img_path = os.path.join(helpers.get_iconset_path(iconset), '48x48', show_image) - self.popup_image = self.get_path_to_generic_or_avatar(img_path, + self.popup_image_path = self.get_path_to_generic_or_avatar(img_path, jid=self.jid, suffix=suffix) self.popup_timeout = gajim.config.get('notification_timeout') @@ -2399,6 +2399,7 @@ class NotificationEvent(nec.NetworkIncomingEvent): self.popup_event_type = '' self.popup_msg_type = '' self.popup_image = '' + self.popup_image_path = '' self.popup_timeout = -1 self.do_command = False diff --git a/src/notify.py b/src/notify.py index 7a32d81ed..a439c1881 100644 --- a/src/notify.py +++ b/src/notify.py @@ -156,13 +156,16 @@ class Notification: def _nec_notification(self, obj): if obj.do_popup: - if isinstance(obj.popup_image, str): - icon_path = gtkgui_helpers.get_icon_path(obj.popup_image, - 48) + if obj.popup_image: + icon_path = gtkgui_helpers.get_icon_path(obj.popup_image, 48) if icon_path: - obj.popup_image = icon_path + image_path = icon_path + elif obj.popup_image_path: + image_path = obj.popup_image_path + else: + image_path = '' popup(obj.popup_event_type, obj.jid, obj.conn.name, - obj.popup_msg_type, path_to_image=obj.popup_image, + obj.popup_msg_type, path_to_image=image_path, title=obj.popup_title, text=obj.popup_text, timeout=obj.popup_timeout)