zserge / tray

Cross-platform, super tiny C99 implementation of a system tray icon with a popup menu.
MIT License
493 stars 84 forks source link

Added submenu #1

Closed angelskieglazki closed 7 years ago

angelskieglazki commented 7 years ago

I added submenu for Linux. Sorry. Later I'll try to add icons

zserge commented 7 years ago

That's a good start, thanks! I would try to make it in a recursive manner, though (now submenus are limited to one level only and have no checked state support etc). Also probably it would be possible to reuse the same callback for "activate" signal.

angelskieglazki commented 7 years ago

@zserge "a recursive manner" I thought as much:) I'll do a recursive. Thanks for reply.

angelskieglazki commented 7 years ago

Hello. I redid all.

zserge commented 7 years ago

That's much better, well done! May I ask you to use clang-format tool to re-format the code to be consistent (default settings should work fine, the original code was formatted like that). Also I'd recommend to remove the commented-out block in example.c (lines 48..65) as it doesn't bring any sense to the example. Then I'd be happy to merge it.

angelskieglazki commented 7 years ago

Update. I hope I did the right.

zserge commented 7 years ago

I've simplified it a little bit and added implementations for winapi and macos. Congratulations, sub-menus are now done!