Skip to content

Commit

Permalink
GHC 7.6 fixes and Gtk 3 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Oct 14, 2012
1 parent 81e4706 commit c922925
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 39 deletions.
2 changes: 1 addition & 1 deletion vcsgui/src/VCSGui/Common/Commit.hs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Graphics.UI.Gtk
import Control.Monad.Trans(liftIO) import Control.Monad.Trans(liftIO)
import Control.Monad import Control.Monad
import Control.Monad.Reader import Control.Monad.Reader
import Maybe import Data.Maybe
import Paths_vcsgui(getDataFileName) import Paths_vcsgui(getDataFileName)


-- --
Expand Down
2 changes: 1 addition & 1 deletion vcsgui/src/VCSGui/Common/GtkHelper.hs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ setToListStore (store, view) newList = do


-- | Close a window. -- | Close a window.
closeWin :: WindowItem -> IO () closeWin :: WindowItem -> IO ()
closeWin win = (Gtk.widgetHideAll (getItem win)) closeWin win = (Gtk.widgetHide (getItem win))


-- | Close a window if 'Gtk.deleteEvent' occurs on this 'WindowItem'. -- | Close a window if 'Gtk.deleteEvent' occurs on this 'WindowItem'.
registerClose :: WindowItem -> IO () registerClose :: WindowItem -> IO ()
Expand Down
18 changes: 9 additions & 9 deletions vcsgui/src/VCSGui/Common/SetupConfig.hs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ module VCSGui.Common.SetupConfig (
import Graphics.UI.Gtk hiding (set, get) import Graphics.UI.Gtk hiding (set, get)
import Control.Monad.Trans(liftIO) import Control.Monad.Trans(liftIO)
import Data.Maybe import Data.Maybe
import Monad import Control.Monad
import Directory import System.Directory
import System.Directory(doesDirectoryExist) import System.Directory(doesDirectoryExist)
import Data.List.Utils(elemRIndex) import Data.List.Utils(elemRIndex)
import Data.List(isInfixOf) import Data.List(isInfixOf)
Expand Down Expand Up @@ -160,9 +160,9 @@ connectSetupRepoGui callback gui = do
widgetShowAll (H.getItem (entExec gui)) widgetShowAll (H.getItem (entExec gui))
widgetShowAll (H.getItem (btnBrowseExec gui)) widgetShowAll (H.getItem (btnBrowseExec gui))
else do else do
widgetHideAll (H.getItem (lblExec gui)) widgetHide (H.getItem (lblExec gui))
widgetHideAll (H.getItem (entExec gui)) widgetHide (H.getItem (entExec gui))
widgetHideAll (H.getItem (btnBrowseExec gui)) widgetHide (H.getItem (btnBrowseExec gui))


on (H.getItem (checkbtAuthor gui)) toggled $ do on (H.getItem (checkbtAuthor gui)) toggled $ do
putStrLn "checkbtnauthor toogled" putStrLn "checkbtnauthor toogled"
Expand All @@ -173,10 +173,10 @@ connectSetupRepoGui callback gui = do
widgetShowAll (H.getItem (lblEmail gui)) widgetShowAll (H.getItem (lblEmail gui))
widgetShowAll (H.getItem (entEmail gui)) widgetShowAll (H.getItem (entEmail gui))
else do else do
widgetHideAll (H.getItem (lblAuthor gui)) widgetHide (H.getItem (lblAuthor gui))
widgetHideAll (H.getItem (entAuthor gui)) widgetHide (H.getItem (entAuthor gui))
widgetHideAll (H.getItem (lblEmail gui)) widgetHide (H.getItem (lblEmail gui))
widgetHideAll (H.getItem (entEmail gui)) widgetHide (H.getItem (entEmail gui))
return () return ()
liftIO $ on (H.getItem (actBrowsePathToTool gui)) actionActivated $ do liftIO $ on (H.getItem (actBrowsePathToTool gui)) actionActivated $ do
mbPath <- showFolderChooserDialog "Select executable" (H.getItem $ winSetupRepo gui) FileChooserActionOpen mbPath <- showFolderChooserDialog "Select executable" (H.getItem $ winSetupRepo gui) FileChooserActionOpen
Expand Down
4 changes: 2 additions & 2 deletions vcsgui/src/VCSGui/Git/Log.hs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ showLogGUI = do
askForNewBranchname = do askForNewBranchname = do
dialog <- Gtk.dialogNew dialog <- Gtk.dialogNew
Gtk.dialogAddButton dialog "gtk-ok" Gtk.ResponseOk Gtk.dialogAddButton dialog "gtk-ok" Gtk.ResponseOk
upper <- Gtk.dialogGetUpper dialog upper <- Gtk.dialogGetContentArea dialog


inputBranch <- Gtk.entryNew 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):"
box <- Gtk.hBoxNew False 2 box <- Gtk.hBoxNew False 2
Gtk.containerAdd upper box Gtk.containerAdd (Gtk.castToBox upper) box
Gtk.containerAdd box lblBranch Gtk.containerAdd box lblBranch
Gtk.containerAdd box inputBranch Gtk.containerAdd box inputBranch


