Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use auto-start value from config

Signed-off-by: Christopher Hall <hsw@ms2.hinet.net>
  • Loading branch information...
commit aff5bd0acc7b42b19760889a65380b8daf106cd4 1 parent 77c3796
@hxw authored
Showing with 5 additions and 7 deletions.
  1. +5 −7 TerminalUI.hs
View
12 TerminalUI.hs
@@ -42,7 +42,7 @@ run (orient, tabList, buttonList) = do
-- create all the initial table
mapM_ (\tab -> do
let (title, start, dir, command, sendList) = tab
- addPane notebook title dir command) tabList
+ addPane notebook title start dir command) tabList
-- create buttons
-- ***TODO*** ?? where to put? on a special tab?
@@ -73,15 +73,13 @@ exitNotice = do
putStrLn $ "exit " ++ (show response)
-addPane :: GTK.Notebook -> String -> Maybe String -> CP.CommandList -> IO Int
-addPane notebook title dir commandList = do
+addPane :: GTK.Notebook -> String -> Bool -> Maybe String -> CP.CommandList -> IO Int
+addPane notebook title autoStart dir commandList = do
vbox <- GTK.vBoxNew False 0
GTK.widgetSetCanFocus vbox False
GTK.widgetShowAll vbox
- let auto = True
-
-- create a socket and put it in the Vbox
socket <- GTK.socketNew
GTK.widgetSetCanFocus socket True
@@ -92,7 +90,7 @@ addPane notebook title dir commandList = do
GTK.on sb GTK.buttonActivated $ press sb socket title dir commandList
GTK.containerAdd vbox sb
- if auto
+ if autoStart
then return ()
else GTK.widgetShowAll sb
@@ -103,7 +101,7 @@ addPane notebook title dir commandList = do
GTK.on socket GTK.socketPlugRemoved $ unplug sb socket
GTK.on socket GTK.socketPlugAdded $ plug socket
- if auto
+ if autoStart
then runC socket title dir commandList
else return ()
Please sign in to comment.
Something went wrong with that request. Please try again.