packages feed

wx 0.13.2.1 → 0.13.2.3

raw patch · 3 files changed

+24/−10 lines, 3 filesdep ~wxcore

Dependency ranges changed: wxcore

Files

src/Graphics/UI/WX/Controls.hs view
@@ -76,6 +76,7 @@  import Control.Monad (forM_) import Data.Dynamic  -- for "alignment"+import System.Info (os)   defaultStyle@@ -314,15 +315,27 @@     = newAttr "enabled" textCtrlIsEditable textCtrlSetEditable -} +-- Workaround for Unexpected TextCtrl behaviour (https://github.com/jodonoghue/wxHaskell/issues/1#issuecomment-5202439)+-- Problem arises from the fact that wxTE_RICH is needed only on Windows platforms, but is essential there. However, on+-- wxMac > 2.9, wxTE_RICH seems not to be ignored as the documentation claims.+getRichTE =  if (os == "mingw32") || (os == "win32")+             then wxTE_RICH+             else 0++getRichTE2 = if (os == "mingw32") || (os == "win32")+             then wxTE_RICH2+             else 0+ -- | Create a single-line text entry control. Note: 'alignment' has to -- be set at creation time (or the entry has default alignment (=left) ).+-- This is an alias for textEntry -- -- * Instances: 'Wrap', 'Aligned', 'Commanding' -- 'Textual', 'Literate', 'Dimensions', 'Colored', 'Visible', 'Child', --             'Able', 'Tipped', 'Identity', 'Styled', 'Reactive', 'Paint'. -- entry :: Window a -> [Prop (TextCtrl ())] -> IO (TextCtrl ()) entry parent props-  = textCtrlEx parent wxTE_RICH props+  = textCtrlEx parent getRichTE props  -- | Create a single-line text entry control. Note: 'alignment' has to -- be set at creation time (or the entry has default alignment (=left) ).@@ -332,7 +345,7 @@ -- textEntry :: Window a -> [Prop (TextCtrl ())] -> IO (TextCtrl ()) textEntry parent props-  = textCtrlEx parent wxTE_RICH props+  = textCtrlEx parent getRichTE props  -- | Create a multi-line text control. Note: the 'wrap' and 'alignment' -- have to be set at creation time or the default to 'WrapNone' and 'AlignLeft' respectively.@@ -342,7 +355,7 @@ -- textCtrl :: Window a -> [Prop (TextCtrl ())] -> IO (TextCtrl ()) textCtrl parent props-  = textCtrlEx parent (wxTE_MULTILINE .+. wxTE_RICH) props+  = textCtrlEx parent (wxTE_MULTILINE .+. getRichTE) props   -- | Create a multi-line text rich-text control with a certain wrap mode@@ -355,7 +368,7 @@ -- textCtrlRich :: Window a -> [Prop (TextCtrl ())] -> IO (TextCtrl ()) textCtrlRich parent props-  = textCtrlEx parent (wxTE_MULTILINE .+. wxTE_RICH2) props+  = textCtrlEx parent (wxTE_MULTILINE .+. getRichTE2) props  -- | Create a generic text control given a certain style. --@@ -366,9 +379,10 @@ textCtrlEx parent stl props   = feed2 props stl $     initialWindow    $ \id rect ->+    initialText      $ \txt ->     initialWrap      $     initialAlignment $ \props flags ->-    do e <- textCtrlCreate parent id "" rect flags+    do e <- textCtrlCreate parent id txt rect flags        set e props        return e 
src/Graphics/UI/WX/Window.hs view
@@ -131,7 +131,7 @@         = ifInstanceOf w classComboBox             (\cb -> (comboBoxGetValue cb, \s -> do comboBoxClear cb; comboBoxAppend cb s)) $           ifInstanceOf w classTextCtrl-            (\tc -> (textCtrlGetValue tc, \s -> do textCtrlClear tc; textCtrlWriteText tc s)) $+            (\tc -> (textCtrlGetValue tc, \s -> do textCtrlChangeValue tc s)) $             (windowGetLabel w,windowSetLabel w)    appendText w s
wx.cabal view
@@ -1,5 +1,5 @@ Name:           wx-Version:        0.13.2.1+Version:        0.13.2.3 License:        OtherLicense License-file:   license.txt Homepage:       http://haskell.org/haskellwiki/WxHaskell@@ -11,7 +11,7 @@                 It is built on top of wxWidgets - a comprehensive C++                 library that is portable across all major GUI platforms;                 including GTK, Windows, X11, and MacOS X.  This version-                works with wxWidgets 2.8 and 2.9.+                works with wxWidgets 2.8. Maintainer:     wxhaskell-devel@lists.sourceforge.net Synopsis:       wxHaskell Data-Files:     wx.cabal@@ -24,7 +24,7 @@  Library     if flag(splitBase)-        build-depends: wxcore >= 0.13.1,+        build-depends: wxcore >= 0.13.2.3 && < 0.90,                        stm         if flag(newBase)             build-depends:@@ -34,7 +34,7 @@                 base >= 3 && < 4     else         build-depends: base <  3, -                       wxcore >= 0.12.1.6,+                       wxcore >= 0.12.1.6 && < 0.90,                        stm   Exposed-Modules: