summaryrefslogtreecommitdiff
path: root/Bustle
diff options
context:
space:
mode:
authorWill Thompson <will@willthompson.co.uk>2012-01-27 09:25:35 +0000
committerWill Thompson <will@willthompson.co.uk>2012-01-27 09:25:35 +0000
commit4578cafdf45cc6f7f10e50448f0b52f9aa3a95eb (patch)
tree5de5c715c6ebce95996cbeac3fb11a4efb5eb2bf /Bustle
parentc53e558f8e4e7058567c081ce20023dab037f0c9 (diff)
Replace instructions with buttons.
https://bugs.freedesktop.org/show_bug.cgi?id=44889
Diffstat (limited to 'Bustle')
-rw-r--r--Bustle/UI.hs16
1 files changed, 12 insertions, 4 deletions
diff --git a/Bustle/UI.hs b/Bustle/UI.hs
index 7139cb6..bd38e03 100644
--- a/Bustle/UI.hs
+++ b/Bustle/UI.hs
@@ -326,6 +326,7 @@ emptyWindow = do
[newItem, openItem, saveItem, closeItem, aboutItem] <-
mapM (getW castToImageMenuItem)
["new", "open", "save", "close", "about"]
+ [newButton, openButton] <- mapM (getW castToButton) ["newButton", "openButton"]
exportItem <- getW castToMenuItem "export"
openTwoItem <- getW castToMenuItem "openTwo"
viewStatistics <- getW castToCheckMenuItem "statistics"
@@ -346,10 +347,17 @@ emptyWindow = do
withProgramIcon (windowSetIcon window)
embedIO $ onDestroy window . makeCallback maybeQuit
- -- File menu
- embedIO $ onActivateLeaf newItem . makeCallback startRecording
- embedIO $ onActivateLeaf openItem . makeCallback (openDialogue window)
- io $ openTwoItem `onActivateLeaf` widgetShowAll openTwoDialog
+ -- File menu and related buttons
+ embedIO $ \r -> do
+ let new = makeCallback startRecording r
+ onActivateLeaf newItem new
+ onClicked newButton new
+
+ let open = makeCallback (openDialogue window) r
+ onActivateLeaf openItem open
+ onClicked openButton open
+
+ onActivateLeaf openTwoItem $ widgetShowAll openTwoDialog
-- Help menu
withProgramIcon $ \icon -> io $