From: Duncan C. <dun...@us...> - 2004-08-08 19:04:47
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv358/gtk/menuComboToolbar Modified Files: ToolItem.chs ComboBoxEntry.chs ComboBox.chs Log Message: Axel's patches to get the build to work for gtk-2.2, exclude new module bodies so c2hs doesn't see the new functions, and change the way _stub.o files are found so we don't try to link non-existant ones. Everything should build for gtk-2.0 and gtk-2.2 now. Index: ComboBoxEntry.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar/ComboBoxEntry.chs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ComboBoxEntry.chs 23 May 2004 16:05:21 -0000 1.3 +++ ComboBoxEntry.chs 8 Aug 2004 19:04:37 -0000 1.4 @@ -1,3 +1,4 @@ +{-# OPTIONS -cpp #-} -- -*-haskell-*- -- GIMP Toolkit (GTK) entry Widget ComboBoxEntry -- @@ -23,7 +24,10 @@ -- * Added in gtk 2.4 -- +#include<gtk/gtkversion.h> + module ComboBoxEntry ( +#if GTK_CHECK_VERSION(2,4,0) ComboBoxEntryClass, ComboBoxEntry, comboBoxEntryNew, @@ -31,8 +35,10 @@ comboBoxEntryNewText, comboBoxEntrySetTextColumn, comboBoxEntryGetTextColumn, +#endif ) where +#if GTK_CHECK_VERSION(2,4,0) import Monad (liftM) import FFI @@ -68,3 +74,5 @@ comboBoxEntryGetTextColumn combo = liftM fromIntegral $ {# call gtk_combo_box_entry_get_text_column #} (toComboBoxEntry combo) + +#endif Index: ToolItem.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar/ToolItem.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ToolItem.chs 3 Aug 2004 04:16:57 -0000 1.1 +++ ToolItem.chs 8 Aug 2004 19:04:37 -0000 1.2 @@ -1,3 +1,4 @@ +{-# OPTIONS -cpp #-} -- -*-haskell-*- -- GIMP Toolkit (GTK) Widget ToolItem -- @@ -32,8 +33,10 @@ -- -- * Added in GTK+ 2.4 -- +#include<gtk/gtkversion.h> module ToolItem ( +#if GTK_CHECK_VERSION(2,4,0) toolItemNew, toolItemSetHomogeneous, toolItemGetHomogeneous, @@ -48,7 +51,7 @@ toolItemGetVisibleVertical, toolItemSetIsImportant, toolItemGetIsImportant, - IconSize(..), + IconSize, toolItemGetIconSize, Orientation(..), toolItemGetOrientation, @@ -59,15 +62,18 @@ toolItemRetrieveProxyMenuItem, toolItemGetProxyMenuItem, toolItemSetProxyMenuItem +#endif ) where +#if GTK_CHECK_VERSION(2,4,0) + import Monad (liftM) import FFI import Object (makeNewObject) {#import Hierarchy#} {#import Signal#} -import Structs (IconSize(..)) +import Structs (IconSize) import Enums (Orientation(..), ToolbarStyle(..), ReliefStyle(..)) {# context lib="gtk" prefix="gtk" #} @@ -238,3 +244,5 @@ withCString menuItemId $ \strPtr -> {#call tool_item_set_proxy_menu_item#} (toToolItem item) strPtr (toWidget menuItem) + +#endif Index: ComboBox.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar/ComboBox.chs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ComboBox.chs 23 May 2004 16:05:21 -0000 1.3 +++ ComboBox.chs 8 Aug 2004 19:04:37 -0000 1.4 @@ -1,3 +1,4 @@ +{-# OPTIONS -cpp #-} -- -*-haskell-*- -- GIMP Toolkit (GTK) entry Widget ComboBox -- @@ -23,7 +24,10 @@ -- * Added in Gtk 2.4 -- +#include<gtk/gtkversion.h> + module ComboBox ( +#if GTK_CHECK_VERSION(2,4,0) ComboBoxClass, ComboBox, comboBoxNew, @@ -44,8 +48,11 @@ comboBoxRemoveText, comboBoxPopup, comboBoxPopdown +#endif ) where +#if GTK_CHECK_VERSION(2,4,0) + import Monad (liftM) import FFI @@ -150,3 +157,5 @@ comboBoxPopdown :: ComboBoxClass combo => combo -> IO () comboBoxPopdown combo = {# call gtk_combo_box_popdown #} (toComboBox combo) + +#endif |