Changeset 551bc4


Ignore:
Timestamp:
Jul 17, 2008, 2:43:06 AM (12 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
d61ab0
Parents:
983f92
Message:

can't handle overlays for own xul's with seamonkey 1.1.11,so disable StorageExtras?

Location:
chrome/content/v_identity
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • chrome/content/v_identity/vI_prefDialog.js

    r983f92 r551bc4  
    304304        vI_prefDialog.base.storageConstraint(document.getElementById("VIdent_identity.storage"));
    305305        vI_prefDialog.base.idSelectionConstraint();
     306        if (vI_storageExtrasHelper.seamonkey_to_old())
     307            document.getElementById("storageTab2").setAttribute("hidden", "true")
    306308    },
    307309   
  • chrome/content/v_identity/vI_prefDialog.xul

    r983f92 r551bc4  
    5353<script type="application/x-javascript"
    5454            src="chrome://v_identity/content/vI_prefDialog.js" />
     55<script type="application/x-javascript"
     56            src="chrome://v_identity/content/vI_storageExtras.js" />
    5557
    5658  <stringbundleset id="stringbundleset">
  • chrome/content/v_identity/vI_storageExtras.js

    r983f92 r551bc4  
    3131
    3232var vI_storageExtrasHelper = {
     33    seamonkey_old : null,
     34
    3335    preferences : Components.classes["@mozilla.org/preferences-service;1"]
    3436            .getService(Components.interfaces.nsIPrefService)
     
    3638   
    3739    hideUnusedTreeCols : function() {
     40        if (vI_storageExtrasHelper.seamonkey_to_old()) return;
    3841        var storageExtras = new vI_storageExtras();
    3942        for( var i = 0; i < storageExtras.extras.length; i++ )
     
    4346   
    4447    hideUnusedEditorFields : function() {
     48        if (vI_storageExtrasHelper.seamonkey_to_old()) return;
    4549        var storageExtras = new vI_storageExtras();
    4650        var allHidden = true;
     
    5559        // resize the window to the content
    5660        window.sizeToContent();
     61    },
     62
     63    seamonkey_to_old : function() {
     64        if (vI_storageExtrasHelper.seamonkey_old == "true") return true;
     65        var versionChecker;
     66        if("@mozilla.org/xre/app-info;1" in Components.classes) {
     67            var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
     68                .getService(Components.interfaces.nsIXULAppInfo);
     69            appID = appInfo.ID
     70            appVersion = appInfo.version
     71        }
     72        if("@mozilla.org/xpcom/version-comparator;1" in Components.classes)
     73            versionChecker = Components.classes["@mozilla.org/xpcom/version-comparator;1"]
     74                .getService(Components.interfaces.nsIVersionComparator);
     75        else appID = null;
     76        const SEAMONKEY_ID = "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}";
     77        if (appID == SEAMONKEY_ID && versionChecker.compare(appVersion, "1.5a") < 0)
     78            vI_storageExtrasHelper.seamonkey_old = "true"
     79        return (vI_storageExtrasHelper.seamonkey_old == "true")
    5780    }
    5881}
     
    98121    },
    99122    status : function() {
     123        if (vI_storageExtrasHelper.seamonkey_to_old()) return;
    100124        var returnVal = "";
    101125        for( var i = 0; i < this.extras.length; i++ )
     
    105129    },
    106130    setValues : function() {
     131        if (vI_storageExtrasHelper.seamonkey_to_old()) return;
    107132        for( var i = 0; i < this.extras.length; i++ ) {
    108133            if (this.extras[i].active) this.extras[i].setValue()
     
    111136    },
    112137    readValues : function() {
     138        if (vI_storageExtrasHelper.seamonkey_to_old()) return;
    113139        for( var i = 0; i < this.extras.length; i++ ) {
    114140            if (this.extras[i].active) this.extras[i].readValue()
     
    117143    },
    118144    setEditorValues : function() {
     145        if (vI_storageExtrasHelper.seamonkey_to_old()) return;
    119146        for( var i = 0; i < this.extras.length; i++ ) {
    120147            this.extras[i].value = window.arguments[0][this.extras[i].field + "Col"]
     
    124151    },
    125152    readEditorValues : function() {
     153        if (vI_storageExtrasHelper.seamonkey_to_old()) return;
    126154        for( var i = 0; i < this.extras.length; i++ ) {
    127155            this.extras[i].readEditorValue();
     
    130158    },
    131159    addPrefs : function(pref) {
     160        if (vI_storageExtrasHelper.seamonkey_to_old()) return;
    132161        for( var i = 0; i < this.extras.length; i++ )
    133162            pref[this.extras[i].field + "Col"] = this.extras[i].value;
Note: See TracChangeset for help on using the changeset viewer.