Changeset c5860f
- Timestamp:
- Sep 9, 2018, 2:36:46 AM (4 years ago)
- Branches:
- ng_0.9
- Children:
- 8b09cf
- Parents:
- 85fa10
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
content/vI_context.xul
r85fa10 rc5860f 66 66 <menuitem label="&vident.vI_Menu.DataEditor.label;" 67 67 oncommand="window.open('chrome://v_identity/content/vI_rdfDataTree.xul', '', 'chrome, dialog, resizable=yes');" /> 68 <menuitem label="&importCmd.label;" accesskey="&importCmd.accesskey;" oncommand="var vI_localRdfDatasource = new virtualIdentityExtension.rdfDatasourceImporter(window, 'virtualIdentity .rdf');"/>69 <menuitem label="&exportCmd.label;" accesskey="&exportCmd.accesskey;" oncommand="var vI_localRdfDatasource = new virtualIdentityExtension.rdfDatasource(window); vI_localRdfDatasource.export('virtualIdentity .rdf')"/>68 <menuitem label="&importCmd.label;" accesskey="&importCmd.accesskey;" oncommand="var vI_localRdfDatasource = new virtualIdentityExtension.rdfDatasourceImporter(window, 'virtualIdentity_0.10.rdf');"/> 69 <menuitem label="&exportCmd.label;" accesskey="&exportCmd.accesskey;" oncommand="var vI_localRdfDatasource = new virtualIdentityExtension.rdfDatasource(window); vI_localRdfDatasource.export('virtualIdentity_0.10.rdf')"/> 70 70 </menupopup> 71 71 </menu> -
content/vI_overlay.js
r85fa10 rc5860f 60 60 61 61 addEventListener('messagepane-loaded', extensionInit, true); 62 Log.debug("init rdfDatasource"); 63 var rdfDatasource = vI.rdfDatasourceAccess(window); 64 Log.debug("init rdfDatasource done"); 62 65 } 63 66 }); -
content/vI_upgrade.js
r85fa10 rc5860f 39 39 40 40 quickUpgrade: function (currentVersion) { 41 upgrade.rdfDatasource = new vI.rdfDatasource(window, "virtualIdentity .rdf", true);41 upgrade.rdfDatasource = new vI.rdfDatasource(window, "virtualIdentity_0.10.rdf", true); 42 42 if (upgrade.rdfDatasource.extUpgradeRequired()) 43 43 upgrade.extUpgrade(); … … 53 53 switch (currentVersion) { 54 54 case null: 55 // import pre-0.10 rdf 56 var vI_localRdfDatasource = 57 new virtualIdentityExtension.rdfDatasourceImporter(window, 'virtualIdentity_0.10.rdf', false); 58 vI_localRdfDatasource.importFileByName("virtualIdentity.rdf"); 55 59 // no break 56 60 default: 57 61 upgrade.__transferMovedUserPrefs(currentVersion); 58 62 upgrade.__removeObsoleteUserPrefs(currentVersion); 59 upgrade.__removeExtraAddedHeaders(currentVersion);60 upgrade.__cleanupSmartMailboxFolders(currentVersion);61 63 } 62 64 upgrade.rdfDatasource.storeExtVersion(); … … 64 66 }, 65 67 66 __cleanupSmartMailboxFolders: function (currentVersion) {67 if ((!currentVersion || upgrade.versionChecker.compare(currentVersion, "0.9.26") < 0)) {68 Log.debug("cleaning leftover 'smart mailboxes' == 'unified folder mailboxes'");69 // remove obsolete 'smart mailboxes'=='unified folder' server entries70 // this is only required because of a virtualIdentity bug introduced in 0.9.22 and fixed in 0.9.2671 72 // compare against all accounts, getAccountsArray() does not include 'smart mailboxes' == 'unified folders'73 var all_accounts = vI.prefroot.getCharPref("mail.accountmanager.accounts").split(",");74 75 for (let pref of vI.prefroot.getChildList("mail.server")) {76 77 78 if (pref.indexOf(".hostname") == pref.length - 9 && vI.prefroot.getCharPref(pref) == "smart mailboxes") {79 // ok, smart mailbox server found, check if it still in use80 let server = pref.replace(/^mail\.server\./, "").replace(/\.hostname$/, "");81 let inUse = false;82 for (let account of all_accounts) {83 if (vI.prefroot.getCharPref("mail.account." + account + ".server") == server)84 inUse = true;85 }86 if (!inUse) {87 Log.debug("cleaning leftover 'smart mailbox' for server " + server);88 for (let obsoletePref of vI.prefroot.getChildList("mail.server." + server)) {89 if (obsoletePref.indexOf(".directory") == obsoletePref.length - 10) {90 // remove obsolete 'smart mailbox' directory91 try {92 let file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsIFile);93 file.initWithPath(vI.prefroot.getCharPref(obsoletePref));94 Log.debug("removing obsolete storage Folder " + vI.prefroot.getCharPref(obsoletePref));95 file.remove(true);96 } catch (NS_ERROR_FILE_UNRECOGNIZED_PATH) {};97 }98 vI.prefroot.clearUserPref(obsoletePref);99 }100 }101 }102 }103 }104 },105 106 __removeExtraAddedHeaders: function (currentVersion) {107 if ((!currentVersion || upgrade.versionChecker.compare(currentVersion, "0.6.9") < 0) &&108 vI.prefroot.getCharPref("mailnews.headers.extraExpandedHeaders") != "") {109 // clean extraExpandedHeaders once, because the whole header-saving and restoring was broken too long110 Log.debug("cleaning extraExpandedHeaders");111 vI.prefroot.setCharPref("mailnews.headers.extraExpandedHeaders", "")112 Log.debug("cleaned extraExpandedHeaders");113 }114 },115 116 68 __transferMovedUserPrefs: function (currentVersion) { 117 69 // transfer renamed preferences 118 var transferPrefs = [{ 119 version: "0.5.3", 120 prefs: Array({ 121 sourcePref: "smart_reply_ask", 122 targetPref: "idSelection_ask" 123 }, { 124 sourcePref: "smart_reply_ask_always", 125 targetPref: "idSelection_ask_always" 126 }, { 127 sourcePref: "smart_reply_autocreate", 128 targetPref: "idSelection_autocreate" 129 }, { 130 sourcePref: "smart_timestamp", 131 targetPref: "autoTimestamp" 132 }, { 133 sourcePref: "storage_prefer_smart_reply", 134 targetPref: "idSelection_storage_prefer_smart_reply" 135 }, { 136 sourcePref: "storage_ignore_smart_reply", 137 targetPref: "idSelection_storage_ignore_smart_reply" 138 }) 139 }]; 70 var transferPrefs = [ 71 // { 72 // version: "0.5.3", 73 // prefs: Array({ 74 // sourcePref: "smart_reply_ask", 75 // targetPref: "idSelection_ask" 76 // }, { 77 // sourcePref: "smart_reply_ask_always", 78 // targetPref: "idSelection_ask_always" 79 // }, { 80 // sourcePref: "smart_reply_autocreate", 81 // targetPref: "idSelection_autocreate" 82 // }, { 83 // sourcePref: "smart_timestamp", 84 // targetPref: "autoTimestamp" 85 // }, { 86 // sourcePref: "storage_prefer_smart_reply", 87 // targetPref: "idSelection_storage_prefer_smart_reply" 88 // }, { 89 // sourcePref: "storage_ignore_smart_reply", 90 // targetPref: "idSelection_storage_ignore_smart_reply" 91 // }) 92 // } 93 ]; 140 94 // remove obsolete preference-tree virtualIdentity 141 95 for (var i = 0; i < transferPrefs.length; i++) { … … 157 111 158 112 __removeObsoleteUserPrefs: function (currentVersion) { 159 var obsoletePrefs = [{ 160 version: "0.5.0", 161 prefs: Array("aBook_use", "aBook_storedefault", "aBook_dont_update_multiple", 162 "aBook_show_switch", "aBook_warn_update", "aBook_use_for_smart_reply", 163 "aBook_prefer_smart_reply", "aBook_ignore_smart_reply", "aBook_warn_vI_replace", 164 "aBook_use_non_vI", "aBook_notification", "storeVIdentity", "experimental", 165 "storage_use_for_smart_reply") 166 }, { 167 version: "0.5.3", 168 prefs: Array("storage_use_for_smart_reply") 169 }, { 170 version: "0.5.6", 171 prefs: Array("copyEnigmailSettings") 172 }, { 173 version: "0.9", 174 prefs: Array("extensions.virtualIdentity.{2ab1b709-ba03-4361-abf9-c50b964ff75d}", 175 "extensions.virtualIdentity.{847b3a00-7ab1-11d4-8f02-006008948af5}", 176 "extensions.virtualIdentity.smart_reply_added_extraHeaders", 177 "mailnews.headers.extraExpandedHeaders") 178 }]; 113 var obsoletePrefs = [ 114 { 115 version: "0.10", 116 prefs: Array("extensions.virtualIdentity.show_smtp", 117 "extensions.virtualIdentity.storage_store_SMTP", 118 "extensions.virtualIdentity.storage_show_SMTP_switch") 119 } 120 ]; 179 121 // remove obsolete preference-tree virtualIdentity 180 122 for (var i = 0; i < obsoletePrefs.length; i++) { -
locale/en-US/vI_rdfAccountMismatchDialog.dtd
r85fa10 rc5860f 6 6 <!ENTITY vident.virtualIdentityExtension_rdfAccountMismatchDialog_smtp.desc "Some of the previously stored SMTP-servers don't match the current SMTP-Settings. Please select if the folowing stored SMTP-relations should be removed or assign those to existing SMTP servers:"> 7 7 <!ENTITY vident.virtualIdentityExtension_rdfAccountMismatchDialog_smtp.caption "assign related SMTP-server"> 8 <!ENTITY vident.virtualIdentityExtension_rdfAccountMismatchDialog_smtpid.desc "The new version of virtual Identity selects the SMTP-server according to the used underlaying base Identity. This collides with some of your stored identity settings - please select if the folowing stored SMTP-relations should be removed or assign those to the right identities:"> 9 <!ENTITY vident.virtualIdentityExtension_rdfAccountMismatchDialog_smtpid.caption "assign mismatching SMTP-servers:"> 8 10 <!ENTITY vident.virtualIdentityExtension_rdfAccountMismatchDialog_identity.old "previous Identity (email / full Name)"> 9 11 <!ENTITY vident.virtualIdentityExtension_rdfAccountMismatchDialog_identity.count "use-count"> … … 12 14 <!ENTITY vident.virtualIdentityExtension_rdfAccountMismatchDialog_smtp.count "use-count"> 13 15 <!ENTITY vident.virtualIdentityExtension_rdfAccountMismatchDialog_smtp.new "new SMTP (hostname / username)"> 16 <!ENTITY vident.virtualIdentityExtension_rdfAccountMismatchDialog_smtpid.old "stored SMTP / base Identity (SMTP)"> 17 <!ENTITY vident.virtualIdentityExtension_rdfAccountMismatchDialog_smtpid.count "use-count"> 18 <!ENTITY vident.virtualIdentityExtension_rdfAccountMismatchDialog_smtpid.new "new base Identity (SMTP)">
Note: See TracChangeset
for help on using the changeset viewer.