diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-08-21 08:40:08 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-08-21 08:40:08 +0200 |
commit | 022783f4a7fd5b85afa5eedffd8a2e6a07432e1d (patch) | |
tree | 6c42cfcc9747a4e748d4456bf8bd704f0e42d9d5 /lib/Phi/Widgets/Systray.hs | |
parent | 028c4243a87e41e3b7e2c51eb752d4b089b30680 (diff) | |
download | phi-022783f4a7fd5b85afa5eedffd8a2e6a07432e1d.tar phi-022783f4a7fd5b85afa5eedffd8a2e6a07432e1d.zip |
Get rid of existential Widget type and Widget lists
Diffstat (limited to 'lib/Phi/Widgets/Systray.hs')
-rw-r--r-- | lib/Phi/Widgets/Systray.hs | 18 |
1 files changed, 4 insertions, 14 deletions
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 |