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
|
import System.Directory
|
||||||
|
|
||||||
|
|
||||||
startGUI :: IO ()
|
startGUI :: FilePath -> IO ()
|
||||||
startGUI = do
|
startGUI startFile = do
|
||||||
homedir <- getHomeDirectory
|
homedir <- getHomeDirectory
|
||||||
|
|
||||||
-- init gui
|
-- init gui
|
||||||
@ -53,6 +53,7 @@ startGUI = do
|
|||||||
_ <- windowSetTypeHint window WindowTypeHintDialog
|
_ <- windowSetTypeHint window WindowTypeHintDialog
|
||||||
containerSetBorderWidth box2 10
|
containerSetBorderWidth box2 10
|
||||||
_ <- fileChooserSetCurrentFolder fileButton homedir
|
_ <- fileChooserSetCurrentFolder fileButton homedir
|
||||||
|
_ <- fileChooserSetFilename fileButton startFile
|
||||||
|
|
||||||
-- callbacks
|
-- callbacks
|
||||||
_ <- onDestroy window mainQuit
|
_ <- onDestroy window mainQuit
|
||||||
|
Loading…
Reference in New Issue
Block a user