[Pkg-mozext-commits] [compactheader] 89/441: New version 0.9.4: Internal cleanup: Wrapper for java script namespace Tooltip for subject No scrollbar in collapsed header pane.

David Prévot taffit at moszumanska.debian.org
Wed Mar 18 12:28:47 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 5e477cfff4b60a2f1677e86d25bacda4ddaf063b
Author: joachim.herb <none at none>
Date:   Fri Nov 13 23:26:41 2009 +0000

    New version 0.9.4:
    Internal cleanup: Wrapper for java script namespace
    Tooltip for subject
    No scrollbar in collapsed header pane.
---
 chrome/CompactHeader/content/preferences.js  | 237 ++++++++++++++-------------
 chrome/CompactHeader/content/preferences.xul |  13 +-
 install.rdf                                  |   4 +-
 3 files changed, 130 insertions(+), 124 deletions(-)

diff --git a/chrome/CompactHeader/content/preferences.js b/chrome/CompactHeader/content/preferences.js
index fd10d21..1da2c4d 100644
--- a/chrome/CompactHeader/content/preferences.js
+++ b/chrome/CompactHeader/content/preferences.js
@@ -14,123 +14,126 @@
 //  Variables
 //
 
-var prefBranch;
-var gXMLHttpRequest;
-///////////////////////////////////////////////////////////////////////////////
-//
-//  onLoad
-//
-//  Called when the preferences dialog has finished loading. Initializes the
-//  controls according to current configuration settings.
-//
-
-function CoheCheckForUpdates() {
-	gXMLHttpRequest = new XMLHttpRequest();
-  gXMLHttpRequest.onload = updateCohe;
-  gXMLHttpRequest.open("GET", "http://compactheader.mozdev.org/availVersion.xml",true);
-  gXMLHttpRequest.send(null);
-}
-
-function updateCohe()
-{
-  var updateAMO = false;
-  var updateMozdev = false;
-  
-  var gExtensionManager = Components.classes["@mozilla.org/extensions/manager;1"]
-                            .getService(Components.interfaces.nsIExtensionManager);
-  var strCoheVersion = gExtensionManager.getItemForID("{58D4392A-842E-11DE-B51A-C7B855D89593}").version;
 
-  if (gXMLHttpRequest.readyState == 4) {
-    var data = gXMLHttpRequest.responseXML;
-    var updates = data.getElementsByTagName("update");
-    for (var i = 0; i < updates.length; i++) {
-      var strServer, strVersion;
-      var update = updates[i];
-    	strServer = update.getAttribute("server");
-    	strVersion = update.getAttribute("version");
-      var x = Components.classes["@mozilla.org/xpcom/version-comparator;1"]
-                        .getService(Components.interfaces.nsIVersionComparator)
-                        .compare(strVersion, strCoheVersion);
-          
-      if ((strServer == "AMO") && (x > 0)) {
-        updateAMO = true;
-        document.getElementById("UpdateAMO").setAttribute("disabled", "false");
-      } else if ((strServer == "mozdev") && (x > 0)) {
-        updateAMO = true;
-        document.getElementById("UpdateMOZDEV").setAttribute("disabled", "false");
+if(!org) var org={};
+if(!org.mozdev) org.mozdev={};
+if(!org.mozdev.compactHeader) org.mozdev.compactHeader = {};
+
+org.mozdev.compactHeader.preferences = function() {
+  var pub = {};
+  var prefBranch;
+  var gXMLHttpRequest;
+  ///////////////////////////////////////////////////////////////////////////////
+  //
+  //  onLoad
+  //
+  //  Called when the preferences dialog has finished loading. Initializes the
+  //  controls according to current configuration settings.
+  //
+  
+  pub.CoheCheckForUpdates = function() {
+  	gXMLHttpRequest = new XMLHttpRequest();
+    gXMLHttpRequest.onload = updateCohe;
+    gXMLHttpRequest.open("GET", "http://compactheader.mozdev.org/availVersion.xml",true);
+    gXMLHttpRequest.send(null);
+  }
+  
+  function updateCohe()
+  {
+    var updateAMO = false;
+    var updateMozdev = false;
+    
+    var gExtensionManager = Components.classes["@mozilla.org/extensions/manager;1"]
+                              .getService(Components.interfaces.nsIExtensionManager);
+    var strCoheVersion = gExtensionManager.getItemForID("{58D4392A-842E-11DE-B51A-C7B855D89593}").version;
+  
+    if (gXMLHttpRequest.readyState == 4) {
+      var data = gXMLHttpRequest.responseXML;
+      var updates = data.getElementsByTagName("update");
+      for (var i = 0; i < updates.length; i++) {
+        var strServer, strVersion;
+        var update = updates[i];
+      	strServer = update.getAttribute("server");
+      	strVersion = update.getAttribute("version");
+        var x = Components.classes["@mozilla.org/xpcom/version-comparator;1"]
+                          .getService(Components.interfaces.nsIVersionComparator)
+                          .compare(strVersion, strCoheVersion);
+            
+        if ((strServer == "AMO") && (x > 0)) {
+          updateAMO = true;
+          document.getElementById("UpdateAMO").setAttribute("disabled", "false");
+        } else if ((strServer == "mozdev") && (x > 0)) {
+          updateAMO = true;
+          document.getElementById("UpdateMOZDEV").setAttribute("disabled", "false");
+        }
       }
-    }
-	}
-}
-
-
-function onLoad()
-{
-  prefBranch = Components.classes["@mozilla.org/preferences-service;1"]
-    .getService(Components.interfaces.nsIPrefService)
-    .getBranch("extensions.CompactHeader.");
-
-  loadPrefCheckbox("headersize.twolineview", "checkbox.Compact.TwolineView");
-  loadPrefCheckbox("headersize.linkify", "checkbox.Linkify");
-  //loadPrefInt("headersize.addressstyle", "AddressStyle");  
-  loadPrefCheckbox("headersize.addressstyle", "checkbox.ShowOnlyAddress");
+  	}
+  }
   
-  updateTwolineView(prefBranch.getBoolPref("headersize.twolineview")); 
-}
-
-function updateTwolineView(boolTwolineview) {
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//  onDialogAccept
-//
-//  Called when the preferences dialog is closed by pressing the OK button.
-//  Saves the configuration settings.
-//
-
-function onDialogAccept()
-{
-  savePrefCheckbox("headersize.twolineview", "checkbox.Compact.TwolineView");
-  savePrefCheckbox("headersize.linkify", "checkbox.Linkify");
-  //savePrefInt("headersize.addressstyle", "AddressStyle");  
-  savePrefCheckbox("headersize.addressstyle", "checkbox.ShowOnlyAddress");
-  return true;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//  loadPrefCheckbox
-//
-//  Loads the given boolean preference value into the given checkbox element.
-//
-
-function loadPrefCheckbox(pref, idCheckbox)
-{
-  document.getElementById(idCheckbox).checked = prefBranch.getBoolPref(pref);
-}
-
-
-function loadPrefInt(pref, idCheckbox)
-{
-  document.getElementById(idCheckbox).value = prefBranch.getIntPref(pref);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//  savePrefCheckbox
-//
-//  Saves the given boolean preference value from the given checkbox element.
-//
-
-function savePrefCheckbox(pref, idCheckbox)
-{
-  prefBranch.setBoolPref(pref, document.getElementById(idCheckbox).checked);
-}
-
-function savePrefInt(pref, idCheckbox)
-{
-  prefBranch.setIntPref(pref, document.getElementById(idCheckbox).value);
-}
-
+  
+  pub.onLoad = function()
+  {
+    prefBranch = Components.classes["@mozilla.org/preferences-service;1"]
+      .getService(Components.interfaces.nsIPrefService)
+      .getBranch("extensions.CompactHeader.");
+  
+    loadPrefCheckbox("headersize.twolineview", "checkbox.Compact.TwolineView");
+    loadPrefCheckbox("headersize.linkify", "checkbox.Linkify");
+    //loadPrefInt("headersize.addressstyle", "AddressStyle");  
+    loadPrefCheckbox("headersize.addressstyle", "checkbox.ShowOnlyAddress");
+  }
+  
+  ///////////////////////////////////////////////////////////////////////////////
+  //
+  //  onDialogAccept
+  //
+  //  Called when the preferences dialog is closed by pressing the OK button.
+  //  Saves the configuration settings.
+  //
+  
+  pub.onDialogAccept = function ()
+  {
+    savePrefCheckbox("headersize.twolineview", "checkbox.Compact.TwolineView");
+    savePrefCheckbox("headersize.linkify", "checkbox.Linkify");
+    //savePrefInt("headersize.addressstyle", "AddressStyle");  
+    savePrefCheckbox("headersize.addressstyle", "checkbox.ShowOnlyAddress");
+    return true;
+  }
+  
+  
+  ///////////////////////////////////////////////////////////////////////////////
+  //
+  //  loadPrefCheckbox
+  //
+  //  Loads the given boolean preference value into the given checkbox element.
+  //
+  
+  function loadPrefCheckbox(pref, idCheckbox)
+  {
+    document.getElementById(idCheckbox).checked = prefBranch.getBoolPref(pref);
+  }
+  
+  
+  function loadPrefInt(pref, idCheckbox)
+  {
+    document.getElementById(idCheckbox).value = prefBranch.getIntPref(pref);
+  }
+  
+  ///////////////////////////////////////////////////////////////////////////////
+  //
+  //  savePrefCheckbox
+  //
+  //  Saves the given boolean preference value from the given checkbox element.
+  //
+  
+  function savePrefCheckbox(pref, idCheckbox)
+  {
+    prefBranch.setBoolPref(pref, document.getElementById(idCheckbox).checked);
+  }
+  
+  function savePrefInt(pref, idCheckbox)
+  {
+    prefBranch.setIntPref(pref, document.getElementById(idCheckbox).value);
+  }
+  return pub;
+}();
diff --git a/chrome/CompactHeader/content/preferences.xul b/chrome/CompactHeader/content/preferences.xul
index 1dd5ca6..f64455b 100644
--- a/chrome/CompactHeader/content/preferences.xul
+++ b/chrome/CompactHeader/content/preferences.xul
@@ -17,14 +17,17 @@
   void(openDialog("chrome://CompactHeader/content/preferences.xul"))
 -->
 
-<dialog id="cohePreferences" title="&dialog.title;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-  onload="onLoad()" ondialogaccept="return onDialogAccept()" persist="screenX screenY">
+<dialog id="cohePreferences" 
+				title="&dialog.title;" 
+				xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+        onload="org.mozdev.compactHeader.preferences.onLoad();" 
+        ondialogaccept="return org.mozdev.compactHeader.preferences.onDialogAccept();" 
+        persist="screenX screenY">
 
   <script type="application/x-javascript" src="chrome://CompactHeader/content/preferences.js"/>
 
 	<checkbox id="checkbox.Compact.TwolineView" 
-						label="&checkbox.Compact.TwolineView.caption;"
-						oncommand="updateTwolineView(this.checked);"/>
+						label="&checkbox.Compact.TwolineView.caption;"/>
 						
 	<checkbox id="checkbox.Linkify" 
 						label="&menu.Linkify.caption;"/>
@@ -59,7 +62,7 @@
     			 value="&link.MOZDEV.value;" />
     <hbox align="center" pack="center" flex="1">
       <button id="checkForUpdates"
-              oncommand="CoheCheckForUpdates();"
+              oncommand="org.mozdev.compactHeader.preferences.CoheCheckForUpdates();"
               flex="0"
               align="center"
               label="&button.checkUpdate.label;"/>
diff --git a/install.rdf b/install.rdf
index a399dbb..00c4dcd 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.99.3</em:version>
+		<em:version>0.99.4</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>
@@ -20,7 +20,7 @@
 			<RDF:Description>
 				<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
 				<em:minVersion>3.0pre</em:minVersion>
-				<em:maxVersion>3.0pre</em:maxVersion>
+				<em:maxVersion>3.0.*</em:maxVersion>
 			</RDF:Description>
 		</em:targetApplication>
 	</RDF:Description>

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