def add_notify_icon(self, hicon=None, tooltip=None):
""" Creates a notify icon for the gtk window. """
if not self.notify_icon:
if not hicon:
hicon = win32gui.LoadIcon(0, IDI_APPLICATION)
self.notify_icon = NotifyIcon(self._hwnd, hicon, tooltip)
# Makes redraw if the taskbar is restarted.
self.message_map({WM_TASKBARCREATED: self.notify_icon._redraw})
评论列表
文章目录