Skip to content

Commit 3ea197c

Browse files
committed
Support for Gtk2
1 parent c7468c3 commit 3ea197c

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

vcsgui/src/VCSGui/Git/Log.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
-----------------------------------------------------------------------------
23
--
34
-- Module : VCSGui.Git.Log
@@ -49,7 +50,11 @@ showLogGUI = do
4950
askForNewBranchname = do
5051
dialog <- Gtk.dialogNew
5152
Gtk.dialogAddButton dialog "gtk-ok" Gtk.ResponseOk
53+
#if MIN_VERSION_gtk(0,13,0) || defined(MIN_VERSION_gtk3)
5254
upper <- Gtk.dialogGetContentArea dialog
55+
#else
56+
upper <- Gtk.dialogGetUpper dialog
57+
#endif
5358

5459
inputBranch <- Gtk.entryNew
5560
lblBranch <- Gtk.labelNew $ Just "Enter a new branchname (empty for anonym branch):"

vcsgui/vcsgui.cabal

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ library
4242
vcswrapper ==0.0.2,
4343
process >=1.0.1.5 && <1.3
4444
if flag(gtk3)
45-
build-depends: gtk3 >=0.12.4.1 && <0.13
45+
build-depends: gtk3 >=0.12.4 && <0.13
46+
cpp-options: -DMIN_VERSION_gtk=MIN_VERSION_gtk3
4647
else
47-
build-depends: gtk >=0.12.4.1 && <0.13
48+
build-depends: gtk >=0.12.4 && <0.13
4849
exposed-modules: VCSGui.Common VCSGui.Git VCSGui.Svn VCSGui.Mercurial
4950
exposed: True
5051
buildable: True
@@ -71,9 +72,10 @@ executable vcsgui
7172
vcswrapper ==0.0.2,
7273
process >=1.0.1.5 && <1.3
7374
if flag(gtk3)
74-
build-depends: gtk3 >=0.12.4.1 && <0.13
75+
build-depends: gtk3 >=0.12.4 && <0.13
76+
cpp-options: -DMIN_VERSION_gtk=MIN_VERSION_gtk3
7577
else
76-
build-depends: gtk >=0.12.4.1 && <0.13
78+
build-depends: gtk >=0.12.4 && <0.13
7779
if os(osx)
7880
ghc-options: -optl-headerpad_max_install_names
7981
buildable: True
@@ -99,9 +101,10 @@ executable vcsgui-askpass
99101
vcswrapper ==0.0.2,
100102
process >=1.0.1.5 && <1.3
101103
if flag(gtk3)
102-
build-depends: gtk3 >=0.12.4.1 && <0.13
104+
build-depends: gtk3 >=0.12.4 && <0.13
105+
cpp-options: -DMIN_VERSION_gtk=MIN_VERSION_gtk3
103106
else
104-
build-depends: gtk >=0.12.4.1 && <0.13
107+
build-depends: gtk >=0.12.4 && <0.13
105108
if os(osx)
106109
ghc-options: -optl-headerpad_max_install_names
107110
buildable: True

0 commit comments

Comments
 (0)