start new tabs with non-nil url
this does suggest that our logic for (whether the url entry is editable) is rather a kludge
This commit is contained in:
parent
34e5b36172
commit
f9e69672a9
@ -195,13 +195,16 @@ progress, trough {
|
||||
(when (= num 0)
|
||||
(update-tab-overview bus tabs page)))
|
||||
})
|
||||
new-tab (fn [self child]
|
||||
(let [v (or child (new-webview bus))
|
||||
i (widget:append_page v)]
|
||||
add-page (fn [v]
|
||||
(let [i (widget:append_page v)]
|
||||
(tset tabs i v)
|
||||
(v:show)
|
||||
(set widget.page i)
|
||||
v))
|
||||
new-tab (fn [self]
|
||||
(let [v (add-page (new-webview bus))]
|
||||
(v:load_uri "about:blank")
|
||||
v))
|
||||
tab-overview (Gtk.ScrolledWindow)
|
||||
current #(. tabs widget.page)]
|
||||
(bus:subscribe :fetch #(match (current) c (c:load_uri $2)))
|
||||
@ -227,7 +230,7 @@ progress, trough {
|
||||
(tset tabs i nil)
|
||||
(update-tab-overview bus tabs tab-overview)
|
||||
(widget:set_current_page 0)))
|
||||
(new-tab nil tab-overview)
|
||||
(add-page tab-overview)
|
||||
|
||||
{
|
||||
:new-tab new-tab
|
||||
|
Loading…
Reference in New Issue
Block a user