Style tweaks
This commit is contained in:
parent
8f1ab75fe7
commit
9e87c971ab
13
Main.hs
13
Main.hs
@ -72,10 +72,10 @@ onClickedDrawButton fcb da = do
|
|||||||
case filename of
|
case filename of
|
||||||
Just x -> do
|
Just x -> do
|
||||||
mesh <- readFile x
|
mesh <- readFile x
|
||||||
dw <- widgetGetDrawWindow da
|
dw <- widgetGetDrawWindow da
|
||||||
let (_, r) = renderDia Cairo
|
let (_, r) = renderDia Cairo
|
||||||
(CairoOptions "" (Width 600) SVG False)
|
(CairoOptions "" (Width 600) SVG False)
|
||||||
(diagFromString mesh)
|
(diagFromString mesh)
|
||||||
renderWithDrawable dw r
|
renderWithDrawable dw r
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
showErrorDialog "No valid Mesh file!"
|
showErrorDialog "No valid Mesh file!"
|
||||||
@ -89,8 +89,8 @@ onClickedSaveButton fcb = do
|
|||||||
Just x -> do
|
Just x -> do
|
||||||
mesh <- readFile x
|
mesh <- readFile x
|
||||||
let (png, _) = renderDia Cairo
|
let (png, _) = renderDia Cairo
|
||||||
(CairoOptions "out.svg" (Width 600) SVG False)
|
(CairoOptions "out.svg" (Width 600) SVG False)
|
||||||
(diagFromString mesh)
|
(diagFromString mesh)
|
||||||
png
|
png
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
showErrorDialog "No valid Mesh file!"
|
showErrorDialog "No valid Mesh file!"
|
||||||
@ -98,7 +98,8 @@ onClickedSaveButton fcb = do
|
|||||||
|
|
||||||
showErrorDialog :: String -> IO ()
|
showErrorDialog :: String -> IO ()
|
||||||
showErrorDialog str = do
|
showErrorDialog str = do
|
||||||
errorDialog <- messageDialogNew Nothing [DialogDestroyWithParent]
|
errorDialog <- messageDialogNew Nothing
|
||||||
|
[DialogDestroyWithParent]
|
||||||
MessageError
|
MessageError
|
||||||
ButtonsClose
|
ButtonsClose
|
||||||
str
|
str
|
||||||
|
Loading…
Reference in New Issue
Block a user