fetch urls typed into urlbar
This commit is contained in:
parent
71289309b8
commit
9ef0818465
@ -11,5 +11,4 @@ Touchscreen-friendly wrapper around Webkit
|
||||
- support multiple tabs
|
||||
- find out if it's going to eat cpu like luakit does
|
||||
- some kind of bookmarks/favourites/pinned tabs
|
||||
- fetch url when typed in
|
||||
- ESC in url bar cancels typing
|
||||
|
@ -17,7 +17,8 @@
|
||||
nav-bar (Gtk.Box {
|
||||
:orientation Gtk.Orientation.HORIZONTAL
|
||||
})
|
||||
url (doto (Gtk.Entry) (: :set_text current-url))
|
||||
url (doto (Gtk.Entry)
|
||||
(: :set_text current-url))
|
||||
webview (WebKit2.WebView {
|
||||
:on_notify
|
||||
(fn [self pspec c]
|
||||
@ -31,7 +32,6 @@
|
||||
})
|
||||
back (doto
|
||||
(Gtk.Button {
|
||||
;; :label "<-"
|
||||
:on_clicked (fn [s]
|
||||
(if (webview:can_go_back)
|
||||
(webview:go_back)))
|
||||
@ -39,6 +39,9 @@
|
||||
(: :set_image
|
||||
(Gtk.Image.new_from_icon_name "go-previous" Gtk.IconSize.LARGE_TOOLBAR)))]
|
||||
|
||||
(tset url :on_activate (fn [self]
|
||||
(webview:load_uri self.text)))
|
||||
|
||||
(nav-bar:pack_start back false false 2)
|
||||
(nav-bar:pack_start url true true 2)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user