module System.Taffybar.Widget.Systray {-# DEPRECATED "Use SNITray instead" #-} ( systrayNew ) where
import Control.Monad.IO.Class
import Graphics.UI.Gtk
import Graphics.UI.Gtk.Misc.TrayManager
systrayNew :: MonadIO m => m Widget
systrayNew = liftIO $ do
box <- hBoxNew False 5
trayManager <- trayManagerNew
Just screen <- screenGetDefault
_ <- trayManagerManageScreen trayManager screen
_ <- on trayManager trayIconAdded $ \w -> do
widgetShowAll w
boxPackStart box w PackNatural 0
widgetShowAll box
return (toWidget box)