[Pkg-mozext-commits] [compactheader] 35/441: New version: 0.5.2: Remove bug in RSS Linkify Subject: Copy link not text to clipboard

David Prévot taffit at moszumanska.debian.org
Wed Mar 18 12:28:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository compactheader.

commit ce8c53f454d1383624c9ec7185905bb2a3fdb348
Author: joachim.herb <none at none>
Date:   Tue Sep 1 22:13:31 2009 +0000

    New version: 0.5.2:
    Remove bug in RSS Linkify Subject: Copy link not text to clipboard
---
 chrome/CompactHeader/content/compactHeaderOverlay.js  | 18 +++++++++++++++++-
 chrome/CompactHeader/content/compactHeaderOverlay.xul |  6 ++++++
 install.rdf                                           |  2 +-
 3 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/chrome/CompactHeader/content/compactHeaderOverlay.js b/chrome/CompactHeader/content/compactHeaderOverlay.js
index aef8064..ac96fb7 100644
--- a/chrome/CompactHeader/content/compactHeaderOverlay.js
+++ b/chrome/CompactHeader/content/compactHeaderOverlay.js
@@ -310,7 +310,7 @@ function coheInitializeHeaderViewTables()
 	  RSSLinkify.newSubject.setAttribute("id", "collapsedsubjectlinkValue");
 	  RSSLinkify.newSubject.setAttribute("class", "headerValue plain headerValueUrl");
 	  RSSLinkify.newSubject.setAttribute("originalclass", "headerValue plain headerValueUrl");
-	  RSSLinkify.newSubject.setAttribute("context", "copyUrlPopup");
+	  RSSLinkify.newSubject.setAttribute("context", "CohecopyUrlPopup");
 	  RSSLinkify.newSubject.setAttribute("keywordrelated", "true");
 	  RSSLinkify.newSubject.setAttribute("readonly", "true");
 	  RSSLinkify.newSubject.setAttribute("appendoriginalclass", "true");
@@ -429,6 +429,7 @@ function coheUpdateHeaderView()
 		    RSSLinkify.newSubject.setAttribute("onclick", "if (!event.button) messenger.launchExternalURL('" + 
 		                                        url.headerValue + "');");
 		    RSSLinkify.newSubject.setAttribute("value", currentHeaderData["subject"].headerValue);
+		    RSSLinkify.newSubject.setAttribute("url", url.headerValue);
 		    RSSLinkify.newSubject.setAttribute("collapsed", "false");
 		    RSSLinkify.oldSubject.setAttribute("collapsed", "true");
 		} else {
@@ -604,6 +605,21 @@ function MyInitViewHeadersMenu()
     menuitem.setAttribute("checked", "true");
 }
 
+function CoheCopyWebsiteAddress(websiteAddressNode)
+{
+  if (websiteAddressNode)
+  {
+    var websiteAddress = websiteAddressNode.getAttribute("url");
+
+    var contractid = "@mozilla.org/widget/clipboardhelper;1";
+    var iid = Components.interfaces.nsIClipboardHelper;
+    var clipboard = Components.classes[contractid].getService(iid);
+    clipboard.copyString(websiteAddress);
+  }
+}
+
+
+
 var myPrefObserverView =
 {
   register: function()
diff --git a/chrome/CompactHeader/content/compactHeaderOverlay.xul b/chrome/CompactHeader/content/compactHeaderOverlay.xul
index fc8f0e0..3ecd222 100644
--- a/chrome/CompactHeader/content/compactHeaderOverlay.xul
+++ b/chrome/CompactHeader/content/compactHeaderOverlay.xul
@@ -33,6 +33,7 @@
 	    <command id="cmd_viewNormalHeader" oncommand="alert('test2');goDoCommand('cmd_viewNormalHeader'); event.stopPropagation()"/>
 	</commandset>
 
+
 	<keyset>
 		<key id="hideDetailsKey" 
 				 modifiers="shift" 
@@ -40,6 +41,7 @@
 				 oncommand="coheToggleHeaderView();"/>
 	</keyset>
 
+
   <deck id="msgHeaderViewDeck">
 
 
@@ -125,6 +127,10 @@
 	</hbox>
 
 	<hbox id="collapsedHeaderView" flex="2" pack="start" class="header-part1 headerContainer">
+		<popup id="copyUrlPopup" hidden="true"/>
+		<popup id="CohecopyUrlPopup" popupanchor="bottomleft">
+			<menuitem label="&copyLinkCmd.label;" accesskey="&copyLinkCmd.accesskey;" oncommand="CoheCopyWebsiteAddress(document.popupNode)"/>
+		</popup>
     <vbox id="showDetailsButtonBox" align="start" flex="0">
 	    <button id="showDetailsButton"
 		          tooltiptext="&showDetailsButton.label;"
diff --git a/install.rdf b/install.rdf
index c356880..fba1594 100644
--- a/install.rdf
+++ b/install.rdf
@@ -6,7 +6,7 @@
 
 	<RDF:Description about="urn:mozilla:install-manifest">
 		<em:name>CompactHeader</em:name>
-		<em:version>0.5.1</em:version>
+		<em:version>0.5.2</em:version>
 		<em:description>Add ability to reduce header size to one or two lines. Linkify subjects in RSS feeds.</em:description>
 		<em:creator>Joachim Herb</em:creator>
 		<em:contributor>Zamula</em:contributor>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/compactheader.git



More information about the Pkg-mozext-commits mailing list