Changeset 8b504d


Ignore:
Timestamp:
Nov 17, 2007, 6:20:46 PM (14 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
9cbf76
Parents:
77e90a
Message:

included Drafts and Templates Settings in Virtual Identity Account-Creation

File:
1 edited

Legend:

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

    r77e90a r8b504d  
    131131        vI_account.copyPreferences();
    132132        vI_account.setupFcc();
    133        
     133        vI_account.setupDraft();
     134        vI_account.setupTemplates();
    134135       
    135136        // remove the folder created with this account - it should never be used to store mails
     
    159160    {
    160161        if (vI.preferences.getBoolPref("doFcc")) {
    161             switch (vI.preferences.getCharPref("fcc_folder_picker_mode"))
     162            switch (vI.preferences.getCharPref("fccFolderPickerMode"))
    162163            {
    163164                case "2"  :
     
    178179                    = vI.preferences.getBoolPref("doFcc");
    179180                vI_account.account.defaultIdentity.fccFolder
    180                     = vI.preferences.getCharPref("fcc_folder");
     181                    = vI.preferences.getCharPref("fccFolder");
    181182                vI_account.account.defaultIdentity.fccFolderPickerMode
    182                     = vI.preferences.getCharPref("fcc_folder_picker_mode");
     183                    = vI.preferences.getCharPref("fccFolderPickerMode");
    183184                break;
    184185            }
     
    190191        vI_notificationBar.dump("## vI_account: Stored (doFcc " + vI_account.account.defaultIdentity.doFcc + " fccFolder " +
    191192            vI_account.account.defaultIdentity.fccFolder + " fccFolderPickerMode " +
    192             vI_account.account.defaultIdentity.fccFolderPickerMode + ")\n");
     193            vI_account.account.defaultIdentity.fccFolderPickerMode + "(" +
     194            vI.preferences.getCharPref("fccFolderPickerMode") + "))\n");
     195    },
     196   
     197    setupDraft : function() {
     198        switch (vI.preferences.getCharPref("draftFolderPickerMode"))
     199        {
     200            case "2"  :
     201            dump ("## vI_account: preparing Draft --- use Settings of Default Account\n");
     202            vI_account.account.defaultIdentity.draftFolder = gAccountManager.defaultAccount.defaultIdentity.draftFolder;
     203            vI_account.account.defaultIdentity.draftsFolderPickerMode = gAccountManager.defaultAccount.defaultIdentity.draftsFolderPickerMode;
     204            break;
     205            case "3"  :
     206            dump ("## vI_account: preparing Draft --- use Settings of Modified Account\n");
     207            vI_account.account.defaultIdentity.draftFolder = vI.helper.getBaseIdentity().draftFolder;
     208            vI_account.account.defaultIdentity.draftsFolderPickerMode = vI.helper.getBaseIdentity().draftsFolderPickerMode;
     209            break;
     210            default  :
     211            dump ("## vI_account: preparing Draft --- use Virtual Identity Settings\n");
     212            vI_account.account.defaultIdentity.draftFolder
     213                = vI.preferences.getCharPref("draftFolder");
     214            vI_account.account.defaultIdentity.draftsFolderPickerMode
     215                = vI.preferences.getCharPref("draftFolderPickerMode");
     216            break;
     217        }
     218        vI_notificationBar.dump("## vI_account: Stored (draftFolder " +
     219            vI_account.account.defaultIdentity.draftFolder + " draftsFolderPickerMode " +
     220            vI_account.account.defaultIdentity.draftsFolderPickerMode + "(" +
     221            vI.preferences.getCharPref("draftFolderPickerMode") + "))\n");
     222    },
     223   
     224    setupTemplates : function() {
     225        switch (vI.preferences.getCharPref("stationeryFolderPickerMode"))
     226        {
     227            case "2"  :
     228            dump ("## vI_account: preparing Templates --- use Settings of Default Account\n");
     229            vI_account.account.defaultIdentity.stationeryFolder = gAccountManager.defaultAccount.defaultIdentity.stationeryFolder;
     230            vI_account.account.defaultIdentity.tmplFolderPickerMode = gAccountManager.defaultAccount.defaultIdentity.tmplFolderPickerMode;
     231            break;
     232            case "3"  :
     233            dump ("## vI_account: preparing Templates --- use Settings of Modified Account\n");
     234            vI_account.account.defaultIdentity.stationeryFolder = vI.helper.getBaseIdentity().stationeryFolder;
     235            vI_account.account.defaultIdentity.tmplFolderPickerMode = vI.helper.getBaseIdentity().tmplFolderPickerMode;
     236            break;
     237            default  :
     238            dump ("## vI_account: preparing Templates --- use Virtual Identity Settings\n");
     239            vI_account.account.defaultIdentity.stationeryFolder
     240                = vI.preferences.getCharPref("stationeryFolder");
     241            vI_account.account.defaultIdentity.tmplFolderPickerMode
     242                = vI.preferences.getCharPref("stationeryFolderPickerMode");
     243            break;
     244        }
     245        vI_notificationBar.dump("## vI_account: Stored (stationeryFolder " +
     246            vI_account.account.defaultIdentity.stationeryFolder + " tmplFolderPickerMode " +
     247            vI_account.account.defaultIdentity.tmplFolderPickerMode + "(" +
     248            vI.preferences.getCharPref("stationeryFolderPickerMode") + "))\n");
    193249    }
    194250}
Note: See TracChangeset for help on using the changeset viewer.