mirror of
https://github.com/unclebob/more-speech.git
synced 2024-09-29 18:10:45 +00:00
Fix bug that prevented tab names from showing up in the tabs window. (dumb!)
This commit is contained in:
parent
4bda61802e
commit
44ae7451c2
@ -166,9 +166,15 @@
|
||||
|
||||
(context "tab names"
|
||||
(it "gets list of changeable tab names"
|
||||
(set-mem :tabs-list [{:name "all" :selected [1] :blocked [2]}
|
||||
{:name "tab" :selected [3] :blocked 4}
|
||||
{:name "trusted" :selected [:trusted] :blocked []}])
|
||||
(should= ["tab"] (get-changeable-tab-names))))
|
||||
(set-mem :tabs-list [{:name "all" :selected [1] :blocked [2]}
|
||||
{:name "tab" :selected [3] :blocked [4]}
|
||||
{:name "trusted" :selected [:trusted] :blocked []}])
|
||||
(should= ["tab"] (get-changeable-tab-names)))
|
||||
|
||||
(it "gets list of changeable tab descriptors"
|
||||
(set-mem :tabs-list [{:name "all" :selected [1] :blocked [2]}
|
||||
{:name "tab" :selected [3] :blocked [4]}
|
||||
{:name "trusted" :selected [:trusted] :blocked []}])
|
||||
(should= [{:name "tab" :selected [3] :blocked [4]}] (get-changeable-tab-descriptors))))
|
||||
)
|
||||
|
||||
|
@ -292,7 +292,7 @@
|
||||
|
||||
(defn article-click [tab-index e]
|
||||
(if-not (.isPopupTrigger e)
|
||||
(node-selected tab-index e)
|
||||
(future (node-selected tab-index e))
|
||||
(let [tree (.getComponent e)
|
||||
path (.getPathForLocation tree (.getX e) (.getY e))
|
||||
node (.getLastPathComponent path)
|
||||
|
@ -55,5 +55,9 @@
|
||||
(vec (remove is-unchangeable-tab-name
|
||||
(map :name (get-mem :tabs-list)))))
|
||||
|
||||
(defn get-changeable-tab-descriptors []
|
||||
(vec (remove #(is-unchangeable-tab-name (:name %))
|
||||
(get-mem :tabs-list))))
|
||||
|
||||
|
||||
|
||||
|
@ -120,7 +120,7 @@
|
||||
:content tab-window}))
|
||||
|
||||
(defn make-tabs []
|
||||
(loop [tabs-list (tabs-util/get-changeable-tab-names)
|
||||
(loop [tabs-list (tabs-util/get-changeable-tab-descriptors)
|
||||
header-tree-tabs []]
|
||||
(if (empty? tabs-list)
|
||||
(let [all-ids (get-mem [:tabs-window :all-ids])]
|
||||
|
Loading…
Reference in New Issue
Block a user