diff --git a/command.fnl b/command.fnl index 62d4f62..9eeb629 100644 --- a/command.fnl +++ b/command.fnl @@ -205,12 +205,8 @@ (fn new-commander [frame] (let [entry (Gtk.Entry {:sensitive false }) prompt (Gtk.Label { :label ""}) - box (Gtk.Box { - :orientation Gtk.Orientation.VERTICAL - }) - hbox (Gtk.Box { - :orientation Gtk.Orientation.HORIZONTAL - }) + box (Gtk.Box { :orientation Gtk.Orientation.VERTICAL }) + hbox (Gtk.Box { :orientation Gtk.Orientation.HORIZONTAL }) completions (Gtk.FlowBox) self { :state default-state @@ -230,13 +226,9 @@ (hbox:pack_start entry true true 5) (box:pack_start hbox true false 0) (box:pack_start completions true true 0) - (tset entry :on_changed - (fn [event] - (self:on-input event.text))) + (tset entry :on_changed #(self:on-input $1.text)) (tset entry :on_activate - (fn [event] - (let [result (self:on-input-finished event.text)] - (update-widget-state self result)))) + #(update-widget-state self (self:on-input-finished $1.text))) self)) diff --git a/history.fnl b/history.fnl index a508371..4a96d91 100644 --- a/history.fnl +++ b/history.fnl @@ -42,7 +42,6 @@ (s:nrows))) (fn find-distinct [self term] - (print :self self :term term) (let [s (self.db:prepare "select distinct v.url,pt.title from visits v left join page_titles pt on v.url = pt.url where instr(v.url, ?) >0")] (assert (= 0 (s:bind_values term))) (s:nrows)))