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"
|
hscale <- xmlGetWidget xml castToHScale "hscale"
|
||||||
|
|
||||||
-- adjust properties
|
-- adjust properties
|
||||||
_ <- fileChooserSetCurrentFolder fileButton homedir
|
case startFile == "" of
|
||||||
_ <- fileChooserSetFilename fileButton startFile
|
True -> do
|
||||||
|
_ <- fileChooserSetCurrentFolder fileButton homedir
|
||||||
|
return ()
|
||||||
|
False -> do
|
||||||
|
_ <- fileChooserSetFilename fileButton startFile
|
||||||
|
return ()
|
||||||
|
|
||||||
-- callbacks
|
-- callbacks
|
||||||
_ <- onDestroy window mainQuit
|
_ <- onDestroy window mainQuit
|
||||||
|
Loading…
Reference in New Issue
Block a user