Changeset c39c9e


Ignore:
Timestamp:
Jan 30, 2008, 10:20:38 AM (14 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
9e99e7
Parents:
52f850
Message:

changed handling of upgrade-output to be activated by default

Location:
chrome/content/v_identity
Files:
3 edited

Legend:

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

    r52f850 rc39c9e  
    5252    },
    5353
    54     init : function(upgrade) {
     54    init : function() {
     55        vI_notificationBar.Obj_DebugBox = document.getElementById("vIDebugBox");
     56        if (vI_notificationBar.Obj_DebugBox.getAttribute("upgrade")) return;
    5557        vI_notificationBar.Obj_vINotification = document.getElementById("vINotification");
    56         vI_notificationBar.Obj_DebugBox = document.getElementById("vIDebugBox");
    5758        vI_notificationBar.checkVersion();
    58         if (upgrade || !vI_notificationBar.preferences.getBoolPref("debug_notification")) return;
     59        if (!vI_notificationBar.preferences.getBoolPref("debug_notification")) return;
    5960        vI_notificationBar.Obj_DebugBox.setAttribute("hidden","false");
    6061        document.getElementById("vIDebugBoxSplitter").setAttribute("hidden","false");
     
    115116    },
    116117   
    117     dumpUpgrade : function(note) {
    118         vI_notificationBar.__dump(note, true);
    119     },
    120    
    121118    dump : function(note) {
    122         if (!vI_notificationBar.preferences.getBoolPref("debug_notification")) {
    123             if (!vI_notificationBar.Obj_DebugBox) return;
     119        if (!vI_notificationBar.Obj_DebugBox) vI_notificationBar.init();
     120        if (!vI_notificationBar.Obj_DebugBox) return;
     121        if (!vI_notificationBar.Obj_DebugBox.getAttribute("upgrade") &&
     122            !vI_notificationBar.preferences.getBoolPref("debug_notification")) {
    124123            vI_notificationBar.Obj_DebugBox.setAttribute("hidden","true");
    125124            document.getElementById("vIDebugBoxSplitter").setAttribute("hidden","true");
     
    127126            return
    128127        }
    129         vI_notificationBar.__dump(note, false);
    130     },
    131    
    132     __dump : function (note, upgrade) {
    133         dump(note);
    134         if (!vI_notificationBar.Obj_DebugBox) vI_notificationBar.init(upgrade);
    135         if (!vI_notificationBar.Obj_DebugBox) return;
    136128        var new_text = document.createTextNode(note);
    137129        var new_br = document.createElementNS("http://www.w3.org/1999/xhtml", 'br');
     
    139131        vI_notificationBar.Obj_DebugBox.inputField.appendChild(new_br);
    140132        vI_notificationBar.Obj_DebugBox.inputField.scrollTop =
    141             vI_notificationBar.Obj_DebugBox.inputField.scrollHeight - vI_notificationBar.Obj_DebugBox.inputField.clientHeight
    142    
     133            vI_notificationBar.Obj_DebugBox.inputField.scrollHeight -
     134            vI_notificationBar.Obj_DebugBox.inputField.clientHeight
    143135    },
    144136   
  • chrome/content/v_identity/vI_upgrade.js

    r52f850 rc39c9e  
    3030    init : function() {
    3131        document.documentElement.getButton("cancel").setAttribute("hidden", "true")
    32         vI_notificationBar.dumpUpgrade("") // this initialises the debug-area
     32        vI_notificationBar.dump("") // this initialises the debug-area
    3333    },
    3434   
     
    3939   
    4040    step1 : function() {
    41         vI_notificationBar.dumpUpgrade("starting upgrade.\n\n")
     41        vI_notificationBar.dump("starting upgrade.\n\n")
    4242        document.getElementById("upgradeWizard").setAttribute("canAdvance", "false")
    4343        document.documentElement.getButton('next').setAttribute('disabled','true');
     
    4646        if (vI_rdfDatasource.rdfUpgradeRequired()) vI_upgrade.rdfUpgrade();
    4747        vI_account.cleanupSystem();
    48         vI_notificationBar.dumpUpgrade("\n\nupgrade finished.\n");
     48        vI_notificationBar.dump("\n\nupgrade finished.\n");
    4949        document.documentElement.getButton('next').setAttribute('disabled','false');
    5050        document.getElementById("upgradeWizard").setAttribute("canAdvance", "true")
     
    5252   
    5353    rdfUpgrade : function() {
    54         vI_notificationBar.dumpUpgrade("checking for previous version of rdf, found " +
     54        vI_notificationBar.dump("checking for previous version of rdf, found " +
    5555            vI_rdfDatasource.getCurrentRDFFileVersion() + "\nrdf-upgrade required.\n")
    5656        switch (vI_rdfDatasource.getCurrentRDFFileVersion()) {
     
    5858                vI_rdfDatasource.initRDFDataSource();
    5959        }
    60         vI_notificationBar.dumpUpgrade("rdf-upgrade to " + vI_rdfDatasource.getCurrentRDFFileVersion() + " done.\n\n");
     60        vI_notificationBar.dump("rdf-upgrade to " + vI_rdfDatasource.getCurrentRDFFileVersion() + " done.\n\n");
    6161    },
    6262
     
    6565       
    6666        // remove any obsolete preferences under extensions.virtualIdentity
    67         vI_notificationBar.dumpUpgrade("removing obsolete preferences:\n")
     67        vI_notificationBar.dump("removing obsolete preferences:\n")
    6868        for each (pref in Array("aBook_use", "aBook_storedefault", "aBook_dont_update_multiple",
    6969                "aBook_show_switch", "aBook_warn_update", "aBook_use_for_smart_reply", "aBook_prefer_smart_reply",
    7070                "aBook_ignore_smart_reply", "aBook_warn_vI_replace", "aBook_use_non_vI", "aBook_notification",
    7171                "experimental")) {
    72             try { vI_upgrade.preferences.clearUserPref(pref); vI_notificationBar.dumpUpgrade(".") }
     72            try { vI_upgrade.preferences.clearUserPref(pref); vI_notificationBar.dump(".") }
    7373            catch (e) { };
    7474        }
    75         vI_notificationBar.dumpUpgrade("done.\n")
     75        vI_notificationBar.dump("done.\n")
    7676    },
    7777   
    7878    extUpgrade : function() {
    79         vI_notificationBar.dumpUpgrade("checking for previous version, found " +
     79        vI_notificationBar.dump("checking for previous version, found " +
    8080            vI_rdfDatasource.getCurrentExtFileVersion() + "\nextension-upgrade required.\n")
    8181        switch (vI_rdfDatasource.getCurrentExtFileVersion()) {
     
    8585        }
    8686        vI_rdfDatasource.storeExtVersion();
    87         vI_notificationBar.dumpUpgrade("extension-upgrade to " + vI_rdfDatasource.getCurrentExtFileVersion() + " done.\n\n");
     87        vI_notificationBar.dump("extension-upgrade to " + vI_rdfDatasource.getCurrentExtFileVersion() + " done.\n\n");
    8888    },
    8989       
     
    9999            returnVar = vI_storage._walkTroughCards(queryString,vI_upgrade.__transferVIdentityABookToRDF, returnVar )
    100100        }
    101         vI_notificationBar.dumpUpgrade("\ntransferred " + returnVar.counter + " VirtualIdentity information items from AddressBook to RDF.\n")
     101        vI_notificationBar.dump("\ntransferred " + returnVar.counter + " VirtualIdentity information items from AddressBook to RDF.\n")
    102102    },
    103103   
     
    105105        if (!Card[returnVar.prop].match(/^vIdentity:/)) return returnVar;
    106106        if (returnVar.warning) {
    107             vI_notificationBar.dumpUpgrade("transferring VirtualIdentity information from AddressBook to RDF file,\nthis might take a while:\n");
     107            vI_notificationBar.dump("transferring VirtualIdentity information from AddressBook to RDF file,\nthis might take a while:\n");
    108108            returnVar.warning = false
    109109        }
     
    131131        Card[returnVar.prop] = "";
    132132        Card.editCardToDatabase("");
    133         vI_notificationBar.dumpUpgrade(".");
     133        vI_notificationBar.dump(".");
    134134        return { prop: returnVar.prop, counter : ++returnVar.counter, warning : returnVar.warning };
    135135    },
  • chrome/content/v_identity/vI_upgrade.xul

    r52f850 rc39c9e  
    8181        <groupbox>
    8282            <caption label="&vident.upgrade.upgrade2.caption;"/>
    83             <splitter id="vIDebugBoxSplitter" hidden="true" />
    84             <textbox id="vIDebugBox" multiline="true" readonly="true" />
     83            <textbox id="vIDebugBox" upgrade="true" multiline="true" readonly="true" />
    8584        </groupbox>
    8685    </wizardpage>
Note: See TracChangeset for help on using the changeset viewer.