mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 02:09:28 +00:00
333751 - more integration with browser - co-opt the subscribe item in the location bar, add a link to this functionality from preferences (preliminary), and seed the web handler list with some default values. r=brettw@gmail.com
This commit is contained in:
parent
c5b6d0b775
commit
5a13686d84
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -245,9 +245,17 @@
|
||||
<menupopup position="after_end"
|
||||
onpopupshowing="return FeedHandler.buildFeedList(event);"
|
||||
#ifdef MOZ_PLACES
|
||||
#ifdef MOZ_FEEDS
|
||||
oncommand="loadURI(event.target.getAttribute('feed'), null, null, false);"/>
|
||||
#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
|
||||
</button>
|
||||
<image id="lock-icon" onclick="if (event.button == 0) displaySecurityInfo(); event.stopPropagation();"/>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<?xml-stylesheet href="chrome://mozapps/content/preferences/preferences.css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/feeds/subscribe.css"?>
|
||||
|
||||
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/feeds/options.dtd">
|
||||
|
||||
@ -40,8 +41,14 @@
|
||||
onpopupshowing="SubscriptionOptions.populateWebHandlers(this);"/>
|
||||
</menulist>
|
||||
<separator class="thin"/>
|
||||
<radio id="readerBookmarks" value="bookmarks"
|
||||
label="&readerBookmarks.label;" accesskey="&readerBookmarks.accesskey;"/>
|
||||
<hbox>
|
||||
<radio id="readerBookmarks" value="bookmarks"
|
||||
label="&readerBookmarks.label;" accesskey="&readerBookmarks.accesskey;"/>
|
||||
#if 0
|
||||
<button class="plain" url="&liveBookmarksInfo.url;"
|
||||
label="&liveBookmarksInfo.label;" accesskey="&liveBookmarksInfo.accesskey;"/>
|
||||
#endif
|
||||
</hbox>
|
||||
</radiogroup>
|
||||
<separator/>
|
||||
</groupbox>
|
||||
|
@ -566,10 +566,6 @@ var Module = {
|
||||
|
||||
var catman =
|
||||
Cc["@mozilla.org/categorymanager;1"].getService(Ci.nsICategoryManager);
|
||||
const JS_GLOBAL_PROP = "JavaScript global property";
|
||||
catman.addCategoryEntry(JS_GLOBAL_PROP, "goats", WCCR_CONTRACTID, true,
|
||||
true);
|
||||
|
||||
catman.addCategoryEntry("app-startup", WCCR_CLASSNAME,
|
||||
"service," + WCCR_CONTRACTID, true, true, null);
|
||||
},
|
||||
|
@ -193,4 +193,13 @@ var gGeneralPane = {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_FEEDS
|
||||
,
|
||||
|
||||
chooseFeedReader: function ()
|
||||
{
|
||||
openDialog("chrome://browser/content/feeds/options.xul", "", "modal,centerscreen");
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
@ -86,6 +86,19 @@
|
||||
oncommand="gGeneralPane.showConnections();"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
#ifdef MOZ_FEEDS
|
||||
# XXXben move this some place better after a2
|
||||
<groupbox align="start">
|
||||
<caption label="&feedReader.label;"/>
|
||||
|
||||
<description>&feedReader.info;</description>
|
||||
|
||||
<button id="feedReader"
|
||||
label="&chooseFeedReader.label;" accesskey="&chooseFeedReader.accesskey;"
|
||||
oncommand="gGeneralPane.chooseFeedReader();"/>
|
||||
</groupbox>
|
||||
#endif
|
||||
<separator/>
|
||||
</prefpane>
|
||||
|
||||
|
@ -114,10 +114,8 @@ updatesItem_pending=Apply Downloaded Update Now...
|
||||
updatesItem_pendingFallback=Apply Downloaded Update Now...
|
||||
|
||||
# RSS Pretty Print
|
||||
feedTitle=Feed: %S
|
||||
feedDescription=This feed contains %S articles.
|
||||
feedAddLiveBookmarkLink=Add Live Bookmark...
|
||||
feedLiveBookmarkInfoText=What are Live Bookmarks?
|
||||
feedShowFeed=Add '%S' as Live Bookmark...
|
||||
feedHasFeeds=Add Live Bookmark...
|
||||
feedNoFeeds=Page has no feeds
|
||||
feedShowFeedNew=Subscribe to '%S'...
|
||||
feedHasFeedsNew=Subscribe to this page...
|
||||
|
@ -22,3 +22,11 @@
|
||||
"Choose...">
|
||||
<!ENTITY chooseClientApp.accesskey
|
||||
"C">
|
||||
|
||||
<!-- XXXben this needs to move somewhere else -->
|
||||
<!ENTITY liveBookmarksInfo.url
|
||||
"http://www.mozilla.com/firefox/livebookmarks.html">
|
||||
<!ENTITY liveBookmarksInfo.label
|
||||
"What are Live Bookmarks?">
|
||||
<!ENTITY liveBookmarksInfo.accesskey
|
||||
"B">
|
||||
|
@ -21,3 +21,8 @@
|
||||
<!ENTITY proxiesInfo.label "Determine how &brandShortName; connects to the Internet.">
|
||||
<!ENTITY connectionsInfo.caption "Connection">
|
||||
|
||||
<!-- XXXben improve this text -->
|
||||
<!ENTITY feedReader.label "Feed Reader">
|
||||
<!ENTITY feedReader.info "Choose a Feed Reader to subscribe to web feeds with">
|
||||
<!ENTITY chooseFeedReader.label "Choose Feed Reader...">
|
||||
<!ENTITY chooseFeedReader.accesskey "F">
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
*[hidden] {
|
||||
display: none;
|
||||
}
|
||||
@ -44,12 +45,12 @@ html {
|
||||
|
||||
#feedSubscribeLine {
|
||||
padding: 1em;
|
||||
background: -moz-Field;
|
||||
-moz-border-radius: 3px;
|
||||
}
|
||||
|
||||
#feedHeader[firstrun="true"] #feedSubscribeLine {
|
||||
margin-left: 1.7em;
|
||||
background: -moz-Field;
|
||||
}
|
||||
|
||||
#feedSubscribeHandler {
|
||||
@ -142,3 +143,13 @@ a[href] img {
|
||||
margin: 0 0 0 .6em;
|
||||
}
|
||||
|
||||
.link {
|
||||
color: #0000FF;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.link:hover:active {
|
||||
color: #FF0000;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user