Mercurial > snowl
changeset 218:feeaa65c5260
make the subscribe page open to the specified tab
author | Myk Melez <myk@mozilla.org> |
---|---|
date | Tue, 29 Jul 2008 23:12:22 -0700 |
parents | 5140c1e26e6c |
children | a1820ad3ceab |
files | extension/content/firstrun.html extension/content/subscribe.js extension/content/subscribe.xul |
diffstat | 3 files changed, 17 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/extension/content/firstrun.html Tue Jul 29 23:01:28 2008 -0700 +++ b/extension/content/firstrun.html Tue Jul 29 23:12:22 2008 -0700 @@ -34,6 +34,7 @@ <ol> <li>Subscribe to feeds from the feed preview page.</li> <li><a href="chrome://snowl/content/subscribe.xul?page=twitter">Subscribe to Twitter</a>.</li> + <li><a href="chrome://snowl/content/subscribe.xul?page=opml">Import OPML</a>.</li> <li>Read messages in the <a href="javascript:gBrowserWindow.toggleSidebar('viewSnowlSidebar')">list view</a> or the <a href="chrome://snowl/content/river.xul">river view</a>.
--- a/extension/content/subscribe.js Tue Jul 29 23:01:28 2008 -0700 +++ b/extension/content/subscribe.js Tue Jul 29 23:12:22 2008 -0700 @@ -111,6 +111,18 @@ document.getElementById("locationTextbox").value = params.feed; this.subscribeFeed(); } + else if (params.page) { + let tabbox = document.getElementById("tabbox"); + switch (params.page) { + // The feed tab is selected by default. + case "twitter": + tabbox.selectedTab = document.getElementById("twitterTab"); + break; + case "opml": + tabbox.selectedTab = document.getElementById("opmlTab"); + break; + } + } }, destroy: function() {
--- a/extension/content/subscribe.xul Tue Jul 29 23:01:28 2008 -0700 +++ b/extension/content/subscribe.xul Tue Jul 29 23:12:22 2008 -0700 @@ -23,11 +23,11 @@ <separator class="groove-thin"/> <separator class="thin" orient="horizontal"/> - <tabbox> + <tabbox id="tabbox"> <tabs> - <tab label="&feedsTab.label;"/> - <tab label="&twitterTab.label;"/> - <tab label="&opmlTab.label;"/> + <tab id="feedTab" label="&feedsTab.label;"/> + <tab id="twitterTab" label="&twitterTab.label;"/> + <tab id="opmlTab" label="&opmlTab.label;"/> </tabs> <tabpanels>