Allow setting a startFile via cli
This commit is contained in:
parent
fc80b95665
commit
3c140832bc
5
Gtk.hs
5
Gtk.hs
@ -10,8 +10,8 @@ import Graphics.UI.Gtk.Windows.MessageDialog
|
||||
import System.Directory
|
||||
|
||||
|
||||
startGUI :: IO ()
|
||||
startGUI = do
|
||||
startGUI :: FilePath -> IO ()
|
||||
startGUI startFile = do
|
||||
homedir <- getHomeDirectory
|
||||
|
||||
-- init gui
|
||||
@ -53,6 +53,7 @@ startGUI = do
|
||||
_ <- windowSetTypeHint window WindowTypeHintDialog
|
||||
containerSetBorderWidth box2 10
|
||||
_ <- fileChooserSetCurrentFolder fileButton homedir
|
||||
_ <- fileChooserSetFilename fileButton startFile
|
||||
|
||||
-- callbacks
|
||||
_ <- onDestroy window mainQuit
|
||||
|
Loading…
Reference in New Issue
Block a user