[Haskell-cafe] gtk2hs tray icon disappears when using GHCi

Deniz Dogan deniz.a.m.dogan at gmail.com
Wed Jul 1 07:29:22 EDT 2009


I'm just trying out gtk2hs for the first time and I quite like it.
However, for some reason my tray icon (...Gtk.Display.StatusIcon)
disappears after a split second when I run my program using GHCi.
What's the reason for this? Perhaps this is even a bug? It works just
fine if I compile an .exe. I'm using Windows XP with GHC 6.10.3 and
gtk2hs 0.10.1.

import Graphics.UI.Gtk
import Graphics.UI.Gtk.Display.StatusIcon

main :: IO ()
main = do
  window <- windowNew
  tray <- statusIconNewFromFile "c:/Program Files/TortoiseHg/icons/commit.png"
  window `onDestroy` mainQuit
  widgetShowAll window

Deniz Dogan

More information about the Haskell-Cafe mailing list