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:
scott%scott-macgregor.org 2005-04-11 23:28:14 +00:00
Родитель 09caf82f81
Коммит e2ade649ba
4 изменённых файлов: 43 добавлений и 15 удалений

Просмотреть файл

@ -60,7 +60,7 @@ function onLoad()
{
// if we are editing an existing feed, disable the top level account
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("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
style="width: 40em;"
#else
style="width: 30em;"
style="width: 33em;"
#endif
buttons="accept,cancel"
onload="onLoad();"
ondialogaccept="return onOk();">
<popup id="copyUrlPopup" popupanchor="bottomleft">
<menuitem label="&copyLinkCmd.label;" accesskey="&copyLinkCmd.accesskey;" oncommand="CopyWebsiteAddress(document.popupNode)"/>
</popup>
<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">
<columns>
@ -64,11 +68,10 @@
<column flex="1"/>
</columns>
<rows>
<rows>
<row>
<label value="&feedLocation.label;" accesskey="&feedLocation.accesskey;" control="feedLocation"/>
<textbox id="feedLocation"/>
<label value="&feedLocation.label;" accesskey="&feedLocation.accesskey;" control="feedLocation"/>
<textbox id="feedLocation" context="copyUrlPopup"/>
</row>
<row>

Просмотреть файл

@ -303,6 +303,11 @@ var gFeedSubscriptionsWindow = {
{
var item = this.getItemAtIndex(aIndex);
if (!item) return;
// save off the current selection item
var seln = this.selection;
var currentSelectionIndex = seln.currentIndex;
var multiplier = item.open ? -1 : 1;
var delta = multiplier * item.children.length;
this.mRowCount += delta;
@ -316,6 +321,10 @@ var gFeedSubscriptionsWindow = {
// add or remove the children from our view
item.open = !item.open;
gFeedSubscriptionsWindow.mTree.treeBoxObject.rowCountChanged(aIndex, delta);
// now restore selection
seln.select(currentSelectionIndex);
},
cycleHeader: function (aColumn) {},
selectionChanged: function () {},

Просмотреть файл

@ -1,14 +1,16 @@
<!-- Feed Properties Dialog -->
<!ENTITY window.title "Feed Properties">
<!ENTITY window.title "Feed Properties">
<!ENTITY feedFolder.label "Store Articles in: ">
<!ENTITY feedFolder.accesskey "S">
<!ENTITY feedFolder.label "Store Articles in: ">
<!ENTITY feedFolder.accesskey "S">
<!ENTITY feedLocation.label "Feed URL: ">
<!ENTITY feedLocation.accesskey "F">
<!ENTITY feedLocation.label "Feed URL: ">
<!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.accesskey "h">
<!ENTITY quickMode.label "Show the article summary instead of loading the web page">
<!ENTITY quickMode.accesskey "h">
<!ENTITY copyLinkCmd.label "Copy Link Location">
<!ENTITY copyLinkCmd.accesskey "C">