From 022783f4a7fd5b85afa5eedffd8a2e6a07432e1d Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 21 Aug 2011 08:40:08 +0200 Subject: Get rid of existential Widget type and Widget lists --- lib/Phi/Widgets/Systray.hs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'lib/Phi/Widgets/Systray.hs') diff --git a/lib/Phi/Widgets/Systray.hs b/lib/Phi/Widgets/Systray.hs index e9311de..6812018 100644 --- a/lib/Phi/Widgets/Systray.hs +++ b/lib/Phi/Widgets/Systray.hs @@ -35,19 +35,9 @@ import Phi.Widget import Phi.X11.Atoms -instance Show Display where - show _ = "Display " - -instance Show Phi where - show _ = "Phi " - -instance Show (IORef a) where - show _ = "IORef " - - data SystrayIconState = SystrayIconState !Window !Window deriving Show -data SystrayState = SystrayState !Phi !Rectangle !Int !(IORef Int) ![SystrayIconState] deriving Show +data SystrayState = SystrayState !Phi !Rectangle !Int !(IORef Int) ![SystrayIconState] instance Eq SystrayState where _ == _ = False @@ -57,7 +47,7 @@ data SystrayMessage = AddIcon !Window !Window | RemoveIcon !Window | RenderIcon deriving (Show, Typeable) -instance WidgetClass Systray SystrayState where +instance Widget Systray SystrayState where initWidget (Systray) phi dispvar = do phi' <- dupPhi phi forkIO $ systrayRunner phi' dispvar @@ -298,5 +288,5 @@ removeIcon phi disp reparent window = do return () -systray :: Widget -systray = Widget $ Systray +systray :: Systray +systray = Systray -- cgit v1.2.3