vcsgui 0.0.4 → 0.1.0.0
raw patch · 22 files changed
+207/−137 lines, 22 filesdep +textdep ~gtkdep ~gtk3dep ~mtlnew-uploader
Dependencies added: text
Dependency ranges changed: gtk, gtk3, mtl, vcswrapper
Files
- src/VCSGui/Common/Commit.hs +11/−8
- src/VCSGui/Common/ConflictsResolved.hs +1/−0
- src/VCSGui/Common/Error.hs +4/−2
- src/VCSGui/Common/ExceptionHandler.hs +4/−1
- src/VCSGui/Common/FilesInConflict.hs +13/−9
- src/VCSGui/Common/GtkHelper.hs +39/−36
- src/VCSGui/Common/Helpers.hs +8/−0
- src/VCSGui/Common/Log.hs +15/−11
- src/VCSGui/Common/Process.hs +10/−7
- src/VCSGui/Common/SetupConfig.hs +15/−11
- src/VCSGui/Git/Commit.hs +9/−6
- src/VCSGui/Git/Helpers.hs +6/−2
- src/VCSGui/Git/Log.hs +11/−7
- src/VCSGui/Git/Pull.hs +3/−1
- src/VCSGui/Mercurial/Commit.hs +9/−6
- src/VCSGui/Svn/AskPassword.hs +4/−2
- src/VCSGui/Svn/Checkout.hs +3/−0
- src/VCSGui/Svn/Commit.hs +10/−6
- src/VCSGui/Svn/Log.hs +7/−4
- src/VCSGui/Svn/Update.hs +3/−1
- src/exe/askpass/Main.hs +3/−1
- vcsgui.cabal +19/−16
src/VCSGui/Common/Commit.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : Main@@ -30,6 +31,8 @@ import Control.Monad.Reader import Data.Maybe import Paths_vcsgui(getDataFileName)+import qualified Data.Text as T (unpack, pack)+import Data.Text (Text) -- -- glade path and object accessors@@ -47,7 +50,7 @@ -- -- | This function will be called after the ok action is called.-type OkCallBack = String -- ^ Commit message as specified in the GUI.+type OkCallBack = Text -- ^ Commit message as specified in the GUI. -> [FilePath] -- ^ List of 'FilePath's of the files that were selected. -> [Option] -- ^ options (this is currently not implemented i.e. '[]' is passed) -> Wrapper.Ctx ()@@ -66,8 +69,8 @@ } -- | Represents a file which can be selected for commiting.-data SCFile = GITSCFile Bool FilePath String |- SVNSCFile Bool FilePath String Bool+data SCFile = GITSCFile Bool FilePath Text |+ SVNSCFile Bool FilePath Text Bool deriving (Show) -- | Return 'True' if the 'SCFile' is flagged as selected.@@ -81,7 +84,7 @@ filePath (SVNSCFile _ fp _ _) = fp -- | Return the status of this file.-status :: SCFile -> String+status :: SCFile -> Text status (GITSCFile _ _ s) = s status (SVNSCFile _ _ s _) = s @@ -92,7 +95,7 @@ -- | Options to the 'OkCallBack'.-type Option = String+type Option = Text -- | Display a window to enter a commit message and select files to be commited.@@ -150,7 +153,7 @@ return (selectedFiles) getTreeViewFromGladeCustomStore :: Builder- -> String+ -> Text -> TreeViewSetter -> Wrapper.Ctx (H.TreeViewItem SCFile) getTreeViewFromGladeCustomStore builder name setupListStore = do@@ -166,9 +169,9 @@ wrapWidget :: GObjectClass objClass => Builder -> (GObject -> objClass)- -> String -> IO (String, objClass)+ -> Text -> IO (Text, objClass) wrapWidget builder cast name = do- putStrLn $ " cast " ++ name+ putStrLn $ " cast " ++ T.unpack name gobj <- builderGetObject builder cast name return (name, gobj)
src/VCSGui/Common/ConflictsResolved.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Common.ConflictsResolved
src/VCSGui/Common/Error.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Common.Error@@ -15,11 +16,12 @@ module VCSGui.Common.Error ( showErrorGUI ) where-import Graphics.UI.Gtk +import Graphics.UI.Gtk+import Data.Text (Text) -- | Displays a simple window displaying given 'String' as an error message.-showErrorGUI :: String -- ^ Message to display.+showErrorGUI :: Text -- ^ Message to display. -> IO () showErrorGUI msg = do dialog <- messageDialogNew Nothing [] MessageError ButtonsOk msg
src/VCSGui/Common/ExceptionHandler.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Common.ExceptionHandler@@ -20,6 +21,8 @@ import VCSWrapper.Common import VCSGui.Common.Error+import qualified Data.Text as T (unwords, unlines)+import Data.Monoid ((<>)) -- | Wraps an IO computation to display an error message if a 'VCSException' occurs.@@ -30,7 +33,7 @@ case o of Left (VCSException exitCode out err repoLocation (cmd:opts)) -> do putStrLn $ "exception caught"- showErrorGUI $ unlines ["An error occured.", err, "Details:", "command: " ++ cmd, "options: " ++ unwords opts]+ showErrorGUI $ T.unlines ["An error occured.", err, "Details:", "command: " <> cmd, "options: " <> T.unwords opts] Right _ -> do putStrLn $ "no exception" return ()
src/VCSGui/Common/FilesInConflict.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Common.FilesInConflict@@ -28,6 +30,8 @@ import Control.Monad import Control.Monad.Reader import Paths_vcsgui(getDataFileName)+import Data.Text (Text)+import qualified Data.Text as T (unpack, pack) -- -- glade path and object accessors@@ -93,7 +97,7 @@ gui <- loadGUI $ setUpTreeView cwd filesInConflict filesToResolveGetter resolveMarker eMergeToolSetter mbMergeToolSetter <- case eMergeToolSetter of Left (Merge.MergeTool path) -> do- liftIO $ H.set (entPath gui) path+ liftIO $ H.set (entPath gui) $ T.pack path return Nothing Right setter -> return $ Just setter @@ -111,7 +115,7 @@ Nothing -> return () Just path -> do -- update gui- H.set (entPath gui) path+ H.set (entPath gui) $ T.pack path -- call setter case mbMergeToolSetter of Nothing -> return ()@@ -154,7 +158,7 @@ H.addColumnToTreeView' treeViewItem renderer "File"- $ \scf -> [cellText := filePath scf]+ $ \scf -> [cellText := T.pack $ filePath scf] renderer <- cellRendererToggleNew H.addColumnToTreeView' treeViewItem@@ -163,7 +167,7 @@ $ \scf -> [cellToggleActive := isResolved scf] -- connect select action- on renderer cellToggled $ \columnId -> do+ on renderer cellToggled $ \(columnId :: Text) -> do putStrLn $ "Checkbutton clicked at column " ++ (show columnId) --TODO only call tool if button is not checked, move this code to being called if a click on row is received let callTool' = (\path -> Wrapper.runVcs config $ callTool columnId listStore path)@@ -181,7 +185,7 @@ Just treeIter <- liftIO $ treeModelGetIterFromString listStore columnId value <- liftIO $ listStoreGetValue listStore $ listStoreIterToIndex treeIter filesToResolve <- filesToResolveGetter $ filePath value- resolvedByTool <- liftIO $ Process.exec mbcwd pathToTool filesToResolve+ resolvedByTool <- liftIO $ Process.exec mbcwd pathToTool $ map T.pack filesToResolve let setResolved' = setResolved listStore treeIter value case resolvedByTool of False -> ConflictsResolvedGUI.showConflictsResolvedGUI@@ -203,7 +207,7 @@ ---- getTreeViewFromGladeCustomStore :: Builder- -> String+ -> Text -> (TreeView -> Wrapper.Ctx (ListStore SCFile)) -- ^ fn defining how to setup the liststore -> Wrapper.Ctx (H.TreeViewItem SCFile) getTreeViewFromGladeCustomStore builder name setupListStore = do@@ -219,9 +223,9 @@ wrapWidget :: GObjectClass objClass => Builder -> (GObject -> objClass)- -> String -> IO (String, objClass)+ -> Text -> IO (Text, objClass) wrapWidget builder cast name = do- putStrLn $ " cast " ++ name+ putStrLn $ " cast " ++ T.unpack name gobj <- builderGetObject builder cast name return (name, gobj) @@ -244,7 +248,7 @@ -- HELPER -- | shows a dialog to choose a folder, returns Just FilePath to folder if succesfull, Nothing if cancelled-showFolderChooserDialog :: String -- ^ title of the window+showFolderChooserDialog :: Text -- ^ title of the window -> Window -- ^ parent window -> FileChooserAction -> IO (Maybe FilePath)
src/VCSGui/Common/GtkHelper.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Common.GtkHelper@@ -65,35 +66,37 @@ import System.Directory import Control.Monad.Trans(liftIO) import System.IO (hPutStrLn, stderr)-import VCSGui.Common.Helpers (emptyListToNothing)+import VCSGui.Common.Helpers (emptyTextToNothing)+import Data.Text (Text)+import qualified Data.Text as T (unpack) -- Typesynonyms-type WindowItem = (String, Gtk.Window, ())-type ActionItem = (String, Gtk.Action, ())-type LabelItem = (String, Gtk.Label, (IO (Maybe String), String -> IO ()))-type TextEntryItem = (String, Gtk.Entry, (IO (Maybe String), String -> IO ()))-type ComboBoxItem = (String, Gtk.ComboBox, (IO (Maybe String), [String] -> IO ()))-type TextViewItem = (String, Gtk.TextView, (IO (Maybe String), String -> IO ()))-type TreeViewItem a = (String, (Gtk.ListStore a, Gtk.TreeView), (IO (Maybe [a]), [a] -> IO ()))-type CheckButtonItem = (String, Gtk.CheckButton, (IO Bool, Bool -> IO()))-type ButtonItem = (String, Gtk.Button, (IO String, String -> IO()))+type WindowItem = (Text, Gtk.Window, ())+type ActionItem = (Text, Gtk.Action, ())+type LabelItem = (Text, Gtk.Label, (IO (Maybe Text), Text -> IO ()))+type TextEntryItem = (Text, Gtk.Entry, (IO (Maybe Text), Text -> IO ()))+type ComboBoxItem = (Text, Gtk.ComboBox, (IO (Maybe Text), [Text] -> IO ()))+type TextViewItem = (Text, Gtk.TextView, (IO (Maybe Text), Text -> IO ()))+type TreeViewItem a = (Text, (Gtk.ListStore a, Gtk.TreeView), (IO (Maybe [a]), [a] -> IO ()))+type CheckButtonItem = (Text, Gtk.CheckButton, (IO Bool, Bool -> IO()))+type ButtonItem = (Text, Gtk.Button, (IO Text, Text -> IO())) -- Type accessors -- | return the name of this item (as in the gladefile)-getName :: (String, a, b) -> String+getName :: (Text, a, b) -> Text getName (n, _, _) = n -- | return the Gtk object wrapped by given item-getItem :: (String, a, b) -> a+getItem :: (Text, a, b) -> a getItem (_, item, _) = item -- | call teh get method of an *Item-get :: (String, a, (b, c)) -> b+get :: (Text, a, (b, c)) -> b get (_, _, (getter, _)) = getter -- | call the set method of an *Item-set :: (String, a, (b, c)) -> c+set :: (Text, a, (b, c)) -> c set (_,_, (_, setter)) = setter @@ -111,7 +114,7 @@ -- | Get a 'WindowItem' from a gladefile. getWindowFromGlade :: Gtk.Builder- -> String -- ^ name of the window to get as specified in the gladefile.+ -> Text -- ^ name of the window to get as specified in the gladefile. -> IO WindowItem getWindowFromGlade builder name = do (a, b) <- wrapWidget builder Gtk.castToWindow name@@ -119,7 +122,7 @@ -- | Get an 'ActionItem' from a gladefile. getActionFromGlade :: Gtk.Builder- -> String -- ^ name of the action to get as specified in the gladefile.+ -> Text -- ^ name of the action to get as specified in the gladefile. -> IO ActionItem getActionFromGlade builder name = do (a, b) <- wrapWidget builder Gtk.castToAction name@@ -127,42 +130,42 @@ -- | Get an 'LabelItem' from a gladefile. getLabelFromGlade :: Gtk.Builder- -> String -- ^ name of the label to get as specified in the gladefile.+ -> Text -- ^ name of the label to get as specified in the gladefile. -> IO LabelItem getLabelFromGlade builder name = do (_, entry) <- wrapWidget builder Gtk.castToLabel name- let getter = error "don't call get on a gtk label!" :: IO (Maybe String)+ let getter = error "don't call get on a gtk label!" :: IO (Maybe Text) setter val = Gtk.labelSetText entry val :: IO () return (name, entry, (getter, setter)) -- | Get a 'ButtonItem' from a gladefile. getButtonFromGlade :: Gtk.Builder- -> String -- ^ name of the button to get as specified in the gladefile.+ -> Text -- ^ name of the button to get as specified in the gladefile. -> IO ButtonItem getButtonFromGlade builder name = do (_,btn) <- wrapWidget builder Gtk.castToButton name- let getter = Gtk.buttonGetLabel btn :: IO String+ let getter = Gtk.buttonGetLabel btn :: IO Text setter val = Gtk.buttonSetLabel btn val return (name, btn, (getter,setter)) -- | Get a 'TextEntryItem' from a gladefile. getTextEntryFromGlade :: Gtk.Builder- -> String -- ^ name of the text entry to get as specified in the gladefile.+ -> Text -- ^ name of the text entry to get as specified in the gladefile. -> IO TextEntryItem getTextEntryFromGlade builder name = do (_, entry) <- wrapWidget builder Gtk.castToEntry name- let getter = fmap emptyListToNothing $ Gtk.entryGetText entry :: IO (Maybe String)+ let getter = fmap emptyTextToNothing $ Gtk.entryGetText entry :: IO (Maybe Text) setter val = Gtk.entrySetText entry val :: IO () return (name, entry, (getter, setter)) -- | Get a 'ComboBoxItem' from a gladefile. getComboBoxFromGlade :: Gtk.Builder- -> String -- ^ name of the combo box to get as specified in the gladefile.+ -> Text -- ^ name of the combo box to get as specified in the gladefile. -> IO ComboBoxItem getComboBoxFromGlade builder name = do (_, combo) <- wrapWidget builder Gtk.castToComboBox name Gtk.comboBoxSetModelText combo- let getter = Gtk.comboBoxGetActiveText combo :: IO (Maybe String) -- get selected text+ let getter = Gtk.comboBoxGetActiveText combo :: IO (Maybe Text) -- get selected text setter entries = do -- fill with new entries store <- Gtk.comboBoxGetModelText combo Gtk.listStoreClear store@@ -172,13 +175,13 @@ -- | Get a 'TextViewItem' from a gladefile. getTextViewFromGlade :: Gtk.Builder- -> String -- ^ name of the text view to get as specified in the gladefile.+ -> Text -- ^ name of the text view to get as specified in the gladefile. -> IO TextViewItem getTextViewFromGlade builder name = do (_, entry) <- wrapWidget builder Gtk.castToTextView name buffer <- Gtk.textViewGetBuffer entry- let getter = getLongText buffer :: IO (Maybe String)- setter = (\text -> Gtk.textBufferSetText buffer text) :: String -> IO ()+ let getter = getLongText buffer :: IO (Maybe Text)+ setter = (\text -> Gtk.textBufferSetText buffer text) :: Text -> IO () return (name, entry, (getter, setter)) where getLongText buffer = do@@ -191,7 +194,7 @@ -- | Get a 'CheckButtonItem' from a gladefile. getCheckButtonFromGlade :: Gtk.Builder- -> String -- ^ name of the check button to get as specified in the gladefile.+ -> Text -- ^ name of the check button to get as specified in the gladefile. -> IO CheckButtonItem getCheckButtonFromGlade builder name = do (_,bt) <- wrapWidget builder Gtk.castToCheckButton name@@ -205,7 +208,7 @@ -- | Get a 'TreeViewItem' from a gladefile. getTreeViewFromGlade :: Gtk.Builder- -> String -- ^ name of the tree view to get as specified in the gladefile.+ -> Text -- ^ name of the tree view to get as specified in the gladefile. -> [a] -- ^ Content of the new tree view. -> IO (TreeViewItem a) getTreeViewFromGlade builder name rows = do@@ -217,7 +220,7 @@ -- | Get a 'TreeViewItem' from a gladefile. getTreeViewFromGladeCustomStore :: Gtk.Builder- -> String -- ^ name of the tree view to get as specified in the gladefile.+ -> Text -- ^ name of the tree view to get as specified in the gladefile. -> (Gtk.TreeView -> IO (Gtk.ListStore a)) -- ^ fn defining how to setup the liststore -> IO (TreeViewItem a) getTreeViewFromGladeCustomStore builder name setupListStore = do@@ -291,7 +294,7 @@ addColumnToTreeView :: Gtk.CellRendererClass r => TreeViewItem a -> r -- ^ CellRenderer- -> String -- ^ title+ -> Text -- ^ title -> (a -> [Gtk.AttrOp r]) -- ^ mapping -> IO () addColumnToTreeView (_, item, _) = do@@ -306,7 +309,7 @@ addColumnToTreeView' :: Gtk.CellRendererClass r => (Gtk.ListStore a, Gtk.TreeView) -> r- -> String+ -> Text -> (a -> [Gtk.AttrOp r]) -> IO () addColumnToTreeView' (listStore, listView) renderer title value2attributes = do@@ -318,7 +321,7 @@ -- | Shortcut for adding text columns to a TreeView. See 'addColumnToTreeView'. addTextColumnToTreeView :: TreeViewItem a- -> String -- ^ title+ -> Text -- ^ title -> (a -> [Gtk.AttrOp Gtk.CellRendererText]) -- ^ mapping -> IO () addTextColumnToTreeView tree title map = do@@ -327,7 +330,7 @@ -- | Shortcut for adding text columns to a TreeView. See 'addColumnToTreeView\''. addTextColumnToTreeView' :: (Gtk.ListStore a, Gtk.TreeView)- -> String+ -> Text -> (a -> [Gtk.AttrOp Gtk.CellRendererText]) -> IO () addTextColumnToTreeView' item title map = do@@ -341,8 +344,8 @@ wrapWidget :: Gtk.GObjectClass objClass => Gtk.Builder -> (Gtk.GObject -> objClass)- -> String -> IO (String, objClass)+ -> Text -> IO (Text, objClass) wrapWidget builder cast name = do- hPutStrLn stderr $ " cast " ++ name+ hPutStrLn stderr $ " cast " ++ T.unpack name gobj <- Gtk.builderGetObject builder cast name return (name, gobj)
src/VCSGui/Common/Helpers.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Common.Helpers@@ -14,9 +15,16 @@ module VCSGui.Common.Helpers ( emptyListToNothing+ , emptyTextToNothing ) where +import Data.Text (Text)+ -- | Return 'Nothing' if given list is empty, 'Just' the list otherwise. emptyListToNothing :: [a] -> Maybe [a] emptyListToNothing [] = Nothing emptyListToNothing l = Just l++emptyTextToNothing :: Text -> Maybe Text+emptyTextToNothing "" = Nothing+emptyTextToNothing l = Just l
src/VCSGui/Common/Log.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Common.Log@@ -11,7 +13,6 @@ -- | Functions to show a log window. This mostly hides the window-building tasks from the specific VCS implementation. -- ------------------------------------------------------------------------------{-# LANGUAGE GeneralizedNewtypeDeriving #-} module VCSGui.Common.Log ( showLogGUI ) where@@ -26,11 +27,14 @@ import Data.Maybe (fromMaybe) import Paths_vcsgui(getDataFileName)+import Data.Text (Text)+import qualified Data.Text as T (pack)+import Data.Monoid ((<>)) getGladepath = getDataFileName "data/guiCommonLog.glade" data LogConfig a = LogConfig {- options :: [String]+ options :: [Text] ,treeViewSetter :: Gtk.TreeView -> TreeViewItem a } @@ -52,14 +56,14 @@ -- | Show the history of a repository. showLogGUI :: [Common.LogEntry] -- ^ logEntries to be displayed initially- -> [String]+ -> [Text] -- ^ options will be displayed in a menu as checkboxes (TODO this is currently not implemented)- -> Maybe ((String, [String]), (String -> Common.Ctx [Common.LogEntry]))+ -> Maybe ((Text, [Text]), (Text -> Common.Ctx [Common.LogEntry])) -- ^ (list of branchnames to display, Function called when a different branch is selected) -- -- The function will be called with the selected branchname to repopulate the displayed LogEntries. -- If 'Nothing', no branch selection will be displayed.- -> (Common.LogEntry -> Maybe String -> Common.Ctx ())+ -> (Common.LogEntry -> Maybe Text -> Common.Ctx ()) -- ^ (selected line, name of the branch to checkout from) -- -- This function is called on checkout action. The window will be closed afterwards.@@ -72,9 +76,9 @@ return () guiWithoutBranches :: [Common.LogEntry]- -> [String]+ -> [Text] -> (Common.LogEntry- -> (Maybe String)+ -> (Maybe Text) -> Common.Ctx ()) -> Bool -- ^ Add column to display branch name -> Common.Ctx LogGUI@@ -107,14 +111,14 @@ setupLogColumns gui displayBranchNames = do let item = (logTreeView gui) addTextColumnToTreeView item "Subject" (\Common.LogEntry { Common.subject = t } -> [Gtk.cellText Gtk.:= t])- addTextColumnToTreeView item "Author" (\Common.LogEntry { Common.author = t, Common.email = mail } -> [Gtk.cellText Gtk.:= (t ++ " <" ++ mail ++ ">")])+ addTextColumnToTreeView item "Author" (\Common.LogEntry { Common.author = t, Common.email = mail } -> [Gtk.cellText Gtk.:= t <> " <" <> mail <> ">"]) addTextColumnToTreeView item "Date" (\Common.LogEntry { Common.date = t } -> [Gtk.cellText Gtk.:= t]) case displayBranchNames of- True -> addTextColumnToTreeView item "Branch" (\Common.LogEntry { Common.mbBranch = t } -> [Gtk.cellText Gtk.:= (fromMaybe "" t)])+ True -> addTextColumnToTreeView item "Branch" (\Common.LogEntry { Common.mbBranch = t } -> [Gtk.cellText Gtk.:= fromMaybe "" t]) False -> return() return () -guiAddBranches :: LogGUI -> (String, [String]) -> (String -> Common.Ctx [Common.LogEntry]) -> Common.Ctx ()+guiAddBranches :: LogGUI -> (Text, [Text]) -> (Text -> Common.Ctx [Common.LogEntry]) -> Common.Ctx () guiAddBranches gui (curBranch, otherBranches) changeBranchFn = do -- set branch selection visible liftIO $ Gtk.set (getItem $ lblBranch gui) [Gtk.widgetVisible Gtk.:= True]@@ -130,7 +134,7 @@ liftIO $ Gtk.on (getItem $ comboBranch gui) Gtk.changed $ changeBranchFn' config (fmap (fromMaybe "") $ get $ comboBranch gui) return () where- changeBranchFn' :: Common.Config -> IO String -> IO ()+ changeBranchFn' :: Common.Config -> IO Text -> IO () changeBranchFn' cfg branchIO = do let (store, view) = getItem $ logTreeView gui branch <- branchIO
src/VCSGui/Common/Process.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Common.Process@@ -22,11 +23,13 @@ import Control.Concurrent import Control.Monad.Reader import qualified Control.Exception as Exc+import Data.Text (Text)+import qualified Data.Text as T (pack, unpack) -- | Internal function to execute a vcs command exec :: Maybe FilePath -- ^ working directory or Nothing if not set- -> String -- ^ mergetool command, e.g. kdiff3.sh- -> [String] -- ^ files, last one is output+ -> Text -- ^ mergetool command, e.g. kdiff3.sh+ -> [Text] -- ^ files, last one is output -> IO Bool exec mcwd cmd opts = do (ec, out, err) <- readProc mcwd cmd opts@@ -36,12 +39,12 @@ -- | same as readProcessWithExitCode but having a configurable cwd and env, readProc :: Maybe FilePath --working directory or Nothing if not set- -> String --command- -> [String] -- ^ files, last one is output- -> IO (ExitCode, String, String)+ -> Text --command+ -> [Text] -- ^ files, last one is output+ -> IO (ExitCode, Text, Text) readProc mcwd cmd files = do putStrLn $ "Executing process, mcwd: "++show mcwd++"cmd: "++show cmd++",files: "++show files- (_, Just outh, Just errh, pid) <- createProcess (proc cmd files)+ (_, Just outh, Just errh, pid) <- createProcess (proc (T.unpack cmd) (map T.unpack files)) { std_out = CreatePipe, std_err = CreatePipe, cwd = mcwd@@ -63,6 +66,6 @@ hClose errh ex <- waitForProcess pid- return (ex, out, err)+ return (ex, T.pack out, T.pack err)
src/VCSGui/Common/SetupConfig.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Common.SetupConfig@@ -28,6 +29,9 @@ import qualified VCSGui.Common.GtkHelper as H import qualified VCSGui.Common.MergeTool as MergeTool import qualified VCSWrapper.Common as Wrapper+import Data.Text (Text)+import qualified Data.Text as T (unpack, pack)+import Control.Applicative ((<$>)) type Config = Maybe (Wrapper.VCSType, Wrapper.Config, Maybe MergeTool.MergeTool) --config for setting up vcs@@ -138,16 +142,16 @@ Just path -> do -- discover vcs availableVCS <- discoverVCS path- H.set (comboBoxVCSType gui) $ map (\vcs -> show vcs) availableVCS+ H.set (comboBoxVCSType gui) $ map (T.pack . show) availableVCS -- update gui- H.set (entRepo gui) path+ H.set (entRepo gui) (T.pack path) return () on (H.getItem (actBrowseExec gui)) actionActivated $ liftIO $ do mbExec <- showFolderChooserDialog "Choose executable location" (H.getItem $ winSetupRepo gui) FileChooserActionOpen case mbExec of Nothing -> return () Just exec -> do- H.set (entExec gui) exec+ H.set (entExec gui) (T.pack exec) H.set (checkbtExec gui) True return () @@ -183,12 +187,12 @@ Nothing -> return () Just path -> do -- update gui- H.set (entPathToTool gui) path+ H.set (entPathToTool gui) (T.pack path) return () return () where- createVCSTypAndConfig :: SetupRepoGUI -> IO (Either String (Wrapper.VCSType, Wrapper.Config, Maybe MergeTool.MergeTool))+ createVCSTypAndConfig :: SetupRepoGUI -> IO (Either Text (Wrapper.VCSType, Wrapper.Config, Maybe MergeTool.MergeTool)) createVCSTypAndConfig gui = do path <- H.get (entRepo gui) @@ -207,7 +211,7 @@ return (Nothing,Nothing) selectedVCSType <- H.get (comboBoxVCSType gui) mbPathToTool <- H.get (entPathToTool gui)- let tuple = createVCSTypAndConfig' path author mail exec selectedVCSType mbPathToTool+ let tuple = createVCSTypAndConfig' (T.unpack <$> path) author mail (T.unpack <$> exec) (T.unpack <$> selectedVCSType) (T.unpack <$> mbPathToTool) putStrLn $ "tuple"++show tuple return tuple where@@ -237,9 +241,9 @@ case mbPath of Nothing -> return () Just path -> do- H.set (entRepo gui) $ path+ H.set (entRepo gui) $ T.pack path availableVCS <- discoverVCS path- H.set (comboBoxVCSType gui) $ map (\vcs -> show vcs) availableVCS+ H.set (comboBoxVCSType gui) $ map (T.pack . show) availableVCS --get position (hopefully always index in liststore = index in list) case findIndex (== vcsType) availableVCS of Just index ->@@ -252,7 +256,7 @@ return () Just exec -> do H.set (checkbtExec gui) True- H.set (entExec gui) $ exec+ H.set (entExec gui) $ T.pack exec case mbAuthor of Nothing -> do@@ -264,7 +268,7 @@ H.set (entEmail gui) $ fromMaybe "" email case mbMergeTool of Nothing -> return()- Just mergeTool -> H.set (entPathToTool gui) (MergeTool.fullPath mergeTool)+ Just mergeTool -> H.set (entPathToTool gui) (T.pack $ MergeTool.fullPath mergeTool) return () @@ -296,7 +300,7 @@ _ -> Wrapper.SVN --TODO throw error on this, improve this code -- | shows a dialog to choose a folder, returns Just FilePath to folder if succesfull, Nothing if cancelled-showFolderChooserDialog :: String -- ^ title of the window+showFolderChooserDialog :: Text -- ^ title of the window -> Window -- ^ parent window -> FileChooserAction -> IO (Maybe FilePath)
src/VCSGui/Git/Commit.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Git.Commit@@ -26,9 +27,11 @@ import qualified VCSWrapper.Git as Git import qualified VCSWrapper.Common as Wrapper+import Data.Text (Text)+import qualified Data.Text as T (unpack, pack) -doCommit :: String -> [FilePath] -> [Commit.Option] -> Wrapper.Ctx ()+doCommit :: Text -> [FilePath] -> [Commit.Option] -> Wrapper.Ctx () doCommit commitMsg files _ = do Git.add files (Wrapper.Config _ _ mbAuthor _) <- ask@@ -49,9 +52,9 @@ setupListStore :: TreeView -> Wrapper.Ctx (ListStore Commit.SCFile) setupListStore view = do repoStatus <- Git.status- --GITSCFile Bool FilePath String- let selectedF = [Commit.GITSCFile True fp (show mod) | (Wrapper.GITStatus fp mod) <- repoStatus, mod == Wrapper.Modified || mod == Wrapper.Added]- notSelectedF = [Commit.GITSCFile False fp (show mod) | (Wrapper.GITStatus fp mod) <- repoStatus, mod /= Wrapper.Modified && mod /= Wrapper.Added]+ --GITSCFile Bool FilePath Text+ let selectedF = [Commit.GITSCFile True fp (T.pack $ show mod) | (Wrapper.GITStatus fp mod) <- repoStatus, mod == Wrapper.Modified || mod == Wrapper.Added]+ notSelectedF = [Commit.GITSCFile False fp (T.pack $ show mod) | (Wrapper.GITStatus fp mod) <- repoStatus, mod /= Wrapper.Modified && mod /= Wrapper.Added] liftIO $ do store <- listStoreNew (selectedF ++ notSelectedF)@@ -60,12 +63,12 @@ toggleRenderer <- cellRendererToggleNew addColumnToTreeView' item toggleRenderer "Commit" (\(Commit.GITSCFile s _ _)-> [cellToggleActive := s])- addTextColumnToTreeView' item "File" (\(Commit.GITSCFile _ p _) -> [cellText := p])+ addTextColumnToTreeView' item "File" (\(Commit.GITSCFile _ p _) -> [cellText := T.pack p]) addTextColumnToTreeView' item "File status" (\(Commit.GITSCFile _ _ m) -> [cellText := m]) -- register toggle renderer on toggleRenderer cellToggled $ \filepath -> do- putStrLn ("toggle called: " ++ filepath)+ putStrLn ("toggle called: " ++ T.unpack filepath) Just treeIter <- treeModelGetIterFromString store filepath value <- listStoreGetValue store $ listStoreIterToIndex treeIter
src/VCSGui/Git/Helpers.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Git.Helpers@@ -20,6 +21,8 @@ import Control.Monad.Reader.Class (asks, MonadReader(..)) import System.Environment (getEnvironment) import Control.Monad.Reader (liftIO)+import Control.Applicative ((<$>))+import qualified Data.Text as T (pack) {- | Adds a wrapper to the 'Ctx' so git can ask for a password using a GUI window.@@ -29,7 +32,8 @@ askPassWrapper :: Ctx () -> Ctx () askPassWrapper fn = do cfgEnv <- asks configEnvironment- inheritEnv <- liftIO $ getEnvironment+ inheritEnv <- map packPair <$> liftIO getEnvironment -- TODO better solution for DISPLAY? TODO will this work on windows? local (\cfg -> cfg {configEnvironment = ("GIT_ASKPASS", "vcsgui-askpass"):("DISPLAY", ":0.0"):inheritEnv ++ cfgEnv}) fn-+ where+ packPair (a, b) = (T.pack a, T.pack b)
src/VCSGui/Git/Log.hs view
@@ -1,4 +1,6 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Git.Log@@ -22,7 +24,9 @@ import qualified VCSWrapper.Git as Git import Control.Monad.Reader (liftIO) import Data.Maybe (fromMaybe)-import VCSGui.Common.Helpers (emptyListToNothing)+import VCSGui.Common.Helpers (emptyTextToNothing)+import qualified Data.Text as T (unpack, pack)+import Data.Text (Text) {- | Calls 'Common.showLogGUI' using Git. This will display all log entries. The branch to be displayed can be selected.@@ -42,22 +46,22 @@ liftIO $ putStrLn "checking out selected Branch" Git.checkout (Just selBranch) Nothing False -> do- liftIO $ putStrLn $ "checking out Commit " ++ (Git.commitID log) ++ ", asking for new branchname"+ liftIO $ putStrLn $ "checking out Commit " ++ (T.unpack $ Git.commitID log) ++ ", asking for new branchname" mbBranchname <- liftIO $ askForNewBranchname Git.checkout (Just $ Git.commitID log) (mbBranchname) - askForNewBranchname :: IO (Maybe String)+ askForNewBranchname :: IO (Maybe Text) askForNewBranchname = do dialog <- Gtk.dialogNew- Gtk.dialogAddButton dialog "gtk-ok" Gtk.ResponseOk-#if MIN_VERSION_gtk(0,13,0) || defined(MIN_VERSION_gtk3)+ Gtk.dialogAddButton dialog ("gtk-ok"::Text) Gtk.ResponseOk+#if defined(MIN_VERSION_gtk3) upper <- Gtk.dialogGetContentArea dialog #else upper <- Gtk.dialogGetUpper dialog #endif inputBranch <- Gtk.entryNew- lblBranch <- Gtk.labelNew $ Just "Enter a new branchname (empty for anonym branch):"+ lblBranch <- Gtk.labelNew $ Just ("Enter a new branchname (empty for anonym branch):" :: Text) box <- Gtk.hBoxNew False 2 Gtk.containerAdd (Gtk.castToBox upper) box Gtk.containerAdd box lblBranch@@ -67,7 +71,7 @@ _ <- Gtk.dialogRun dialog branchname <- Gtk.entryGetText inputBranch Gtk.widgetDestroy dialog- return $ emptyListToNothing branchname+ return $ emptyTextToNothing branchname
src/VCSGui/Git/Pull.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Git.Pull@@ -22,6 +23,7 @@ import qualified VCSWrapper.Common as Wrapper import VCSGui.Common.Error+import Data.Monoid ((<>)) -- | Call 'Git.pull'. If the pull fails or a merge conflict is detected an error message is shown.@@ -30,4 +32,4 @@ o <- Git.pull case o of Right () -> return ()- Left msg -> liftIO $ showErrorGUI $ "MERGE CONFLICT " ++ msg+ Left msg -> liftIO $ showErrorGUI $ "MERGE CONFLICT " <> msg
src/VCSGui/Mercurial/Commit.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Mercurial.Commit@@ -26,8 +27,10 @@ import qualified VCSWrapper.Mercurial as Mercurial import qualified VCSWrapper.Common as Wrapper+import Data.Text (Text)+import qualified Data.Text as T (pack, unpack) -doCommit :: String -> [FilePath] -> [Commit.Option] -> Wrapper.Ctx ()+doCommit :: Text -> [FilePath] -> [Commit.Option] -> Wrapper.Ctx () doCommit commitMsg files _ = do Mercurial.addremove files Mercurial.commit files commitMsg []@@ -44,9 +47,9 @@ setupListStore :: TreeView -> Wrapper.Ctx (ListStore Commit.SCFile) setupListStore view = do repoStatus <- Mercurial.status- --GITSCFile Bool FilePath String- let selectedF = [Commit.GITSCFile True fp (show mod) | (Wrapper.GITStatus fp mod) <- repoStatus, mod == Wrapper.Modified || mod == Wrapper.Added]- notSelectedF = [Commit.GITSCFile False fp (show mod) | (Wrapper.GITStatus fp mod) <- repoStatus, mod /= Wrapper.Modified && mod /= Wrapper.Added]+ --GITSCFile Bool FilePath Text+ let selectedF = [Commit.GITSCFile True fp (T.pack $ show mod) | (Wrapper.GITStatus fp mod) <- repoStatus, mod == Wrapper.Modified || mod == Wrapper.Added]+ notSelectedF = [Commit.GITSCFile False fp (T.pack $ show mod) | (Wrapper.GITStatus fp mod) <- repoStatus, mod /= Wrapper.Modified && mod /= Wrapper.Added] liftIO $ do store <- listStoreNew (selectedF ++ notSelectedF)@@ -55,12 +58,12 @@ toggleRenderer <- cellRendererToggleNew addColumnToTreeView' item toggleRenderer "Commit" (\(Commit.GITSCFile s _ _)-> [cellToggleActive := s])- addTextColumnToTreeView' item "File" (\(Commit.GITSCFile _ p _) -> [cellText := p])+ addTextColumnToTreeView' item "File" (\(Commit.GITSCFile _ p _) -> [cellText := T.pack p]) addTextColumnToTreeView' item "File status" (\(Commit.GITSCFile _ _ m) -> [cellText := m]) -- register toggle renderer on toggleRenderer cellToggled $ \filepath -> do- putStrLn ("toggle called: " ++ filepath)+ putStrLn ("toggle called: " ++ T.unpack filepath) Just treeIter <- treeModelGetIterFromString store filepath value <- listStoreGetValue store $ listStoreIterToIndex treeIter
src/VCSGui/Svn/AskPassword.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Svn.AskPassword@@ -28,6 +29,7 @@ import Control.Monad.Trans(liftIO) import Paths_vcsgui(getDataFileName) import Control.Monad.Reader(ask)+import Data.Text (Text) -- -- glade path and object accessors --@@ -38,7 +40,7 @@ accessorEntryPw = "entryPw" accessorCheckbtUsePw = "checkbtUsePw" accessorCheckbtSaveForSession = "checkbtSaveForSession"-accessorboxUsePwd = "boxUsePwd"+accessorboxUsePwd = ("boxUsePwd" :: Text) {- | 'Handler' is a function used as an argument to the 'showAskpassGUI'. It represents a VCS@@ -50,7 +52,7 @@ * Nothing, no password given * Just password, password has been provided -}-type Handler = ((Maybe (Bool, Maybe String))+type Handler = ((Maybe (Bool, Maybe Text)) -> Wrapper.Ctx()) data AskpassGUI = AskpassGUI {
src/VCSGui/Svn/Checkout.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Svn.Checkout@@ -24,6 +25,8 @@ import qualified VCSGui.Common.GtkHelper as H import Paths_vcsgui(getDataFileName) import Data.Maybe+import qualified Data.Text as T (unpack, pack)+import Control.Applicative ((<$>)) -- -- glade path and object accessors --
src/VCSGui/Svn/Commit.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : Main@@ -28,12 +30,14 @@ import Graphics.UI.Gtk import Control.Monad.Trans(liftIO)+import Data.Text (Text)+import qualified Data.Text as T (pack) {- | Shows a GUI showing status of subversion and possibilites to commit/cancel. -} showCommitGUI :: Either M.MergeTool M.MergeToolSetter -- ^ 'MergeTool' is used for any possible conflicts. If not present user will be asked to provide 'MergeTool' on conflicts. 'MergeToolSetter' will be called for response.- -> Either Handler (Maybe String) -- ^ Either 'Handler' for password request or password (nothing for no password)+ -> Either Handler (Maybe Text) -- ^ Either 'Handler' for password request or password (nothing for no password) -> Svn.Ctx() showCommitGUI eMergeToolSetter eitherHandlerOrPw = do conflictingFiles <- SvnH.getConflictingFiles@@ -50,8 +54,8 @@ commonCommit = C.showCommitGUI setUpTreeView (okCallback eitherHandlerOrPw) -okCallback :: Either Handler (Maybe String) -- ^ either callback for password request or password (nothing for no password)- -> String -- ^ commit message+okCallback :: Either Handler (Maybe Text) -- ^ either callback for password request or password (nothing for no password)+ -> Text -- ^ commit message -> [FilePath] -- ^ selected files -> [C.Option] -- ^ TODO options -> Svn.Ctx ()@@ -90,7 +94,7 @@ listStore <- listStoreNew [ (C.SVNSCFile (ctxSelect (Svn.modification status)) (Svn.filePath status)- (show (Svn.modification status))+ (T.pack . show $ Svn.modification status) (Svn.isLocked status)) | status <- repoStatus] treeViewSetModel listView listStore@@ -104,7 +108,7 @@ $ \scf -> [cellToggleActive := C.selected scf] -- connect select action- on renderer cellToggled $ \columnId -> do+ on renderer cellToggled $ \(columnId :: Text) -> do Just treeIter <- treeModelGetIterFromString listStore columnId value <- listStoreGetValue listStore $ listStoreIterToIndex treeIter let newValue = (\(C.SVNSCFile bool fp s l) -> C.SVNSCFile (not bool) fp s l)@@ -116,7 +120,7 @@ H.addColumnToTreeView' treeViewItem renderer "Files to commit"- $ \scf -> [cellText := C.filePath scf]+ $ \scf -> [cellText := T.pack $ C.filePath scf] renderer <- cellRendererTextNew H.addColumnToTreeView' treeViewItem
src/VCSGui/Svn/Log.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Svn.Log@@ -21,17 +22,19 @@ import qualified VCSWrapper.Svn as Svn import qualified VCSWrapper.Common as WC+import Data.Text (Text)+import qualified Data.Text as T (unpack) -- | Shows a GUI showing log for current working copy.-showLogGUI :: Either Handler (Maybe String) -- ^ Either 'Handler' for password request or password (nothing for no password)+showLogGUI :: Either Handler (Maybe Text) -- ^ Either 'Handler' for password request or password (nothing for no password) -> Svn.Ctx () showLogGUI eitherHandlerOrPw = do logEntries <- Svn.simpleLog C.showLogGUI logEntries [] Nothing (okCallback eitherHandlerOrPw) False -okCallback :: Either Handler (Maybe String) -- ^ either callback for password request or password (nothing for no password)+okCallback :: Either Handler (Maybe Text) -- ^ either callback for password request or password (nothing for no password) -> WC.LogEntry -- ^ chosen logentry- -> Maybe String -- ^ chosen branch name+ -> Maybe Text -- ^ chosen branch name -> WC.Ctx() okCallback eitherHandlerOrPw logEntry _ = do case eitherHandlerOrPw of@@ -53,6 +56,6 @@ doRevert logEntry mbPw = do Svn.mergeHeadToRevision (revision logEntry) mbPw [] return()- revision logEntry = read $ Svn.commitID logEntry :: Integer+ revision logEntry = read . T.unpack $ Svn.commitID logEntry :: Integer
src/VCSGui/Svn/Update.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : VCSGui.Svn.Update@@ -26,10 +27,11 @@ import qualified VCSWrapper.Common as Wrapper import Control.Monad.Trans(liftIO)+import Data.Text (Text) -- | Initiates an update for current SVN working copy. showUpdateGUI :: Either M.MergeTool M.MergeToolSetter -- ^ 'MergeTool' is used for any possible conflicts. If not present user will be asked to provide 'MergeTool' on conflicts after updating. 'MergeToolSetter' will be called for response.- -> Either AskPassword.Handler (Maybe String) -- ^ If a password is provided it will be used, if not a GUI will be shown to ask for password and given @Handler@ will be called.+ -> Either AskPassword.Handler (Maybe Text) -- ^ If a password is provided it will be used, if not a GUI will be shown to ask for password and given @Handler@ will be called. -> Wrapper.Ctx() showUpdateGUI eMergeToolSetter (Left handler) = do AskPassword.showAskpassGUI $ ownHandler eMergeToolSetter handler
src/exe/askpass/Main.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : Main@@ -22,6 +23,7 @@ import Data.Maybe (fromMaybe) import Paths_vcsgui(getDataFileName)+import qualified Data.Text as T (unpack) -- -- glade path and object accessors --@@ -56,7 +58,7 @@ H.registerQuitAction $ actCancel gui on (H.getItem (actOk gui)) actionActivated $ do pw <- H.get (entryPw gui)- putStr $ fromMaybe "" pw+ putStr . T.unpack $ fromMaybe "" pw mainQuit -- present window widgetShowAll $ H.getItem $ window gui
vcsgui.cabal view
@@ -1,5 +1,5 @@ name: vcsgui-version: 0.0.4+version: 0.1.0.0 cabal-version: >= 1.8 build-type: Simple license: GPL@@ -38,14 +38,15 @@ filepath >=1.2.0.0 && < 1.4, base >=4.0.0.0 && <4.8, directory >=1.1.0.0 && <1.3,- mtl >=2.0.1.0 && <2.2,- vcswrapper ==0.0.4,- process >=1.0.1.5 && <1.3+ mtl >=2.0.1.0 && <2.3,+ vcswrapper ==0.1.0,+ process >=1.0.1.5 && <1.3,+ text -any if flag(gtk3)- build-depends: gtk3 >=0.12.4 && <0.13+ build-depends: gtk3 >=0.13.0.0 && <0.14 cpp-options: -DMIN_VERSION_gtk=MIN_VERSION_gtk3 else- build-depends: gtk >=0.12.4 && <0.13+ build-depends: gtk >=0.13.0.0 && <0.14 exposed-modules: VCSGui.Common VCSGui.Git VCSGui.Svn VCSGui.Mercurial exposed: True buildable: True@@ -68,14 +69,15 @@ filepath >=1.2.0.0 && < 1.4, base >=4.0.0.0 && <4.8, directory >=1.1.0.0 && <1.3,- mtl >=2.0.1.0 && <2.2,- vcswrapper ==0.0.4,- process >=1.0.1.5 && <1.3+ mtl >=2.0.1.0 && <2.3,+ vcswrapper ==0.1.0,+ process >=1.0.1.5 && <1.3,+ text -any if flag(gtk3)- build-depends: gtk3 >=0.12.4 && <0.13+ build-depends: gtk3 >=0.12.4 && <0.14 cpp-options: -DMIN_VERSION_gtk=MIN_VERSION_gtk3 else- build-depends: gtk >=0.12.4 && <0.13+ build-depends: gtk >=0.12.4 && <0.14 if os(osx) ghc-options: -optl-headerpad_max_install_names buildable: True@@ -97,14 +99,15 @@ filepath >=1.2.0.0 && < 1.4, base >=4.0.0.0 && <4.8, directory >=1.1.0.0 && <1.3,- mtl >=2.0.1.0 && <2.2,- vcswrapper ==0.0.4,- process >=1.0.1.5 && <1.3+ mtl >=2.0.1.0 && <2.3,+ vcswrapper ==0.1.0,+ process >=1.0.1.5 && <1.3,+ text -any if flag(gtk3)- build-depends: gtk3 >=0.12.4 && <0.13+ build-depends: gtk3 >=0.12.4 && <0.14 cpp-options: -DMIN_VERSION_gtk=MIN_VERSION_gtk3 else- build-depends: gtk >=0.12.4 && <0.13+ build-depends: gtk >=0.12.4 && <0.14 if os(osx) ghc-options: -optl-headerpad_max_install_names buildable: True