open a blank webview if no URLs on command line

phoen
Daniel Barlow 2022-03-09 23:45:52 +00:00
parent d831ccbb67
commit a928c40cd0
1 changed files with 7 additions and 4 deletions

View File

@ -137,10 +137,13 @@ progress, trough {
(container:pack_start progress-bar false false 0) (container:pack_start progress-bar false false 0)
(container:pack_start viewplex.widget true true 0) (container:pack_start viewplex.widget true true 0)
(each [_ url (ipairs arg)] (if (. arg 1)
(let [v (Webview.new)] (each [_ url (ipairs arg)]
(v:visit url) (let [v (Webview.new)]
(viewplex:add-view v))) (v:visit url)
(viewplex:add-view v)))
(viewplex:add-view
(doto (Webview.new) (: :visit "about:blank"))))
(window:add container) (window:add container)
(window:show_all)) (window:show_all))