[Pkg-mozext-commits] [compactheader] 210/441: Added patch by Axel Grude to change DispMUA icon

David Prévot taffit at moszumanska.debian.org
Wed Mar 18 12:29:00 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 0240212e2593da38dff9b50a878478f2369344e5
Author: joachim <none at none>
Date:   Mon Jun 6 01:50:35 2011 +0200

    Added patch by Axel Grude to change DispMUA icon
    
    --HG--
    branch : B_DispMUA_patch
---
 .project                                           | 11 ++++
 .../CompactHeader/content/compactHeaderOverlay.js  | 75 ++++++++++++++++++++--
 .../CompactHeader/content/compactHeaderOverlay.xul | 18 ++++++
 install.rdf                                        |  3 +-
 4 files changed, 100 insertions(+), 7 deletions(-)

diff --git a/.project b/.project
new file mode 100644
index 0000000..6b005d6
--- /dev/null
+++ b/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>compactheader.mozilla.org</name>
+	<comment>Cloned from https://hg.mozilla.org/users/Joachim.Herb_gmx.de/compactheader</comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
diff --git a/chrome/CompactHeader/content/compactHeaderOverlay.js b/chrome/CompactHeader/content/compactHeaderOverlay.js
index 2cdcdd8..c612067 100644
--- a/chrome/CompactHeader/content/compactHeaderOverlay.js
+++ b/chrome/CompactHeader/content/compactHeaderOverlay.js
@@ -342,6 +342,11 @@ org.mozdev.compactHeader.pane = function() {
       }
     }
 
+    var dispMUA = document.getElementById('dispMUA');
+    if (dispMUA) {
+      dispMUA.collapsed = true;
+    }
+
     debugLog("mid coheOnLoadMsgHeaderPane 4");
     setButtonStyle();
     org.mozdev.customizeHeaderToolbar.messenger.saveToolboxData();
