File tree Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,7 @@ import Data.Maybe
21
21
import Control.Monad
22
22
import System.Directory
23
23
import System.Directory (doesDirectoryExist )
24
- import Data.List.Utils (elemRIndex )
25
- import Data.List (isInfixOf )
24
+ import Data.List (findIndex )
26
25
import Paths_vcsgui (getDataFileName )
27
26
28
27
import VCSGui.Common.Error
@@ -241,15 +240,12 @@ initSetupRepoGui mbConfig gui = do
241
240
H. set (entRepo gui) $ path
242
241
availableVCS <- discoverVCS path
243
242
H. set (comboBoxVCSType gui) $ map (\ vcs -> show vcs) availableVCS
244
- if isInfixOf [vcsType] availableVCS
245
- then do
246
- -- get position (hopefully always index in liststore = index in list)
247
- let index = elemRIndex vcsType availableVCS
248
-
249
- -- set active
250
- comboBoxSetActive (H. getItem (comboBoxVCSType gui)) $ fromMaybe (- 1 ) index
251
- else do
252
- return ()
243
+ -- get position (hopefully always index in liststore = index in list)
244
+ case findIndex (== vcsType) availableVCS of
245
+ Just index ->
246
+ -- set active
247
+ comboBoxSetActive (H. getItem (comboBoxVCSType gui)) index
248
+ _ -> return ()
253
249
case mbExec of
254
250
Nothing -> do
255
251
H. set (checkbtExec gui) False
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ flag gtk3
34
34
default : True
35
35
36
36
library
37
- build-depends : MissingH >= 1.1.0.3 && < 1.3 ,
37
+ build-depends :
38
38
filepath >= 1.2.0.0 && < 1.4 ,
39
39
base >= 4.0.0.0 && < 4.8 ,
40
40
directory >= 1.1.0.0 && < 1.3 ,
@@ -63,7 +63,7 @@ library
63
63
64
64
executable vcsgui
65
65
main-is : Main.hs
66
- build-depends : MissingH >= 1.1.0.3 && < 1.3 ,
66
+ build-depends :
67
67
filepath >= 1.2.0.0 && < 1.4 ,
68
68
base >= 4.0.0.0 && < 4.8 ,
69
69
directory >= 1.1.0.0 && < 1.3 ,
@@ -91,7 +91,7 @@ executable vcsgui
91
91
92
92
executable vcsgui-askpass
93
93
main-is : Main.hs
94
- build-depends : MissingH >= 1.1.0.3 && < 1.3 ,
94
+ build-depends :
95
95
filepath >= 1.2.0.0 && < 1.4 ,
96
96
base >= 4.0.0.0 && < 4.8 ,
97
97
directory >= 1.1.0.0 && < 1.3 ,
You can’t perform that action at this time.
0 commit comments