Apr-19-2020, 05:19 AM
(This post was last modified: Apr-19-2020, 05:19 AM by steve_shambles.)
I am a bit of a fan of the infi-systray module:
https://github.com/Infinidat/infi.systray
I have made 3 simple Windows apps so far.
Heres one of them: https://stevepython.wordpress.com/2020/0...older-sync
One of the downsides with the module is a lack of clear documentation,
not being cross platform, and little things like some of the commands
not working at all as described in the doc, systray.shutdown for example.
One of the more simple things that really need doing is to allow proper separator bars
in the systray menus. At the moment users have to use dashes or underscores, it looks crap.
In the github issues someone asked about this and the author says he has no spare time
to work on it. When I begged he posted this bit of "code" that is tottaly gobbledegook
to me.
https://github.com/Infinidat/infi.systray/issues/20
because I can't and the author has not replied after a week
of me asking him to simplfy it.
I appreciate the author has moved on and is busy. I am not having a dig at him.
Steve.
https://github.com/Infinidat/infi.systray
I have made 3 simple Windows apps so far.
Heres one of them: https://stevepython.wordpress.com/2020/0...older-sync
One of the downsides with the module is a lack of clear documentation,
not being cross platform, and little things like some of the commands
not working at all as described in the doc, systray.shutdown for example.
One of the more simple things that really need doing is to allow proper separator bars
in the systray menus. At the moment users have to use dashes or underscores, it looks crap.
In the github issues someone asked about this and the author says he has no spare time
to work on it. When I begged he posted this bit of "code" that is tottaly gobbledegook
to me.
https://github.com/Infinidat/infi.systray/issues/20
diff --git a/src/infi/systray/win32_adapter.py b/src/infi/systray/win32_adapter.py index 1b9a9ef..ba4c37e 100755 --- a/src/infi/systray/win32_adapter.py +++ b/src/infi/systray/win32_adapter.py @@ -70,6 +70,7 @@ SM_CXSMICON = 49 SM_CYSMICON = 50 COLOR_MENU = 4 DI_NORMAL = 3 +MFT_SEPARATOR = 0x00000800 WPARAM = ctypes.wintypes.WPARAM LPARAM = ctypes.wintypes.LPARAM @@ -148,6 +149,9 @@ class NOTIFYICONDATA(ctypes.Structure): def PackMENUITEMINFO(text=None, hbmpItem=None, wID=None, hSubMenu=None): res = MENUITEMINFO() res.cbSize = ctypes.sizeof(res) + if text == "-----": + res.fType = MFT_SEPARATOR + return res res.fMask = 0 if hbmpItem is not None: res.fMask |= MIIM_BITMAPCan anyone sort this into a simple function for me
because I can't and the author has not replied after a week
of me asking him to simplfy it.
I appreciate the author has moved on and is busy. I am not having a dig at him.
Steve.