mirror of
https://gitlab.com/sheaf/metabrush.git
synced 2024-11-05 23:03:38 +00:00
Fix file chooser crashes
This commit is contained in:
parent
5717c80e93
commit
36a6a3ca4b
|
@ -233,7 +233,6 @@ instance HandleAction OpenFile where
|
||||||
newDocHist = newHistory doc
|
newDocHist = newHistory doc
|
||||||
newFileTab uiElts vars ( Just newDocHist ) tabLoc
|
newFileTab uiElts vars ( Just newDocHist ) tabLoc
|
||||||
updateHistoryState uiElts ( Just newDocHist )
|
updateHistoryState uiElts ( Just newDocHist )
|
||||||
GObject.objectUnref files
|
|
||||||
|
|
||||||
warningDialog
|
warningDialog
|
||||||
:: ( Show errMess, GTK.IsWindow window )
|
:: ( Show errMess, GTK.IsWindow window )
|
||||||
|
@ -291,7 +290,6 @@ instance HandleAction OpenFolder where
|
||||||
newDocHist = newHistory doc
|
newDocHist = newHistory doc
|
||||||
newFileTab uiElts vars ( Just newDocHist ) tabLoc
|
newFileTab uiElts vars ( Just newDocHist ) tabLoc
|
||||||
updateHistoryState uiElts ( Just newDocHist )
|
updateHistoryState uiElts ( Just newDocHist )
|
||||||
GObject.objectUnref folder
|
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
-- Save & Save as --
|
-- Save & Save as --
|
||||||
|
@ -354,7 +352,6 @@ withSavePath ( UIElements {..} ) action = do
|
||||||
saveFile <- GTK.fileChooserGetFile fileChooser
|
saveFile <- GTK.fileChooserGetFile fileChooser
|
||||||
mbSavePath <- fmap fullFilePath <$> GIO.fileGetPath saveFile
|
mbSavePath <- fmap fullFilePath <$> GIO.fileGetPath saveFile
|
||||||
for_ mbSavePath action
|
for_ mbSavePath action
|
||||||
GObject.objectUnref saveFile
|
|
||||||
where
|
where
|
||||||
fullFilePath :: FilePath -> FilePath
|
fullFilePath :: FilePath -> FilePath
|
||||||
fullFilePath fp
|
fullFilePath fp
|
||||||
|
|
Loading…
Reference in a new issue