Skip to content

Commit

Permalink
tk tray icon loop
Browse files Browse the repository at this point in the history
  • Loading branch information
j4321 committed Sep 13, 2018
1 parent bab79bc commit 604aa05
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions checkmailslib/trayicon/tkicon.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
It follows http://www.freedesktop.org specifications when looking up the
system tray manager.
"""

import tkinter
from checkmailslib.constants import PhotoImage

Expand Down Expand Up @@ -169,7 +169,8 @@ def change_icon(self, icon, desc):

def loop(self, tk_window):
# no need to update since it is part of the tk mainloop
tk_window.loop_id = ""
self.update_idletasks()
tk_window.loop_id = tk_window.after(10, self.loop, tk_window)

def get_item_label(self, item):
return self.menu.entrycget(item, 'label')
Expand Down

0 comments on commit 604aa05

Please sign in to comment.