Style tweaks

This commit is contained in:
hasufell 2014-10-01 03:03:30 +02:00
parent 8f1ab75fe7
commit 9e87c971ab
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
1 changed files with 7 additions and 6 deletions

13
Main.hs
View File

@ -72,10 +72,10 @@ onClickedDrawButton fcb da = do
case filename of
Just x -> do
mesh <- readFile x
dw <- widgetGetDrawWindow da
dw <- widgetGetDrawWindow da
let (_, r) = renderDia Cairo
(CairoOptions "" (Width 600) SVG False)
(diagFromString mesh)
(CairoOptions "" (Width 600) SVG False)
(diagFromString mesh)
renderWithDrawable dw r
Nothing -> do
showErrorDialog "No valid Mesh file!"
@ -89,8 +89,8 @@ onClickedSaveButton fcb = do
Just x -> do
mesh <- readFile x
let (png, _) = renderDia Cairo
(CairoOptions "out.svg" (Width 600) SVG False)
(diagFromString mesh)
(CairoOptions "out.svg" (Width 600) SVG False)
(diagFromString mesh)
png
Nothing -> do
showErrorDialog "No valid Mesh file!"
@ -98,7 +98,8 @@ onClickedSaveButton fcb = do
showErrorDialog :: String -> IO ()
showErrorDialog str = do
errorDialog <- messageDialogNew Nothing [DialogDestroyWithParent]
errorDialog <- messageDialogNew Nothing
[DialogDestroyWithParent]
MessageError
ButtonsClose
str