Add fileDialog.hs
This commit is contained in:
parent
9dcba8408a
commit
62654e9cd1
1 changed files with 22 additions and 0 deletions
22
fileDialog.hs
Normal file
22
fileDialog.hs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{-# LANGUAGE ImplicitParams #-}
|
||||
{-# LANGUAGE OverloadedLabels #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
import Control.Concurrent
|
||||
import GI.Gtk
|
||||
import GI.Gio hiding (Application)
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
app <- new Application []
|
||||
onApplicationActivate app $ do
|
||||
dlg <- new FileDialog [fileDialogInitialFolder :=> fileNewForPath "/"]
|
||||
|
||||
window <- new GI.Gtk.ApplicationWindow [#application := app,
|
||||
#title := "Wazajisho"]
|
||||
|
||||
fileDialogSelectFolder dlg (Just window) (Nothing :: Maybe Cancellable)
|
||||
|
||||
|
||||
applicationRun app Nothing
|
||||
threadDelay 30000000000
|
||||
|
||||
Loading…
Reference in a new issue