diff --git a/gajim/statusicon.py b/gajim/statusicon.py index a321c1f3fb0d4b6817a249d1a65923ddcd32655a..86edee6f09fa93ab8877a042757b28fbac22b967 100644 --- a/gajim/statusicon.py +++ b/gajim/statusicon.py @@ -104,8 +104,7 @@ class StatusIcon: self.make_menu(event_button, event_time) def on_status_icon_query_tooltip(self, widget, x, y, keyboard_mode, tooltip): - self.tooltip.populate() - tooltip.set_custom(self.tooltip.hbox) + tooltip.set_custom(self.tooltip.get_tooltip()) return True def hide_icon(self): diff --git a/gajim/tooltips.py b/gajim/tooltips.py index a138b26d97707515c33270433ea45546190ab1f7..7a7d4638033ca397e4c8c26db1a53b13e5bb48d4 100644 --- a/gajim/tooltips.py +++ b/gajim/tooltips.py @@ -263,13 +263,13 @@ class StatusTable: self.table.attach(lock_image, 4, self.current_row, 1, 1) self.current_row += 1 -class NotificationAreaTooltip(BaseTooltip, StatusTable): + +class NotificationAreaTooltip(StatusTable): """ Tooltip that is shown in the notification area """ def __init__(self): - BaseTooltip.__init__(self) StatusTable.__init__(self) def fill_table_with_accounts(self, accounts): @@ -297,8 +297,7 @@ class NotificationAreaTooltip(BaseTooltip, StatusTable): for line in acct['event_lines']: self.add_text_row(' ' + line, 1) - def populate(self, data=''): - self.create_window() + def get_tooltip(self): self.create_table() accounts = helpers.get_notification_icon_tooltip_dict() @@ -308,6 +307,8 @@ class NotificationAreaTooltip(BaseTooltip, StatusTable): self.hbox.add(self.table) self.hbox.show_all() + return self.hbox + class GCTooltip(Gtk.Window): # pylint: disable=E1101