diff options
author | Will Thompson <will@willthompson.co.uk> | 2015-05-25 10:42:26 +0100 |
---|---|---|
committer | Will Thompson <will@willthompson.co.uk> | 2015-05-25 10:42:26 +0100 |
commit | 288b1ce03e58a40d7962685365c84d1f96b46baa (patch) | |
tree | 68ddfb06a26a799c31dd24f57247c322f88f648c | |
parent | 07a1776787454fb0ae50bffdc26cf36a5603ecf5 (diff) |
Non-pinned, non-modal open dialog
-rw-r--r-- | Bustle/UI.hs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Bustle/UI.hs b/Bustle/UI.hs index 09540c2..f700877 100644 --- a/Bustle/UI.hs +++ b/Bustle/UI.hs @@ -374,7 +374,7 @@ emptyWindow = do forM [headerNew, newButton] $ \button -> button `on` buttonActivated $ new - let open = makeCallback (openDialogue window) r + let open = makeCallback openDialogue r onMenuItemActivate openItem open openButton `on` buttonActivated $ open @@ -554,14 +554,13 @@ loadPixbuf filename = do C.catch (fmap Just (pixbufNewFromFile iconName)) (\(GError _ _ msg) -> warn (toString msg) >> return Nothing) -openDialogue :: Window -> B () -openDialogue window = embedIO $ \r -> do - chooser <- fileChooserDialogNew Nothing (Just window) FileChooserActionOpen +openDialogue :: B () +openDialogue = embedIO $ \r -> do + chooser <- fileChooserDialogNew Nothing Nothing FileChooserActionOpen [ ("gtk-cancel", ResponseCancel) , ("gtk-open", ResponseAccept) ] - chooser `set` [ windowModal := True - , fileChooserLocalOnly := True + chooser `set` [ fileChooserLocalOnly := True ] chooser `after` response $ \resp -> do |