Improve default file chooser settings
If the user hasn't specified a file on CLI, the button now correctly shows "None" and has $HOME as start dir.
This commit is contained in:
parent
d39180a723
commit
cb53b2b61d
9
Gtk.hs
9
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
|
||||
|
Loading…
Reference in New Issue
Block a user