@@ -1219,11 +1224,43 @@ org.mozdev.compactHeader.pane = function() {
   function dispMUACheck() {
     var dispMUAButton = document.getElementById("button-dispMUA");
     var dispMUABox = document.getElementById("dispMUA"); 
-    if (dispMUAButton && dispMUABox) {
-      dispMUABox.setAttribute("collapsed", "true");
+    dispMUABox.setAttribute("collapsed", "true"); // hide original
+    var IconContainerDispMUA = null;
+    if (dispMUAButton) {
+      /* expanded view 48 * 48 */
+      if (IconContainerDispMUA = document.getElementById("dispMUAiconExp")) {
+        IconContainerDispMUA.setAttribute("collapsed", "true");
+      }
+      /* two line view 32 * 32 */
+      if (IconContainerDispMUA = document.getElementById("dispMUAicon2line")) {
+        IconContainerDispMUA.setAttribute("collapsed", "true");
+      }
+      /* compact view 24 * 24 */
+      if (IconContainerDispMUA = document.getElementById("dispMUAiconCompact")) {
+        IconContainerDispMUA.setAttribute("collapsed", "true");
+      }
+
     }
     else if (dispMUABox){
-      dispMUABox.removeAttribute("collapsed");
+
+      /* expanded view 48 * 48 */
+      if (IconContainerDispMUA = document.getElementById("dispMUAiconExp")) {
+        IconContainerDispMUA.removeAttribute("collapsed");
+      }
+      if (cohePrefBranch.getBoolPref("headersize.twolineview")) {
+        /* two line view 32 * 32 */
+        if (IconContainerDispMUA = document.getElementById("dispMUAicon2line"))
+          IconContainerDispMUA.removeAttribute("collapsed");
+        if (IconContainerDispMUA = document.getElementById("dispMUAiconCompact"))
+          IconContainerDispMUA.setAttribute("collapsed", "true");
+      }
+      else {
+        /* compact view 24 * 24 */
+        if (IconContainerDispMUA = document.getElementById("dispMUAiconCompact"))
+          IconContainerDispMUA.removeAttribute("collapsed");
+        if (IconContainerDispMUA = document.getElementById("dispMUAicon2line"))
+          IconContainerDispMUA.setAttribute("collapsed", "true");
+      }
     }
   }
 
@@ -1243,9 +1280,22 @@ org.mozdev.compactHeader.pane = function() {
   function onChangeDispMUAicon(event) {
     if (event.attrName == "src") {
       var imageSrc = document.getElementById("dispMUAicon").getAttribute("src");
-      var buttonDispMUA = document.getElementById("button-dispMUA");
-      if (buttonDispMUA) {
-        buttonDispMUA.setAttribute("image", imageSrc);
+      var IconContainerDispMUA = null;
+      /* toolbar button */
+      if (IconContainerDispMUA = document.getElementById("button-dispMUA")) {
+        IconContainerDispMUA.setAttribute("image", imageSrc);
+      }
+      /* expanded view 48 * 48 */
+      if (IconContainerDispMUA = document.getElementById("dispMUAiconExp")) {
+        IconContainerDispMUA.setAttribute("src", imageSrc);
+      }
+      /* two line view 32 * 32 */
+      if (IconContainerDispMUA = document.getElementById("dispMUAicon2line")) {
+        IconContainerDispMUA.setAttribute("src", imageSrc);
+      }
+      /* compact view 24 * 24 */
+      if (IconContainerDispMUA = document.getElementById("dispMUAiconCompact")) {
+        IconContainerDispMUA.setAttribute("src", imageSrc);
       }
     }
     else if (event.attrName == "tooltiptext") {
@@ -1254,6 +1304,19 @@ org.mozdev.compactHeader.pane = function() {
       if (buttonDispMUA) {
         buttonDispMUA.setAttribute("tooltiptext", tooltipText);
       }
+      /* expanded view 48 * 48 */
+      if (IconContainerDispMUA = document.getElementById("dispMUAiconExp")) {
+        IconContainerDispMUA.setAttribute("tooltiptext", tooltipText);
+      }
+      /* two line view 32 * 32 */
+      if (IconContainerDispMUA = document.getElementById("dispMUAicon2line")) {
+        IconContainerDispMUA.setAttribute("tooltiptext", tooltipText);
+      }
+      /* compact view 24 * 24 */
+      if (IconContainerDispMUA = document.getElementById("dispMUAiconCompact")) {
+        IconContainerDispMUA.setAttribute("tooltiptext", tooltipText);
+      }
+
     }
   }
   
diff --git a/chrome/CompactHeader/content/compactHeaderOverlay.xul b/chrome/CompactHeader/content/compactHeaderOverlay.xul
index 325b222..71fb9ee 100644
--- a/chrome/CompactHeader/content/compactHeaderOverlay.xul
+++ b/chrome/CompactHeader/content/compactHeaderOverlay.xul
@@ -22,6 +22,7 @@
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <script type="application/javascript" src="chrome://CompactHeader/content/compactHeaderOverlay.js"/>
+  <script type="application/javascript" src="chrome://CompactHeader/content/buttonsOverlay.js"/>
 
   <keyset>
     <key id="hideDetailsKey" 
@@ -117,6 +118,11 @@
       </hbox>
       
     </vbox>
+
+    <vbox id="dispMUAexp" collapsed="false">
+        <image id="dispMUAiconExp" tooltiptext="" style="width:48px; height:48px; margin-left:2px; margin-right:2px;" onclick="dispMUA.infopopup();"/>
+    </vbox>
+
   </vbox>
 
   <vbox id="collapsedHeaderView" orient="horizontal" flex="1">
@@ -200,8 +206,20 @@
           </row>
         </hbox>
       </hbox>
+
+
+
     </vbox>
 
+    <vbox id="dispMUA2line">
+      <image id="dispMUAicon2line" tooltiptext="" style="width:32px; height:32px; margin-left:2px; margin-right:2px;" onclick="dispMUA.infopopup();"/>
+    </vbox>
+
+    <vbox id="dispMUAcompact">
+      <image id="dispMUAiconCompact" tooltiptext="" style="width:24px; height:24px; margin:-2px 2px -2px 2px;" onclick="dispMUA.infopopup();"/>
+    </vbox>
+
+
   </vbox>
 
   </deck>
diff --git a/install.rdf b/install.rdf
index 38f9bec..5f1d47e 100644
--- a/install.rdf
+++ b/install.rdf
@@ -6,12 +6,13 @@
 
 	<RDF:Description about="urn:mozilla:install-manifest">
 		<em:name>CompactHeader</em:name>
-		<em:version>1.3.0beta6</em:version>
+		<em:version>1.3.0-dispMUA-beta6</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>
 		<em:contributor>Alex Dedul (original author of RSS Linkify Subject)</em:contributor>
     <em:contributor>Marco (Help for Mac OS X theme)</em:contributor>
+    <em:contributor>Axel Grude (Help on DispMUA)</em:contributor>
     <em:optionsURL>chrome://CompactHeader/content/preferences.xul</em:optionsURL>
 		<em:homepageURL>http://compactheader.mozdev.org/</em:homepageURL>
 		<em:updateURL>http://compactheader.mozdev.org/update.rdf</em:updateURL>

-- 
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