diff --git a/Gtk.hs b/Gtk.hs index 74e33b9..780266d 100644 --- a/Gtk.hs +++ b/Gtk.hs @@ -35,8 +35,13 @@ makeGUI startFile = do hscale <- xmlGetWidget xml castToHScale "hscale" -- adjust properties - _ <- fileChooserSetCurrentFolder fileButton homedir - _ <- fileChooserSetFilename fileButton startFile + case startFile == "" of + True -> do + _ <- fileChooserSetCurrentFolder fileButton homedir + return () + False -> do + _ <- fileChooserSetFilename fileButton startFile + return () -- callbacks _ <- onDestroy window mainQuit