summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhumba <>2016-12-17 07:10:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2016-12-17 07:10:00 (GMT)
commit3b584a35e6ff18155721f7c061d8087d288c8bf0 (patch)
treee95644afa2485209263bf1b47f85d8d60052e6e4
parent551876ea50e145a2fdce0aa1f24e9b2d760cf3c2 (diff)
version 0.2.00.2.0
-rw-r--r--qtah-examples.cabal6
-rw-r--r--src/Graphics/UI/Qtah/Example/Notepad.hs13
2 files changed, 10 insertions, 9 deletions
diff --git a/qtah-examples.cabal b/qtah-examples.cabal
index 0af6d0b..7e04adc 100644
--- a/qtah-examples.cabal
+++ b/qtah-examples.cabal
@@ -1,5 +1,5 @@
name: qtah-examples
-version: 0.1.2
+version: 0.2.0
synopsis: Example programs for Qtah Qt bindings
homepage: http://khumba.net/projects/qtah
license: LGPL-3
@@ -24,7 +24,7 @@ executable qtah-examples
, binary >=0.7 && <0.9
, bytestring >=0.10 && <0.11
, filepath >=1.0 && <1.5
- , hoppy-runtime >=0.2 && <0.3
- , qtah-qt5 >=0.1 && <0.2
+ , hoppy-runtime >=0.3 && <0.4
+ , qtah-qt5 >=0.2 && <0.3
ghc-options: -W -fwarn-incomplete-patterns -fwarn-unused-do-bind
default-language: Haskell2010
diff --git a/src/Graphics/UI/Qtah/Example/Notepad.hs b/src/Graphics/UI/Qtah/Example/Notepad.hs
index d992139..d65ac4d 100644
--- a/src/Graphics/UI/Qtah/Example/Notepad.hs
+++ b/src/Graphics/UI/Qtah/Example/Notepad.hs
@@ -67,6 +67,7 @@ run = withScopedPtr (getArgs >>= QApplication.new) $ \_ -> do
makeMainWindow :: IO QMainWindow
makeMainWindow = do
window <- QMainWindow.new
+ QWidget.resizeRaw window 640 480
menu <- QMenuBar.new
QMainWindow.setMenuBar window menu
@@ -189,13 +190,13 @@ confirmSaveIfDirty me title = do
(myWindow me)
title
"There are unsaved changes. Would you like to save them?"
- (QMessageBox.qMessageBoxStandardButtons_Yes .|.
- QMessageBox.qMessageBoxStandardButtons_No .|.
- QMessageBox.qMessageBoxStandardButtons_Cancel)
- QMessageBox.QMessageBoxStandardButton_Cancel
+ (QMessageBox.yes .|.
+ QMessageBox.no .|.
+ QMessageBox.cancel)
+ QMessageBox.Cancel
case response of
- QMessageBox.QMessageBoxStandardButton_Yes -> fileSave me
- QMessageBox.QMessageBoxStandardButton_No -> return True
+ QMessageBox.Yes -> fileSave me
+ QMessageBox.No -> return True
_ -> return False
else return True