on master help sign in
Locally define noAdjustment and noCancellable

Those two convenience definitions disappeared from gi-gio and gi-gtk in newer versions.

commitf8427480ca827b2bee1d9b33dfa6118e14fe2924 authorMalte Brandy <malte.brandy@maralorn.de> dateFri 14 Aug 2020, 18:10 (6 years ago) parent09f44aa
1 file changed+8−2
jsaddle-webkit2gtk/src/Language/Javascript/JSaddle/WebKitGTK.hs+8−2
jsaddle-webkit2gtk/src/Language/Javascript/JSaddle/WebKitGTK.hs+8−2
@@ -55,11 +55,11 @@ import GI.GLib (timeoutAdd, idleAdd, pattern PRIORITY_HIGH, pattern PRIORITY_DEF
5555import qualified GI.Gtk as Gtk (main, init)
5656import GI.Gtk
5757 (windowSetPosition, windowSetDefaultSize, windowNew,
58− scrolledWindowNew, noAdjustment, containerAdd,
58+ scrolledWindowNew, Adjustment, containerAdd,
5959 WindowType(..), WindowPosition(..), widgetDestroy,
6060 widgetGetToplevel, widgetShowAll, onWidgetDestroy,
6161 mainQuit)
62−import GI.Gio (noCancellable)
62+import GI.Gio (Cancellable)
6363import GI.JavaScriptCore (valueToString)
6464import GI.WebKit2
6565 (scriptDialogPromptSetText, scriptDialogPromptGetDefaultText,
@@ -82,6 +82,12 @@ import Language.Javascript.JSaddle (JSM, Results, Batch)
8282import Language.Javascript.JSaddle.Run (runJavaScript)
8383import Language.Javascript.JSaddle.Run.Files (initState, runBatch, ghcjsHelpers)
8484
85+noAdjustment :: Maybe Adjustment
86+noAdjustment = Nothing
87+
88+noCancellable :: Maybe Cancellable
89+noCancellable = Nothing
90+
8591quitWebView :: WebView -> IO ()
8692quitWebView wv = postGUIAsync $ do w <- widgetGetToplevel wv --TODO: Shouldn't this be postGUISync?
8793 widgetDestroy w