@@ -55,11 +55,11 @@ import GI.GLib (timeoutAdd, idleAdd, pattern PRIORITY_HIGH, pattern PRIORITY_DEF
55import qualified GI.Gtk as Gtk (main, init)
55import qualified GI.Gtk as Gtk (main, init)
56import GI.Gtk
56import GI.Gtk
57 (windowSetPosition, windowSetDefaultSize, windowNew,
57 (windowSetPosition, windowSetDefaultSize, windowNew,
58− scrolledWindowNew, noAdjustment, containerAdd,
58+ scrolledWindowNew, Adjustment, containerAdd,
59 WindowType(..), WindowPosition(..), widgetDestroy,
59 WindowType(..), WindowPosition(..), widgetDestroy,
60 widgetGetToplevel, widgetShowAll, onWidgetDestroy,
60 widgetGetToplevel, widgetShowAll, onWidgetDestroy,
62−import GI.Gio (noCancellable)
62+import GI.Gio (Cancellable)
63import GI.JavaScriptCore (valueToString)
63import GI.JavaScriptCore (valueToString)
64import GI.WebKit2
64import GI.WebKit2
65 (scriptDialogPromptSetText, scriptDialogPromptGetDefaultText,
65 (scriptDialogPromptSetText, scriptDialogPromptGetDefaultText,
@@ -104,7 +104,7 @@ run main = do
104 _ <- timeoutAdd PRIORITY_HIGH 10 (yield >> return True)
104 _ <- timeoutAdd PRIORITY_HIGH 10 (yield >> return True)
105 windowSetDefaultSize window 900 600
105 windowSetDefaultSize window 900 600
106 windowSetPosition window WindowPositionCenter
106 windowSetPosition window WindowPositionCenter
107− scrollWin <- scrolledWindowNew noAdjustment noAdjustment
107+ scrollWin <- scrolledWindowNew (Nothing :: Maybe Adjustment) (Nothing :: Maybe Adjustment)
108 contentManager <- userContentManagerNew
108 contentManager <- userContentManagerNew
109 webView <- webViewNewWithUserContentManager contentManager
109 webView <- webViewNewWithUserContentManager contentManager
110 settings <- webViewGetSettings webView
110 settings <- webViewGetSettings webView
@@ -128,11 +128,11 @@ run main = do
128runInWebView :: JSM () -> WebView -> IO ()
128runInWebView :: JSM () -> WebView -> IO ()
129runInWebView f webView = do
129runInWebView f webView = do
130 (processResults, syncResults, start) <- runJavaScript (\batch -> postGUIAsync $
130 (processResults, syncResults, start) <- runJavaScript (\batch -> postGUIAsync $
131− webViewRunJavascript webView (decodeUtf8 . toStrict $ "runJSaddleBatch(" <> encode batch <> ");") noCancellable Nothing)
131+ webViewRunJavascript webView (decodeUtf8 . toStrict $ "runJSaddleBatch(" <> encode batch <> ");") (Nothing :: Maybe Cancellable) Nothing)
134 addJSaddleHandler webView processResults syncResults
134 addJSaddleHandler webView processResults syncResults
135− webViewRunJavascript webView (decodeUtf8 $ toStrict jsaddleJs) noCancellable . Just $
135+ webViewRunJavascript webView (decodeUtf8 $ toStrict jsaddleJs) (Nothing :: Maybe Cancellable) . Just $
136 \_obj _asyncResult ->
136 \_obj _asyncResult ->
137 void $ forkIO start
137 void $ forkIO start