Skip to content

Commit 05ae8ba

Browse files
committed
Fixes for older Gtk+ versions
1 parent 765554e commit 05ae8ba

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

vcsgui/src/VCSGui/Common/FilesInConflict.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import Data.GI.Gtk.ModelView.SeqStore
5151
seqStoreNew, SeqStore(..))
5252
import GI.Gtk.Objects.Window
5353
(setWindowTransientFor, setWindowTitle, Window(..))
54-
import Data.GI.Base (new)
54+
import Data.GI.Base (new, nullToNothing)
5555
import GI.Gtk.Objects.FileChooserDialog (FileChooserDialog(..))
5656
import GI.Gtk.Objects.Dialog (dialogRun, dialogAddButton)
5757
import GI.Gtk.Interfaces.FileChooser
@@ -293,7 +293,7 @@ showFolderChooserDialog title parent fcAction = do
293293
ResponseTypeCancel -> widgetDestroy dialog >> return Nothing
294294
ResponseTypeDeleteEvent -> widgetDestroy dialog >> return Nothing
295295
ResponseTypeAccept -> do
296-
f <- fileChooserGetFilename dialog
296+
f <- nullToNothing $ fileChooserGetFilename dialog
297297
widgetDestroy dialog
298298
return f
299299

vcsgui/src/VCSGui/Common/SetupConfig.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import GI.Gtk.Objects.Widget
4040
import GI.Gtk.Objects.ComboBox (comboBoxSetActive)
4141
import GI.Gtk.Objects.Window
4242
(setWindowTransientFor, setWindowTitle, Window(..))
43-
import Data.GI.Base (new)
43+
import Data.GI.Base (new, nullToNothing)
4444
import GI.Gtk.Objects.FileChooserDialog (FileChooserDialog(..))
4545
import GI.Gtk.Objects.Dialog (dialogRun, dialogAddButton)
4646
import GI.Gtk.Interfaces.FileChooser
@@ -330,7 +330,7 @@ showFolderChooserDialog title parent fcAction = do
330330
ResponseTypeCancel -> widgetDestroy dialog >> return Nothing
331331
ResponseTypeDeleteEvent -> widgetDestroy dialog >> return Nothing
332332
ResponseTypeAccept -> do
333-
f <- fileChooserGetFilename dialog
333+
f <- nullToNothing $ fileChooserGetFilename dialog
334334
widgetDestroy dialog
335335
return f
336336

0 commit comments

Comments
 (0)