Skip to content

Commit

Permalink
Remove _show_when_systray_available workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
lafrech committed Feb 16, 2022
1 parent 105e35a commit adfa52a
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/qbirthday/statusicon.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,7 @@ def tray_icon_activated_cb(reason):

self.activated.connect(tray_icon_activated_cb)

self._show_when_systray_available()

def _show_when_systray_available(self):
"""Show status icon when system tray is available
If available, show icon, otherwise, set a timer to check back later.
This is a workaround for https://bugreports.qt.io/browse/QTBUG-61898
"""
if self.isSystemTrayAvailable():
self.show()
else:
QtCore.QTimer.singleShot(1000, self._show_when_systray_available)
self.show()

def reload_set_icon(self):
"""Set icon according to birthday status"""
Expand Down

0 comments on commit adfa52a

Please sign in to comment.