File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ import Data.GI.Gtk.ModelView.SeqStore
51
51
seqStoreNew , SeqStore (.. ))
52
52
import GI.Gtk.Objects.Window
53
53
(setWindowTransientFor , setWindowTitle , Window (.. ))
54
- import Data.GI.Base (new )
54
+ import Data.GI.Base (new , nullToNothing )
55
55
import GI.Gtk.Objects.FileChooserDialog (FileChooserDialog (.. ))
56
56
import GI.Gtk.Objects.Dialog (dialogRun , dialogAddButton )
57
57
import GI.Gtk.Interfaces.FileChooser
@@ -293,7 +293,7 @@ showFolderChooserDialog title parent fcAction = do
293
293
ResponseTypeCancel -> widgetDestroy dialog >> return Nothing
294
294
ResponseTypeDeleteEvent -> widgetDestroy dialog >> return Nothing
295
295
ResponseTypeAccept -> do
296
- f <- fileChooserGetFilename dialog
296
+ f <- nullToNothing $ fileChooserGetFilename dialog
297
297
widgetDestroy dialog
298
298
return f
299
299
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ import GI.Gtk.Objects.Widget
40
40
import GI.Gtk.Objects.ComboBox (comboBoxSetActive )
41
41
import GI.Gtk.Objects.Window
42
42
(setWindowTransientFor , setWindowTitle , Window (.. ))
43
- import Data.GI.Base (new )
43
+ import Data.GI.Base (new , nullToNothing )
44
44
import GI.Gtk.Objects.FileChooserDialog (FileChooserDialog (.. ))
45
45
import GI.Gtk.Objects.Dialog (dialogRun , dialogAddButton )
46
46
import GI.Gtk.Interfaces.FileChooser
@@ -330,7 +330,7 @@ showFolderChooserDialog title parent fcAction = do
330
330
ResponseTypeCancel -> widgetDestroy dialog >> return Nothing
331
331
ResponseTypeDeleteEvent -> widgetDestroy dialog >> return Nothing
332
332
ResponseTypeAccept -> do
333
- f <- fileChooserGetFilename dialog
333
+ f <- nullToNothing $ fileChooserGetFilename dialog
334
334
widgetDestroy dialog
335
335
return f
336
336
You can’t perform that action at this time.
0 commit comments