put history control on the bus
This commit is contained in:
parent
ceeaf80de4
commit
d44ed56d44
@ -9,8 +9,6 @@
|
|||||||
(local content-filter-store
|
(local content-filter-store
|
||||||
(WebKit2.UserContentFilterStore {:path cache-dir}))
|
(WebKit2.UserContentFilterStore {:path cache-dir}))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(-> (WebKit2.WebContext:get_default)
|
(-> (WebKit2.WebContext:get_default)
|
||||||
(: :get_website_data_manager)
|
(: :get_website_data_manager)
|
||||||
(: :get_cookie_manager)
|
(: :get_cookie_manager)
|
||||||
@ -105,6 +103,9 @@ progress, trough {
|
|||||||
(bus:subscribe :fetch #(webview:load_uri $1))
|
(bus:subscribe :fetch #(webview:load_uri $1))
|
||||||
(bus:subscribe :stop-loading #(webview:stop_loading))
|
(bus:subscribe :stop-loading #(webview:stop_loading))
|
||||||
(bus:subscribe :reload #(webview:reload))
|
(bus:subscribe :reload #(webview:reload))
|
||||||
|
(bus:subscribe :go-back #(if (webview:can_go_back)
|
||||||
|
(webview:go_back)))
|
||||||
|
|
||||||
(load-adblocks webview.user_content_manager content-filter-store)
|
(load-adblocks webview.user_content_manager content-filter-store)
|
||||||
webview))
|
webview))
|
||||||
|
|
||||||
@ -139,12 +140,13 @@ progress, trough {
|
|||||||
:on_clicked #(bus:publish :reload)
|
:on_clicked #(bus:publish :reload)
|
||||||
})
|
})
|
||||||
(: :set_image (named-image "view-refresh")))
|
(: :set_image (named-image "view-refresh")))
|
||||||
|
;; views (Gtk.Notebook {
|
||||||
|
;; :show_tabs false
|
||||||
|
;; })
|
||||||
webview (new-webview bus)
|
webview (new-webview bus)
|
||||||
back (doto
|
back (doto
|
||||||
(Gtk.Button {
|
(Gtk.Button {
|
||||||
:on_clicked (fn [s]
|
:on_clicked #(bus:publish :go-back)
|
||||||
(if (webview:can_go_back)
|
|
||||||
(webview:go_back)))
|
|
||||||
})
|
})
|
||||||
(: :set_image (named-image "go-previous")))]
|
(: :set_image (named-image "go-previous")))]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user