зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
c5b6d0b775
Коммит
5a13686d84
|
@ -447,3 +447,20 @@ pref("view_source.editor.path", "");
|
||||||
pref("view_source.editor.external", false);
|
pref("view_source.editor.external", false);
|
||||||
|
|
||||||
pref("browser.send_pings", true);
|
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);
|
var feeds = harvestFeeds(feeds);
|
||||||
if (feeds.length == 1) {
|
if (feeds.length == 1) {
|
||||||
#ifdef MOZ_PLACES
|
#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);
|
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
|
#else
|
||||||
this.addLiveBookmark(feeds[0].href);
|
this.addLiveBookmark(feeds[0].href);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -6182,7 +6194,11 @@ var FeedHandler = {
|
||||||
var feedInfo = feeds[i];
|
var feedInfo = feeds[i];
|
||||||
var menuItem = document.createElement("menuitem");
|
var menuItem = document.createElement("menuitem");
|
||||||
var baseTitle = feedInfo.title || feedInfo.href;
|
var baseTitle = feedInfo.title || feedInfo.href;
|
||||||
|
#ifdef MOZ_FEEDS
|
||||||
|
var labelStr = gNavigatorBundle.getFormattedString("feedShowFeedNew", [baseTitle]);
|
||||||
|
#else
|
||||||
var labelStr = gNavigatorBundle.getFormattedString("feedShowFeed", [baseTitle]);
|
var labelStr = gNavigatorBundle.getFormattedString("feedShowFeed", [baseTitle]);
|
||||||
|
#endif
|
||||||
menuItem.setAttribute("label", labelStr);
|
menuItem.setAttribute("label", labelStr);
|
||||||
menuItem.setAttribute("feed", feedInfo.href);
|
menuItem.setAttribute("feed", feedInfo.href);
|
||||||
menuItem.setAttribute("tooltiptext", feedInfo.href);
|
menuItem.setAttribute("tooltiptext", feedInfo.href);
|
||||||
|
@ -6239,7 +6255,11 @@ var FeedHandler = {
|
||||||
} else {
|
} else {
|
||||||
feedButton.setAttribute("feeds", "true");
|
feedButton.setAttribute("feeds", "true");
|
||||||
feedButton.setAttribute("tooltiptext",
|
feedButton.setAttribute("tooltiptext",
|
||||||
|
#ifdef MOZ_FEEDS
|
||||||
|
gNavigatorBundle.getString("feedHasFeedsNew"));
|
||||||
|
#else
|
||||||
gNavigatorBundle.getString("feedHasFeeds"));
|
gNavigatorBundle.getString("feedHasFeeds"));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -6301,7 +6321,11 @@ var FeedHandler = {
|
||||||
if (feedButton) {
|
if (feedButton) {
|
||||||
feedButton.setAttribute("feeds", "true");
|
feedButton.setAttribute("feeds", "true");
|
||||||
feedButton.setAttribute("tooltiptext",
|
feedButton.setAttribute("tooltiptext",
|
||||||
|
#ifdef MOZ_FEEDS
|
||||||
|
gNavigatorBundle.getString("feedHasFeedsNew"));
|
||||||
|
#else
|
||||||
gNavigatorBundle.getString("feedHasFeeds"));
|
gNavigatorBundle.getString("feedHasFeeds"));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,9 +245,17 @@
|
||||||
<menupopup position="after_end"
|
<menupopup position="after_end"
|
||||||
onpopupshowing="return FeedHandler.buildFeedList(event);"
|
onpopupshowing="return FeedHandler.buildFeedList(event);"
|
||||||
#ifdef MOZ_PLACES
|
#ifdef MOZ_PLACES
|
||||||
|
#ifdef MOZ_FEEDS
|
||||||
|
oncommand="loadURI(event.target.getAttribute('feed'), null, null, false);"/>
|
||||||
|
#else
|
||||||
oncommand="PlacesCommandHook.addLiveBookmark(event.target.getAttribute('feed'));" />
|
oncommand="PlacesCommandHook.addLiveBookmark(event.target.getAttribute('feed'));" />
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#ifdef MOZ_FEEDS
|
||||||
|
oncommand="loadURI(event.target.getAttribute('feed'), null, null, false);"/>
|
||||||
#else
|
#else
|
||||||
oncommand="FeedHandler.addLiveBookmark(event.target.getAttribute('feed'));" />
|
oncommand="FeedHandler.addLiveBookmark(event.target.getAttribute('feed'));" />
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
</button>
|
</button>
|
||||||
<image id="lock-icon" onclick="if (event.button == 0) displaySecurityInfo(); event.stopPropagation();"/>
|
<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://mozapps/content/preferences/preferences.css"?>
|
||||||
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
|
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
|
||||||
<?xml-stylesheet href="chrome://global/skin/"?>
|
<?xml-stylesheet href="chrome://global/skin/"?>
|
||||||
|
<?xml-stylesheet href="chrome://browser/skin/feeds/subscribe.css"?>
|
||||||
|
|
||||||
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/feeds/options.dtd">
|
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/feeds/options.dtd">
|
||||||
|
|
||||||
|
@ -40,8 +41,14 @@
|
||||||
onpopupshowing="SubscriptionOptions.populateWebHandlers(this);"/>
|
onpopupshowing="SubscriptionOptions.populateWebHandlers(this);"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
<separator class="thin"/>
|
<separator class="thin"/>
|
||||||
<radio id="readerBookmarks" value="bookmarks"
|
<hbox>
|
||||||
label="&readerBookmarks.label;" accesskey="&readerBookmarks.accesskey;"/>
|
<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>
|
</radiogroup>
|
||||||
<separator/>
|
<separator/>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
|
@ -566,10 +566,6 @@ var Module = {
|
||||||
|
|
||||||
var catman =
|
var catman =
|
||||||
Cc["@mozilla.org/categorymanager;1"].getService(Ci.nsICategoryManager);
|
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,
|
catman.addCategoryEntry("app-startup", WCCR_CLASSNAME,
|
||||||
"service," + WCCR_CONTRACTID, true, true, null);
|
"service," + WCCR_CONTRACTID, true, true, null);
|
||||||
},
|
},
|
||||||
|
|
|
@ -193,4 +193,13 @@ var gGeneralPane = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef MOZ_FEEDS
|
||||||
|
,
|
||||||
|
|
||||||
|
chooseFeedReader: function ()
|
||||||
|
{
|
||||||
|
openDialog("chrome://browser/content/feeds/options.xul", "", "modal,centerscreen");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -86,6 +86,19 @@
|
||||||
oncommand="gGeneralPane.showConnections();"/>
|
oncommand="gGeneralPane.showConnections();"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</groupbox>
|
</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/>
|
<separator/>
|
||||||
</prefpane>
|
</prefpane>
|
||||||
|
|
||||||
|
|
|
@ -114,10 +114,8 @@ updatesItem_pending=Apply Downloaded Update Now...
|
||||||
updatesItem_pendingFallback=Apply Downloaded Update Now...
|
updatesItem_pendingFallback=Apply Downloaded Update Now...
|
||||||
|
|
||||||
# RSS Pretty Print
|
# 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...
|
feedShowFeed=Add '%S' as Live Bookmark...
|
||||||
feedHasFeeds=Add Live Bookmark...
|
feedHasFeeds=Add Live Bookmark...
|
||||||
feedNoFeeds=Page has no feeds
|
feedNoFeeds=Page has no feeds
|
||||||
|
feedShowFeedNew=Subscribe to '%S'...
|
||||||
|
feedHasFeedsNew=Subscribe to this page...
|
||||||
|
|
|
@ -22,3 +22,11 @@
|
||||||
"Choose...">
|
"Choose...">
|
||||||
<!ENTITY chooseClientApp.accesskey
|
<!ENTITY chooseClientApp.accesskey
|
||||||
"C">
|
"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 proxiesInfo.label "Determine how &brandShortName; connects to the Internet.">
|
||||||
<!ENTITY connectionsInfo.caption "Connection">
|
<!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] {
|
*[hidden] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -44,12 +45,12 @@ html {
|
||||||
|
|
||||||
#feedSubscribeLine {
|
#feedSubscribeLine {
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
background: -moz-Field;
|
|
||||||
-moz-border-radius: 3px;
|
-moz-border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#feedHeader[firstrun="true"] #feedSubscribeLine {
|
#feedHeader[firstrun="true"] #feedSubscribeLine {
|
||||||
margin-left: 1.7em;
|
margin-left: 1.7em;
|
||||||
|
background: -moz-Field;
|
||||||
}
|
}
|
||||||
|
|
||||||
#feedSubscribeHandler {
|
#feedSubscribeHandler {
|
||||||
|
@ -142,3 +143,13 @@ a[href] img {
|
||||||
margin: 0 0 0 .6em;
|
margin: 0 0 0 .6em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.link {
|
||||||
|
color: #0000FF;
|
||||||
|
text-decoration: underline;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link:hover:active {
|
||||||
|
color: #FF0000;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче