зеркало из https://github.com/mozilla/gecko-dev.git
Bug #287623 --> Allow copying of RSS feed URL from the properties dialog
make the feed properties dialog a little wider. Fix a problem with double clicking a feed folder
This commit is contained in:
Родитель
f49e273c6e
Коммит
79d8aa8242
|
@ -60,7 +60,7 @@ function onLoad()
|
||||||
{
|
{
|
||||||
// if we are editing an existing feed, disable the top level account
|
// if we are editing an existing feed, disable the top level account
|
||||||
rssAccountMenuItem.setAttribute('disabled', 'true');
|
rssAccountMenuItem.setAttribute('disabled', 'true');
|
||||||
feedLocationEl.disabled = true;
|
feedLocationEl.setAttribute('readonly', true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,3 +94,17 @@ function SetFolderPicker(uri,pickerID)
|
||||||
picker.setAttribute("label",msgfolder.name);
|
picker.setAttribute("label",msgfolder.name);
|
||||||
picker.setAttribute("uri",uri);
|
picker.setAttribute("uri",uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CopyWebsiteAddress takes the website address title button, extracts
|
||||||
|
// the website address we stored in there and copies it to the clipboard
|
||||||
|
function CopyWebsiteAddress(websiteAddressNode)
|
||||||
|
{
|
||||||
|
if (websiteAddressNode)
|
||||||
|
{
|
||||||
|
var websiteAddress = websiteAddressNode.value;
|
||||||
|
var contractid = "@mozilla.org/widget/clipboardhelper;1";
|
||||||
|
var iid = Components.interfaces.nsIClipboardHelper;
|
||||||
|
var clipboard = Components.classes[contractid].getService(iid);
|
||||||
|
clipboard.copyString(websiteAddress);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -49,14 +49,18 @@
|
||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
style="width: 40em;"
|
style="width: 40em;"
|
||||||
#else
|
#else
|
||||||
style="width: 30em;"
|
style="width: 33em;"
|
||||||
#endif
|
#endif
|
||||||
buttons="accept,cancel"
|
buttons="accept,cancel"
|
||||||
onload="onLoad();"
|
onload="onLoad();"
|
||||||
ondialogaccept="return onOk();">
|
ondialogaccept="return onOk();">
|
||||||
|
|
||||||
|
<popup id="copyUrlPopup" popupanchor="bottomleft">
|
||||||
|
<menuitem label="©LinkCmd.label;" accesskey="©LinkCmd.accesskey;" oncommand="CopyWebsiteAddress(document.popupNode)"/>
|
||||||
|
</popup>
|
||||||
|
|
||||||
<script type="application/x-javascript" src="feed-properties.js"/>
|
<script type="application/x-javascript" src="feed-properties.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://messenger/content/widgetglue.js"/>
|
<script type="application/x-javascript" src="chrome://messenger/content/widgetglue.js"/>
|
||||||
|
|
||||||
<grid flex="1">
|
<grid flex="1">
|
||||||
<columns>
|
<columns>
|
||||||
|
@ -64,11 +68,10 @@
|
||||||
<column flex="1"/>
|
<column flex="1"/>
|
||||||
</columns>
|
</columns>
|
||||||
|
|
||||||
<rows>
|
<rows>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<label value="&feedLocation.label;" accesskey="&feedLocation.accesskey;" control="feedLocation"/>
|
<label value="&feedLocation.label;" accesskey="&feedLocation.accesskey;" control="feedLocation"/>
|
||||||
<textbox id="feedLocation"/>
|
<textbox id="feedLocation" context="copyUrlPopup"/>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
|
|
|
@ -303,6 +303,11 @@ var gFeedSubscriptionsWindow = {
|
||||||
{
|
{
|
||||||
var item = this.getItemAtIndex(aIndex);
|
var item = this.getItemAtIndex(aIndex);
|
||||||
if (!item) return;
|
if (!item) return;
|
||||||
|
|
||||||
|
// save off the current selection item
|
||||||
|
var seln = this.selection;
|
||||||
|
var currentSelectionIndex = seln.currentIndex;
|
||||||
|
|
||||||
var multiplier = item.open ? -1 : 1;
|
var multiplier = item.open ? -1 : 1;
|
||||||
var delta = multiplier * item.children.length;
|
var delta = multiplier * item.children.length;
|
||||||
this.mRowCount += delta;
|
this.mRowCount += delta;
|
||||||
|
@ -316,6 +321,10 @@ var gFeedSubscriptionsWindow = {
|
||||||
// add or remove the children from our view
|
// add or remove the children from our view
|
||||||
item.open = !item.open;
|
item.open = !item.open;
|
||||||
gFeedSubscriptionsWindow.mTree.treeBoxObject.rowCountChanged(aIndex, delta);
|
gFeedSubscriptionsWindow.mTree.treeBoxObject.rowCountChanged(aIndex, delta);
|
||||||
|
|
||||||
|
// now restore selection
|
||||||
|
seln.select(currentSelectionIndex);
|
||||||
|
|
||||||
},
|
},
|
||||||
cycleHeader: function (aColumn) {},
|
cycleHeader: function (aColumn) {},
|
||||||
selectionChanged: function () {},
|
selectionChanged: function () {},
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
<!-- Feed Properties Dialog -->
|
<!-- Feed Properties Dialog -->
|
||||||
<!ENTITY window.title "Feed Properties">
|
<!ENTITY window.title "Feed Properties">
|
||||||
|
|
||||||
<!ENTITY feedFolder.label "Store Articles in: ">
|
<!ENTITY feedFolder.label "Store Articles in: ">
|
||||||
<!ENTITY feedFolder.accesskey "S">
|
<!ENTITY feedFolder.accesskey "S">
|
||||||
|
|
||||||
<!ENTITY feedLocation.label "Feed URL: ">
|
<!ENTITY feedLocation.label "Feed URL: ">
|
||||||
<!ENTITY feedLocation.accesskey "F">
|
<!ENTITY feedLocation.accesskey "F">
|
||||||
|
|
||||||
<!ENTITY choosethisfolder.label "choose this folder">
|
<!ENTITY choosethisfolder.label "choose this folder">
|
||||||
|
|
||||||
<!ENTITY quickMode.label "Show the article summary instead of loading the web page">
|
<!ENTITY quickMode.label "Show the article summary instead of loading the web page">
|
||||||
<!ENTITY quickMode.accesskey "h">
|
<!ENTITY quickMode.accesskey "h">
|
||||||
|
|
||||||
|
<!ENTITY copyLinkCmd.label "Copy Link Location">
|
||||||
|
<!ENTITY copyLinkCmd.accesskey "C">
|
||||||
|
|
Загрузка…
Ссылка в новой задаче