Expand Down
2 changes: 1 addition & 1 deletion vcsgui/src/VCSGui/Svn/AskPassword.hs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ showAskpassGUI handler = do
if active then if active then
widgetShowAll (boxUsePwd gui) widgetShowAll (boxUsePwd gui)
else else
widgetHideAll (boxUsePwd gui) widgetHide (boxUsePwd gui)
-- present window -- present window
widgetShowAll $ H.getItem $ windowAskpass gui widgetShowAll $ H.getItem $ windowAskpass gui
return () return ()
Expand Down
2 changes: 1 addition & 1 deletion vcsgui/src/VCSGui/Svn/Checkout.hs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import Control.Monad.Reader
import qualified VCSWrapper.Svn as Svn import qualified VCSWrapper.Svn as Svn
import qualified VCSGui.Common.GtkHelper as H import qualified VCSGui.Common.GtkHelper as H
import Paths_vcsgui(getDataFileName) import Paths_vcsgui(getDataFileName)
import Maybe import Data.Maybe
-- --
-- glade path and object accessors -- glade path and object accessors
-- --
Expand Down
45 changes: 21 additions & 24 deletions vcsgui/vcsgui.cabal
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ data-files: LICENSE
data/guiCommonConflictsResolved.glade data/guiCommonConflictsResolved.glade
data-dir: "" data-dir: ""
library library
build-depends: MissingH >=1.1.0.3 && <1.2, build-depends: MissingH >=1.1.0.3 && <1.3,
filepath >=1.2.0.0 && < 1.3, filepath >=1.2.0.0 && < 1.4,
base >=4.0.0.0 && <4.4, base >=4.0.0.0 && <4.7,
directory >=1.1.0.0 && <1.2, directory >=1.1.0.0 && <1.3,
haskell98 >=1.1.0.1 && <1.2, mtl >=2.0.1.0 && <2.2,
mtl >=2.0.1.0 && <2.1, vcswrapper ==0.0.2,
vcswrapper ==0.0.1, process >=1.0.1.5 && <1.2,
process >=1.0.1.5 && <1.1,
gtk >=0.12.0 && <0.13 gtk >=0.12.0 && <0.13
exposed-modules: VCSGui.Common VCSGui.Git VCSGui.Svn VCSGui.Mercurial exposed-modules: VCSGui.Common VCSGui.Git VCSGui.Svn VCSGui.Mercurial
exposed: True exposed: True
Expand All @@ -56,14 +55,13 @@ library


executable vcsgui executable vcsgui
main-is: Main.hs main-is: Main.hs
build-depends: MissingH >=1.1.0.3 && <1.2, build-depends: MissingH >=1.1.0.3 && <1.3,
filepath >=1.2.0.0 && < 1.3, filepath >=1.2.0.0 && < 1.4,
base >=4.0.0.0 && <4.4, base >=4.0.0.0 && <4.7,
directory >=1.1.0.0 && <1.2, directory >=1.1.0.0 && <1.3,
haskell98 >=1.1.0.1 && <1.2, mtl >=2.0.1.0 && <2.2,
mtl >=2.0.1.0 && <2.1, vcswrapper ==0.0.2,
vcswrapper ==0.0.1, process >=1.0.1.5 && <1.2,
process >=1.0.1.5 && <1.1,
gtk >=0.12.0 && <0.13 gtk >=0.12.0 && <0.13
buildable: True buildable: True
hs-source-dirs: src hs-source-dirs: src
Expand All @@ -80,14 +78,13 @@ executable vcsgui


executable vcsgui-askpass executable vcsgui-askpass
main-is: Main.hs main-is: Main.hs
build-depends: MissingH >=1.1.0.3 && <1.2, build-depends: MissingH >=1.1.0.3 && <1.3,
filepath >=1.2.0.0 && < 1.3, filepath >=1.2.0.0 && < 1.4,
base >=4.0.0.0 && <4.4, base >=4.0.0.0 && <4.7,
directory >=1.1.0.0 && <1.2, directory >=1.1.0.0 && <1.3,
haskell98 >=1.1.0.1 && <1.2, mtl >=2.0.1.0 && <2.2,
mtl >=2.0.1.0 && <2.1, vcswrapper ==0.0.2,
vcswrapper ==0.0.1, process >=1.0.1.5 && <1.2,
process >=1.0.1.5 && <1.1,
gtk >=0.12.0 && <0.13 gtk >=0.12.0 && <0.13
buildable: True buildable: True
hs-source-dirs: src/exe/askpass src hs-source-dirs: src/exe/askpass src
Expand Down

0 comments on commit c922925

Please sign in to comment.