fix: missing cancellable action

This commit is contained in:
千住柱間 2025-02-17 02:47:51 +00:00
commit 1e4ba9d4ed

View file

@ -10,13 +10,13 @@ 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)
{-
This type is defined in the GI.Gio library, which we're importing (with import GI.Gio hiding (Application)).
It’s a common pattern in GTK and GIO for asynchronous functions to accept a cancellable object.
-}
fileDialogSelectFolder dlg (Just window) (Nothing :: Maybe Cancellable) Nothing
applicationRun app Nothing
threadDelay 30000000000