diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 62534fb68fe9..681d77625d36 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -447,3 +447,20 @@ pref("view_source.editor.path", ""); pref("view_source.editor.external", false); pref("browser.send_pings", true); + +#ifdef MOZ_FEEDS +// XXXben This is just here for demo purposes until web registration works! +// XXXben Needs Localization! +pref("browser.contentHandlers.types.title0", "Netvibes"); +pref("browser.contentHandlers.types.uri0", "http://www.netvibes.com/subscribe.php?url=%s"); +pref("browser.contentHandlers.types.type0", "application/vnd.mozilla.maybe.feed"); +pref("browser.contentHandlers.types.title1", "My Yahoo"); +pref("browser.contentHandlers.types.uri1", "http://add.my.yahoo.com/rss?url=%s"); +pref("browser.contentHandlers.types.type1", "application/vnd.mozilla.maybe.feed"); +pref("browser.contentHandlers.types.title2", "Bloglines"); +pref("browser.contentHandlers.types.uri2", "http://www.bloglines.com/login?r=/sub/%s"); +pref("browser.contentHandlers.types.type2", "application/vnd.mozilla.maybe.feed"); +pref("browser.contentHandlers.types.title3", "iGoogle/Google Reader"); +pref("browser.contentHandlers.types.uri3", "http://fusion.google.com/add?feedurl=%s"); +pref("browser.contentHandlers.types.type3", "application/vnd.mozilla.maybe.feed"); +#endif diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 07031f55e211..d1eb144d588c 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -6170,9 +6170,21 @@ var FeedHandler = { var feeds = harvestFeeds(feeds); if (feeds.length == 1) { #ifdef MOZ_PLACES +#ifdef MOZ_FEEDS + // Just load the feed in the content area to either subscribe or show the + // preview UI + loadURI(feeds[0].href, null, null, false); +#else PlacesCommandHook.addLiveBookmark(feeds[0].href); +#endif +#else +#ifdef MOZ_FEEDS + // Just load the feed in the content area to either subscribe or show the + // preview UI + loadURI(feeds[0].href, null, null, false); #else this.addLiveBookmark(feeds[0].href); +#endif #endif return false; } @@ -6182,7 +6194,11 @@ var FeedHandler = { var feedInfo = feeds[i]; var menuItem = document.createElement("menuitem"); var baseTitle = feedInfo.title || feedInfo.href; +#ifdef MOZ_FEEDS + var labelStr = gNavigatorBundle.getFormattedString("feedShowFeedNew", [baseTitle]); +#else var labelStr = gNavigatorBundle.getFormattedString("feedShowFeed", [baseTitle]); +#endif menuItem.setAttribute("label", labelStr); menuItem.setAttribute("feed", feedInfo.href); menuItem.setAttribute("tooltiptext", feedInfo.href); @@ -6239,7 +6255,11 @@ var FeedHandler = { } else { feedButton.setAttribute("feeds", "true"); feedButton.setAttribute("tooltiptext", +#ifdef MOZ_FEEDS + gNavigatorBundle.getString("feedHasFeedsNew")); +#else gNavigatorBundle.getString("feedHasFeeds")); +#endif } }, @@ -6301,7 +6321,11 @@ var FeedHandler = { if (feedButton) { feedButton.setAttribute("feeds", "true"); feedButton.setAttribute("tooltiptext", +#ifdef MOZ_FEEDS + gNavigatorBundle.getString("feedHasFeedsNew")); +#else gNavigatorBundle.getString("feedHasFeeds")); +#endif } } } diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index e75c98ba47bf..923179fc6799 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -245,9 +245,17 @@ +#else oncommand="PlacesCommandHook.addLiveBookmark(event.target.getAttribute('feed'));" /> +#endif +#else +#ifdef MOZ_FEEDS + oncommand="loadURI(event.target.getAttribute('feed'), null, null, false);"/> #else oncommand="FeedHandler.addLiveBookmark(event.target.getAttribute('feed'));" /> +#endif #endif diff --git a/browser/components/feeds/content/options.xul b/browser/components/feeds/content/options.xul index 5a3e01f57344..08362edb36db 100644 --- a/browser/components/feeds/content/options.xul +++ b/browser/components/feeds/content/options.xul @@ -3,6 +3,7 @@ + @@ -40,8 +41,14 @@ onpopupshowing="SubscriptionOptions.populateWebHandlers(this);"/> - + + +#if 0 +