<div dir="ltr"><div><div><div><div><div>You may want to check one of Keera Studios&#39; apps. All four of these do what you want:<br><br><a href="https://github.com/ivanperez-keera/haskellifi-trayicon">https://github.com/ivanperez-keera/haskellifi-trayicon</a><br>

<a href="https://github.com/ivanperez-keera/keera-diamondcard-sms-trayicon">https://github.com/ivanperez-keera/keera-diamondcard-sms-trayicon</a><br><a href="https://github.com/ivanperez-keera/keera-three-balance-checker">https://github.com/ivanperez-keera/keera-three-balance-checker</a><br>

<a href="https://github.com/keera-studios/keera-posture">https://github.com/keera-studios/keera-posture</a><br><br></div>The code is well organised, each module tries to implement only one feature.<br>The part that adds the tray icon, menus and modifies the image is in the Controller; usually you&#39;d be looking for files with the names Icon*, Status*, Tray* or *Menu*<br>

<br></div>One example:<br><a href="https://github.com/ivanperez-keera/haskellifi-trayicon/blob/master/src/Controller/Conditions/WifiListMenu.hs">https://github.com/ivanperez-keera/haskellifi-trayicon/blob/master/src/Controller/Conditions/WifiListMenu.hs</a><br>

<a href="https://github.com/ivanperez-keera/haskellifi-trayicon/blob/master/src/Controller/Conditions/Icon.hs">https://github.com/ivanperez-keera/haskellifi-trayicon/blob/master/src/Controller/Conditions/Icon.hs</a><br><br>

</div>Note that the first module adds the menu to the icon, and the second one changes the icon.<br><br></div>There are more complex examples in the other programs.<br><br></div><div>Let me know if you have any questions.<br>

</div><div><br></div><div><div><div><div>Cheers<br><br></div><div>Ivan<br></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 9 September 2013 15:23, Henk-Jan van Tuyl <span dir="ltr">&lt;<a href="mailto:hjgtuyl@chello.nl" target="_blank">hjgtuyl@chello.nl</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, 09 Sep 2013 11:48:42 +0200, Sergey Mironov &lt;<a href="mailto:grrwlf@gmail.com" target="_blank">grrwlf@gmail.com</a>&gt; wrote:<br>


<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi, Cafe. I&#39;d like to write simple GUI utility containing tray icon<br>
and the menu. Could you please suggest Haskell example to make my<br>
start easier?<br>
</blockquote>
<br></div>
There is a simple wxHaskell program for this:<br>
<a href="https://github.com/wxHaskell/wxHaskell/blob/master/samples/wx/TestTaskBarIcon.hs" target="_blank">https://github.com/wxHaskell/<u></u>wxHaskell/blob/master/samples/<u></u>wx/TestTaskBarIcon.hs</a><br>
<br>
There is however a problem with this (maybe just on Windows), see the bug report I just entered:<br>
<a href="http://sourceforge.net/p/wxhaskell/bugs/71/" target="_blank">http://sourceforge.net/p/<u></u>wxhaskell/bugs/71/</a><br>
<br>
Regards,<br>
Henk-Jan van Tuyl<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
-- <br>
Folding@home<br>
What if you could share your unused computer power to help find a cure? In just 5 minutes you can join the world&#39;s biggest networked computer and get us closer sooner. Watch the video.<br>
<a href="http://folding.stanford.edu/" target="_blank">http://folding.stanford.edu/</a><br>
<br>
<br>
<a href="http://Van.Tuyl.eu/" target="_blank">http://Van.Tuyl.eu/</a><br>
<a href="http://members.chello.nl/hjgtuyl/tourdemonad.html" target="_blank">http://members.chello.nl/<u></u>hjgtuyl/tourdemonad.html</a><br>
Haskell programming<br>
--</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/<u></u>mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>