Mercurial > snowl
changeset 317:27a89f014e81
rename SourcesView to CollectionsView
author | Myk Melez <myk@mozilla.org> |
---|---|
date | Thu, 09 Oct 2008 15:42:00 -0700 |
parents | 142c648208cc |
children | 0856399a6a9e |
files | content/collections.js content/collections.xul content/river.js content/sources.xul content/toolbar.js |
diffstat | 5 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/content/collections.js Thu Oct 09 15:36:28 2008 -0700 +++ b/content/collections.js Thu Oct 09 15:42:00 2008 -0700 @@ -47,7 +47,7 @@ // FIXME: make this configurable. const SNOWL_COLLECTIONS_HIERARCHICAL = false; -let SourcesView = { +let CollectionsView = { _log: null, // Observer Service @@ -83,7 +83,7 @@ // clicked on a row that is already selected (in which case we let them edit // the collection name). // FIXME: disable this for names that can't be changed. - this._tree.addEventListener("mousedown", function(aEvent) { SourcesView.onClick(aEvent) }, true); + this._tree.addEventListener("mousedown", function(aEvent) { CollectionsView.onClick(aEvent) }, true); }, @@ -348,4 +348,4 @@ }; -window.addEventListener("load", function() { SourcesView.init() }, true); +window.addEventListener("load", function() { CollectionsView.init() }, true);
--- a/content/collections.xul Thu Oct 09 15:36:28 2008 -0700 +++ b/content/collections.xul Thu Oct 09 15:42:00 2008 -0700 @@ -46,7 +46,7 @@ <vbox id="collectionsViewBox"> <tree id="sourcesView" flex="1" context="sourcesContextMenu" editable="true" - onselect="SourcesView.onSelect(event)"> + onselect="CollectionsView.onSelect(event)"> <treecols> <treecol id="nameCol" label="&nameCol.label;" primary="true" flex="1"/> </treecols>
--- a/content/river.js Thu Oct 09 15:36:28 2008 -0700 +++ b/content/river.js Thu Oct 09 15:42:00 2008 -0700 @@ -257,11 +257,11 @@ let selected = false; if ("collection" in this._params) { //dump("this._params.collection: " + this._params.collection + "; this._params.group: " + this._params.group + "\n"); - for (let i = 0; i < SourcesView._rows.length; i++) { - let collection = SourcesView._rows[i]; + for (let i = 0; i < CollectionsView._rows.length; i++) { + let collection = CollectionsView._rows[i]; //dump("collection id: " + collection.id + "; parent id: " + (collection.parent ? collection.parent.id : "no parent") + "; collection.name = " + collection.name + "\n"); if (collection.id == this._params.collection) { - SourcesView._tree.view.selection.select(i); + CollectionsView._tree.view.selection.select(i); selected = true; break; } @@ -269,14 +269,14 @@ collection.parent && collection.parent.id == this._params.collection && collection.name == this._params.group) { - SourcesView._tree.view.selection.select(i); + CollectionsView._tree.view.selection.select(i); selected = true; break; } } } if (!selected) - SourcesView._tree.view.selection.select(0); + CollectionsView._tree.view.selection.select(0); },
--- a/content/sources.xul Thu Oct 09 15:36:28 2008 -0700 +++ b/content/sources.xul Thu Oct 09 15:42:00 2008 -0700 @@ -60,7 +60,7 @@ <separator class="thin" orient="horizontal"/> <tree id="sourcesView" flex="1" context="sourcesContextMenu" editable="true" - onselect="SourcesView.onSelect(event)"> + onselect="CollectionsView.onSelect(event)"> <treecols> <treecol id="nameCol" label="&nameCol.label;" primary="true" flex="1"/> </treecols>
--- a/content/toolbar.js Thu Oct 09 15:36:28 2008 -0700 +++ b/content/toolbar.js Thu Oct 09 15:42:00 2008 -0700 @@ -46,7 +46,7 @@ // FIXME: make this work again. // FIXME: make this not be specific to the tree in the collections view. unsubscribe: function(aEvent) { - SourcesView.unsubscribe(); + CollectionsView.unsubscribe(); }, // FIXME: make this be context-specific, so if we're viewing a single source