hook up the history logger thing
This commit is contained in:
parent
3cbe77a55e
commit
24613ea424
@ -18,6 +18,10 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(local history (require :history))
|
||||||
|
(tset _G :history (history.open
|
||||||
|
(.. (os.getenv "HOME") "/.dunlin-history.db")))
|
||||||
|
|
||||||
(let [f (Frame.new my-keymap)
|
(let [f (Frame.new my-keymap)
|
||||||
b (Buffer.new "main")]
|
b (Buffer.new "main")]
|
||||||
(f:show-buffer b)
|
(f:show-buffer b)
|
||||||
|
@ -38,12 +38,15 @@
|
|||||||
contentwidget (Gtk.Box {
|
contentwidget (Gtk.Box {
|
||||||
:orientation Gtk.Orientation.VERTICAL
|
:orientation Gtk.Orientation.VERTICAL
|
||||||
})
|
})
|
||||||
update-prop (fn [name value]
|
update-prop (fn [props name value]
|
||||||
(match name
|
(match name
|
||||||
:estimated-load-progress
|
:estimated-load-progress
|
||||||
(tset progress-bar :fraction value)
|
(tset progress-bar :fraction value)
|
||||||
:uri
|
:uri
|
||||||
(tset echo-area :label value)
|
(do (tset echo-area :label value)
|
||||||
|
(_G.history:visit value (os.time)))
|
||||||
|
:title
|
||||||
|
(_G.history:title self.buffer.properties.uri value)
|
||||||
n
|
n
|
||||||
(comment (print "prop change" n value))))]
|
(comment (print "prop change" n value))))]
|
||||||
|
|
||||||
@ -91,7 +94,7 @@
|
|||||||
(b:subscribe-property-changes
|
(b:subscribe-property-changes
|
||||||
(fn [name val]
|
(fn [name val]
|
||||||
(if (= b self.buffer)
|
(if (= b self.buffer)
|
||||||
(update-prop name val)
|
(update-prop self name val)
|
||||||
(print "ignore props from background" b))))
|
(print "ignore props from background" b))))
|
||||||
(b.webview:show))
|
(b.webview:show))
|
||||||
}]
|
}]
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
(icollect [r (s:nrows)] r)))
|
(icollect [r (s:nrows)] r)))
|
||||||
|
|
||||||
(fn open [pathname]
|
(fn open [pathname]
|
||||||
(let [db (if pathname (sqlite:open pathname) (sqlite:open_memory))]
|
(let [db (if pathname (sqlite.open pathname) (sqlite.open_memory))]
|
||||||
(migrate-all db)
|
(migrate-all db)
|
||||||
{
|
{
|
||||||
: db
|
: db
|
||||||
|
Loading…
Reference in New Issue
Block a user