Bug 1499641 - Show all supported file types for address book import by default. r=aceman
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sat, 13 Apr 2019 23:14:26 +0200
changeset 26340 8b4cb5e5adc01a897ac9078087d1a654fb91d872
parent 26339 d95e0ca4fedd04f85b5490be29ecaa25fd0eff1a
child 26341 3cdb38f6af78eb15777136c9186f8962b0983f2b
push id15793
push usermozilla@jorgk.com
push dateSun, 14 Apr 2019 21:52:15 +0000
treeherdercomm-central@4f2702e359aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaceman
bugs1499641
Bug 1499641 - Show all supported file types for address book import by default. r=aceman
mail/locales/en-US/chrome/messenger/addressbook/addressBook.properties
mailnews/import/content/importDialog.js
--- a/mail/locales/en-US/chrome/messenger/addressbook/addressBook.properties
+++ b/mail/locales/en-US/chrome/messenger/addressbook/addressBook.properties
@@ -210,16 +210,17 @@ ExportAddressBookNameTitle=Export Addres
 LDIFFiles=LDIF
 CSVFiles=Comma Separated
 CSVFilesSysCharset=Comma Separated (System Charset)
 CSVFilesUTF8=Comma Separated (UTF-8)
 TABFiles=Tab Delimited
 TABFilesSysCharset=Tab Delimited (System Charset)
 TABFilesUTF8=Tab Delimited (UTF-8)
 VCFFiles=vCard
+SupportedABFiles=Supported Address Book Files
 failedToExportTitle=Export Failed
 failedToExportMessageNoDeviceSpace=Failed to export addressbook, no space left on device.
 failedToExportMessageFileAccessDenied=Failed to export addressbook, file access denied.
 
 # For getting authDN for replication using dlg box
 AuthDlgTitle=Address Book LDAP Replication
 AuthDlgDesc=To access the directory server, enter your user name and password.
 
--- a/mailnews/import/content/importDialog.js
+++ b/mailnews/import/content/importDialog.js
@@ -815,17 +815,20 @@ async function ImportAddress(module, suc
         if (gSelectedModuleName ==
             document.getElementById("bundle_vcardImportMsgs")
                     .getString("vCardImportName")) {
           filePicker.appendFilter(addressbookBundle.getString('VCFFiles'), "*.vcf");
         } else {
           filePicker.appendFilter(addressbookBundle.getString('LDIFFiles'), "*.ldi; *.ldif");
           filePicker.appendFilter(addressbookBundle.getString('CSVFiles'), "*.csv");
           filePicker.appendFilter(addressbookBundle.getString('TABFiles'), "*.tab; *.txt");
+          filePicker.appendFilter(addressbookBundle.getString('SupportedABFiles'), ".csv; *.ldi; *.ldif; *.tab; *.txt");
           filePicker.appendFilters(filePicker.filterAll);
+          // Use "Supported Address Book Files" as default file filter.
+          filePicker.filterIndex = 3;
         }
 
         file = await promptForFile(filePicker);
       } catch(ex) {
         Cu.reportError(ex);
         file = null;
       }
     }