From 62654e9cd1b7cc0bfc01728154fcafdd155db4a7 Mon Sep 17 00:00:00 2001 From: hashirama Date: Thu, 30 Jan 2025 03:41:16 +0000 Subject: [PATCH] Add fileDialog.hs --- fileDialog.hs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 fileDialog.hs diff --git a/fileDialog.hs b/fileDialog.hs new file mode 100644 index 0000000..048f331 --- /dev/null +++ b/fileDialog.hs @@ -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 +