summaryrefslogtreecommitdiff
path: root/Bustle/UI.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Bustle/UI.hs')
-rw-r--r--Bustle/UI.hs15
1 files changed, 4 insertions, 11 deletions
diff --git a/Bustle/UI.hs b/Bustle/UI.hs
index 75cd5a2..3a0ce7b 100644
--- a/Bustle/UI.hs
+++ b/Bustle/UI.hs
@@ -95,7 +95,6 @@ data WindowInfo =
data BConfig =
BConfig { debugEnabled :: Bool
- , bustleIcon :: Maybe Pixbuf
, methodIcon :: Maybe Pixbuf
, signalIcon :: Maybe Pixbuf
}
@@ -120,11 +119,10 @@ uiMain = failOnGError $ do
-- FIXME: get a real option parser
let debug = any isDebug args
- [bustle, method, signal] <- mapM loadPixbuf
- ["bustle.png", "dfeet-method.png", "dfeet-signal.png"]
+ [method, signal] <- mapM loadPixbuf
+ ["dfeet-method.png", "dfeet-signal.png"]
let config = BConfig { debugEnabled = debug
- , bustleIcon = bustle
, methodIcon = method
, signalIcon = signal
}
@@ -339,10 +337,8 @@ emptyWindow = do
openTwoDialog <- embedIO $ \r ->
setupOpenTwoDialog builder window $ \f1 f2 ->
makeCallback (loadInInitialWindow (TwoLogs f1 f2)) r
- withProgramIcon (windowSetIcon openTwoDialog)
-- Set up the window itself
- withProgramIcon (windowSetIcon window)
embedIO $ onDestroy window . makeCallback maybeQuit
-- File menu and related buttons
@@ -358,8 +354,8 @@ emptyWindow = do
onActivateLeaf openTwoItem $ widgetShowAll openTwoDialog
-- Help menu
- withProgramIcon $ \icon -> io $
- onActivateLeaf aboutItem $ showAboutDialog window icon
+ embedIO $ \r -> do
+ onActivateLeaf aboutItem $ showAboutDialog window
m <- asks methodIcon
s <- asks signalIcon
@@ -526,9 +522,6 @@ displayLog wi@(WindowInfo { wiWindow = window
return ()
-withProgramIcon :: (Maybe Pixbuf -> IO a) -> B a
-withProgramIcon f = asks bustleIcon >>= io . f
-
loadPixbuf :: FilePath -> IO (Maybe Pixbuf)
loadPixbuf filename = do
iconName <- getDataFileName $ "data/" ++ filename