fix regression #875 and build system
This commit is contained in:
parent
255f7c8eac
commit
04b29b0b98
@ -118,8 +118,8 @@ navigationHandler :: BrickEvent Name e -> EventM Name BrickState ()
|
|||||||
navigationHandler ev = do
|
navigationHandler ev = do
|
||||||
AppState { keyBindings = kb } <- liftIO $ readIORef Actions.settings'
|
AppState { keyBindings = kb } <- liftIO $ readIORef Actions.settings'
|
||||||
case ev of
|
case ev of
|
||||||
inner_event@(VtyEvent (Vty.EvKey key _)) ->
|
inner_event@(VtyEvent (Vty.EvKey key mods)) ->
|
||||||
case find (\(key', _, _) -> key' == KeyCombination key []) (Actions.keyHandlers kb) of
|
case find (\(key', _, _) -> key' == KeyCombination key mods) (Actions.keyHandlers kb) of
|
||||||
Just (_, _, handler) -> handler
|
Just (_, _, handler) -> handler
|
||||||
Nothing -> void $ Common.zoom appState $ Navigation.handler inner_event
|
Nothing -> void $ Common.zoom appState $ Navigation.handler inner_event
|
||||||
inner_event -> Common.zoom appState $ Navigation.handler inner_event
|
inner_event -> Common.zoom appState $ Navigation.handler inner_event
|
||||||
|
@ -44,7 +44,7 @@ import Prelude hiding ( appendFile )
|
|||||||
import Optics.TH (makeLenses)
|
import Optics.TH (makeLenses)
|
||||||
import qualified GHCup.Brick.Common as Common
|
import qualified GHCup.Brick.Common as Common
|
||||||
import GHCup.Types
|
import GHCup.Types
|
||||||
( KeyCombination, BuildSystem(Hadrian), VersionPattern )
|
( KeyCombination, BuildSystem(..), VersionPattern )
|
||||||
import URI.ByteString (URI)
|
import URI.ByteString (URI)
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import qualified Data.ByteString.UTF8 as UTF8
|
import qualified Data.ByteString.UTF8 as UTF8
|
||||||
@ -152,7 +152,7 @@ create k = Menu.createMenu CompileGHCBox initialState k buttons fields
|
|||||||
where
|
where
|
||||||
readSys i
|
readSys i
|
||||||
| T.toLower i == "hadrian" = Right $ Just Hadrian
|
| T.toLower i == "hadrian" = Right $ Just Hadrian
|
||||||
| T.toLower i == "make" = Right $ Just Hadrian
|
| T.toLower i == "make" = Right $ Just Make
|
||||||
| otherwise = Left "Not a valid Build System"
|
| otherwise = Left "Not a valid Build System"
|
||||||
|
|
||||||
fields =
|
fields =
|
||||||
@ -181,11 +181,11 @@ create k = Menu.createMenu CompileGHCBox initialState k buttons fields
|
|||||||
, Menu.createEditableField (Common.MenuElement Common.OvewrwiteVerEditBox) versionV overwriteVer
|
, Menu.createEditableField (Common.MenuElement Common.OvewrwiteVerEditBox) versionV overwriteVer
|
||||||
& Menu.fieldLabelL .~ "overwrite-version"
|
& Menu.fieldLabelL .~ "overwrite-version"
|
||||||
& Menu.fieldHelpMsgL .~ "Allows to overwrite the finally installed VERSION with a different one"
|
& Menu.fieldHelpMsgL .~ "Allows to overwrite the finally installed VERSION with a different one"
|
||||||
, Menu.createEditableField (Common.MenuElement Common.BuildFlavourEditBox) (Right . Just . T.unpack) buildFlavour
|
|
||||||
& Menu.fieldLabelL .~ "flavour"
|
|
||||||
& Menu.fieldHelpMsgL .~ "Set the compile build flavour (this value depends on the build system type: 'make' vs 'hadrian')"
|
|
||||||
, Menu.createEditableField (Common.MenuElement Common.BuildSystemEditBox) systemV buildSystem
|
, Menu.createEditableField (Common.MenuElement Common.BuildSystemEditBox) systemV buildSystem
|
||||||
& Menu.fieldLabelL .~ "build system"
|
& Menu.fieldLabelL .~ "build system"
|
||||||
|
& Menu.fieldHelpMsgL .~ "either 'make' or 'hadrian'"
|
||||||
|
, Menu.createEditableField (Common.MenuElement Common.BuildFlavourEditBox) (Right . Just . T.unpack) buildFlavour
|
||||||
|
& Menu.fieldLabelL .~ "flavour"
|
||||||
& Menu.fieldHelpMsgL .~ "Set the compile build flavour (this value depends on the build system type: 'make' vs 'hadrian')"
|
& Menu.fieldHelpMsgL .~ "Set the compile build flavour (this value depends on the build system type: 'make' vs 'hadrian')"
|
||||||
, Menu.createEditableField (Common.MenuElement Common.IsolateEditBox) filepathV isolateDir
|
, Menu.createEditableField (Common.MenuElement Common.IsolateEditBox) filepathV isolateDir
|
||||||
& Menu.fieldLabelL .~ "isolated"
|
& Menu.fieldLabelL .~ "isolated"
|
||||||
|
Loading…
Reference in New Issue
Block a user