make the collections view load into the river view even when query params have been altered

This commit is contained in:
Myk Melez 2008-07-20 22:05:44 -07:00
Родитель 8222edcf75
Коммит 43e3627c5a
4 изменённых файлов: 15 добавлений и 4 удалений

Просмотреть файл

@ -2,5 +2,4 @@ content snowl content/
locale snowl en-US locale/en-US/
overlay chrome://browser/content/browser.xul chrome://snowl/content/snowl.xul
overlay chrome://snowl/content/sidebar.xul chrome://snowl/content/collections.xul
overlay chrome://snowl/content/river.xul chrome://snowl/content/collections.xul
resource snowl ./

Просмотреть файл

@ -7,7 +7,7 @@ Cu.import("resource://snowl/modules/URI.js");
Cu.import("resource://snowl/modules/identity.js");
Cu.import("resource://snowl/modules/collection.js");
SourcesView = {
let SourcesView = {
_log: null,
// Observer Service
@ -404,4 +404,10 @@ this._log.info(row.value + " is not selected");
};
window.addEventListener("load", function() { SourcesView.init() }, false);
// We can't listen for load and initialize then because load has already
// happened when we get overlaid onto the river view, so we just set a timeout
// by which time we hope the overlay has been loaded enough for this to work.
// FIXME: figure out a better solution here. In theory we should be able
// to make the river view observe xul-overlay-merged and then initialize us,
// but that doesn't work because of bug 392515.
window.setTimeout(function() { SourcesView.init() }, 100);

Просмотреть файл

@ -62,7 +62,7 @@
image="chrome://snowl/content/icons/opml-icon-16x16.png"
oncommand="SourcesView.exportOPML()"/>
</toolbar>
<tree id="sourcesView" flex="1" context="sourcesContextMenu" editable="true"
onselect="SourcesView.onSelect(event)">
<treecols>

Просмотреть файл

@ -188,6 +188,12 @@ let SnowlMessageView = {
this._window = new XPCNativeWrapper(window);
this._document = this._window.document;
// We have to load the overlay manually because we modify the query params
// of the river view URL to reflect the selected collection and filters,
// and chrome.manifest overlay instructions only work on exact matches
// of the entire URL.
document.loadOverlay("chrome://snowl/content/collections.xul", null);
this._collection = new SnowlCollection();
this._updateToolbar();
this.writeContent();