GTK: allow to start gui with specific directory
This commit is contained in:
parent
7c84dce09f
commit
074ee45961
@ -4,11 +4,22 @@ module Main where
|
||||
|
||||
import Graphics.UI.Gtk
|
||||
import GUI.Gtk.Gui
|
||||
import Safe
|
||||
(
|
||||
headDef
|
||||
)
|
||||
import System.Environment
|
||||
(
|
||||
getArgs
|
||||
)
|
||||
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
_ <- initGUI
|
||||
|
||||
startMainWindow
|
||||
args <- getArgs
|
||||
|
||||
startMainWindow (headDef "/" args)
|
||||
|
||||
mainGUI
|
||||
|
@ -458,8 +458,8 @@ withErrorDialog io = do
|
||||
|
||||
|
||||
-- |Set up the GUI.
|
||||
startMainWindow :: IO ()
|
||||
startMainWindow = do
|
||||
startMainWindow :: FilePath -> IO ()
|
||||
startMainWindow startdir = do
|
||||
|
||||
settings <- newTVarIO (MkFMSettings False True)
|
||||
|
||||
@ -469,7 +469,7 @@ startMainWindow = do
|
||||
filePix <- getIcon IFile 24
|
||||
errorPix <- getIcon IError 24
|
||||
|
||||
fsState <- readPath' "/" >>= newTVarIO
|
||||
fsState <- readPath' startdir >>= newTVarIO
|
||||
|
||||
operationBuffer <- newTVarIO (Right None)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user