Bug 622665 - Remove old unused na2 import code; r=bienvenu sr=neil
authorMark Banner <bugzilla@standard8.plus.com>
Wed, 05 Jan 2011 11:08:51 +0000
changeset 6907 12ea69f572c6095caa5e7d7f0786bddc7457ff0e
parent 6906 8eec8a66e351339359da190ebc398e5a769a79b0
child 6908 4dab4f7834ed1c2a378a65fb63ebb15c69d0658d
push idunknown
push userunknown
push dateunknown
reviewersbienvenu, neil
bugs622665
Bug 622665 - Remove old unused na2 import code; r=bienvenu sr=neil
mail/components/migration/src/nsProfileMigratorBase.cpp
mail/locales/en-US/chrome/messenger/importDialog.dtd
mail/locales/en-US/chrome/messenger/importMsgs.properties
mailnews/import/content/importDialog.js
mailnews/import/content/importDialog.xul
mailnews/import/eudora/src/nsEudoraImport.cpp
mailnews/import/oexpress/nsOEImport.cpp
mailnews/import/public/nsIImportAddressBooks.idl
mailnews/import/public/nsIImportGeneric.idl
mailnews/import/src/nsImportAddressBooks.cpp
mailnews/import/src/nsImportMail.cpp
mailnews/import/test/unit/resources/import_helper.js
mailnews/import/test/unit/test_bug_437556.js
mailnews/import/text/src/nsTextImport.cpp
mailnews/import/vcard/src/nsVCardImport.cpp
suite/locales/en-US/chrome/mailnews/importDialog.dtd
suite/locales/en-US/chrome/mailnews/importMsgs.properties
--- a/mail/components/migration/src/nsProfileMigratorBase.cpp
+++ b/mail/components/migration/src/nsProfileMigratorBase.cpp
@@ -95,17 +95,17 @@ nsresult nsProfileMigratorBase::ImportAd
 
   // we want to migrate the outlook express addressbook into our personal address book
   pabString->SetData(nsDependentCString(kPersonalAddressbookUri));
   mGenericImporter->SetData("addressDestination", pabString);
 
   PRBool importResult;
   PRBool wantsProgress;
   mGenericImporter->WantsProgress(&wantsProgress);
-  rv = mGenericImporter->BeginImport(nsnull, nsnull, PR_TRUE, &importResult);
+  rv = mGenericImporter->BeginImport(nsnull, nsnull, &importResult);
 
   if (wantsProgress)
     ContinueImport();
   else
     FinishCopyingAddressBookData();
 
   return rv;
 }
@@ -139,17 +139,17 @@ nsresult nsProfileMigratorBase::ImportMa
   // by setting the migration flag, we force the import utility to install local folders from OE
   // directly into Local Folders and not as a subfolder
   migrating->SetData(PR_TRUE);
   mGenericImporter->SetData("migration", migrating);
 
   PRBool importResult;
   PRBool wantsProgress;
   mGenericImporter->WantsProgress(&wantsProgress);
-  rv = mGenericImporter->BeginImport(nsnull, nsnull, PR_TRUE, &importResult);
+  rv = mGenericImporter->BeginImport(nsnull, nsnull, &importResult);
 
   mProcessingMailFolders = PR_TRUE;
 
   if (wantsProgress)
     ContinueImport();
   else
     FinishCopyingMailFolders();
 
--- a/mail/locales/en-US/chrome/messenger/importDialog.dtd
+++ b/mail/locales/en-US/chrome/messenger/importDialog.dtd
@@ -72,16 +72,8 @@ LOCALIZATION NOTE : Do not translate any
 <!ENTITY forward.label            "Next &gt;">
 <!ENTITY finish.label             "Finish">
 <!ENTITY cancel.label             "Cancel">
 
 <!ENTITY select.label             "or select the type of material to import:">
 
 <!ENTITY title.label              "Title">
 <!ENTITY processing.label         "Importing…">
-
-<!ENTITY FieldDiscInputText1.label  "Netscape Communicator 4.x has one mailing address for each card, while &brandShortName; has two (Home and Work).">
-<!ENTITY FieldDiscInputText2.label  "Select the category in which you want to store the imported mailing addresses:">
-<!ENTITY FieldDiscWarning.label  "This category will be used for all the entries of the selected address book: ">
-<!ENTITY importHome.label        "Home">
-<!ENTITY importHome.accesskey    "H">
-<!ENTITY importWork.label        "Work">
-<!ENTITY importWork.accesskey    "W">
--- a/mail/locales/en-US/chrome/messenger/importMsgs.properties
+++ b/mail/locales/en-US/chrome/messenger/importMsgs.properties
@@ -328,21 +328,17 @@ AddrProgressMeterText=Converting address
 #Import file dialog strings
 ImportSelectSettings=Select settings file
 ImportSelectMailDir=Select mail directory
 ImportSelectAddrDir=Select address book directory
 ImportSelectAddrFile=Select address book file
 
 # LOCALIZATION NOTE : "Communicator 4.x" is the used for previous versions of Netscape Communicator
 # Please translate using the brandname in respective languages for Netscape Communicator 4 releases.
-# LOCALIZATION NOTE : Please do not translate "*.na2", this represents the extension of the address book 
-# files from the Netscape Communicator 4 releases.
-# Comm4.xTo6.xImport user selection string
 Comm4xImportName=Communicator 4.x
-Comm4xFiles=Communicator Address Book files (*.na2)
 
 # Folder Names for imported Mail
 DefaultFolderName=Imported Mail
 # LOCALIZATION NOTE: Do not translate the word "%S" below.
 ImportModuleFolderName=%S Import
  
 # LOCALIZATION NOTE : "Communicator 4.x" is the used for previous versions of Netscape Communicator
 # Please translate using the brandname in respective languages for Netscape Communicator 4 releases.
--- a/mailnews/import/content/importDialog.js
+++ b/mailnews/import/content/importDialog.js
@@ -40,18 +40,16 @@
 var importType = null;
 var gImportMsgsBundle;
 var importService = 0;
 var successStr = null;
 var errorStr = null;
 var inputStr = null ;
 var progressInfo = null;
 var selectedModuleName = null;
-
-var selLocIsHome = false ;
 var addInterface = null ;
 
 const nsISupportsString = Components.interfaces.nsISupportsString;
 
 function OnLoadImportDialog()
 {
   gImportMsgsBundle = document.getElementById("bundle_importMsgs");
   importService = Components.classes["@mozilla.org/import/import-service;1"]
@@ -737,26 +735,26 @@ function ImportMail( module, success, er
     }
     else {
       error.data = gImportMsgsBundle.getString('ImportMailNotFound');
       return( false);
     }
   }
 
   if (mailInterface.WantsProgress()) {
-   if (mailInterface.BeginImport( success, error, false)) {	
+   if (mailInterface.BeginImport(success, error)) {	
       top.progressInfo.importInterface = mailInterface;
       // top.intervalState = setInterval( "ContinueImport()", 100);
       return true;
     }
     else
       return false;
   }
   else
-    return mailInterface.BeginImport( success, error, false) ? true : false;
+    return mailInterface.BeginImport(success, error);
 }
 
 
 // The address import!  A little more complicated than the mail import
 // due to field maps...
 function ImportAddress( module, success, error) {
   if (top.progressInfo.importInterface || top.progressInfo.intervalState) {
     error.data = gImportMsgsBundle.getString('ImportAlreadyInProgress');
@@ -828,20 +826,20 @@ function ImportAddress( module, success,
         }
       } catch( ex) {
         file = null;
       }
     }
     else {
       // ask for file
       try {
-        filePicker.init( top.window, gImportMsgsBundle.getString('ImportSelectAddrFile'), Components.interfaces.nsIFilePicker.modeOpen);
-        if (selectedModuleName == gImportMsgsBundle.getString('Comm4xImportName'))
-          filePicker.appendFilter(gImportMsgsBundle.getString('Comm4xFiles'),"*.na2");
-        else if (selectedModuleName == gImportMsgsBundle.getString('VCardImportName')) {
+        filePicker.init(top.window,
+                        gImportMsgsBundle.getString('ImportSelectAddrFile'),
+                        Components.interfaces.nsIFilePicker.modeOpen);
+        if (selectedModuleName == gImportMsgsBundle.getString('VCardImportName')) {
           var addressbookBundle = document.getElementById("bundle_addressbook");
           filePicker.appendFilter(addressbookBundle.getString('VCFFiles'), "*.vcf");
         } else {
           var addressbookBundle = document.getElementById("bundle_addressbook");
           filePicker.appendFilter(addressbookBundle.getString('LDIFFiles'), "*.ldi; *.ldif");
           filePicker.appendFilter(addressbookBundle.getString('CSVFiles'), "*.csv");
           filePicker.appendFilter(addressbookBundle.getString('TABFiles'), "*.tab; *.txt");
           filePicker.appendFilters(Components.interfaces.nsIFilePicker.filterAll);
@@ -871,31 +869,16 @@ function ImportAddress( module, success,
       var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
 
       promptService.alert(window, document.title, errorText);
       return false;
     }
     addInterface.SetData("addressLocation", file);
   }
 
-  // no need to use the fieldmap for 4.x import since we are using separate dialog
-  if (selectedModuleName == gImportMsgsBundle.getString('Comm4xImportName'))
-  {
-               var deck = document.getElementById("stateDeck");
-               deck.setAttribute("selectedIndex", "4");
-               var isHomeRadioGroup = document.getElementById("homeorwork");
-               isHomeRadioGroup.selectedItem = document.getElementById("workRadio");
-               var forwardButton = document.getElementById("forward");
-               forwardButton.removeAttribute("disabled");
-               var warning = document.getElementById("warning");
-               var textStr = "   " + path ;
-               warning.setAttribute ('value', textStr) ;
-               return false;
-  }
-
   var map = addInterface.GetData( "fieldMap");
   if (map != null) {
     map = map.QueryInterface( Components.interfaces.nsIImportFieldMap);
     if (map != null) {
       var result = new Object();
       result.ok = false;
       top.window.openDialog(
         "chrome://messenger/content/fieldMapImport.xul",
@@ -905,33 +888,25 @@ function ImportAddress( module, success,
          addInterface: addInterface,
          result: result});
     }
     if (result.ok == false)
       return( false);
   }
 
   if (addInterface.WantsProgress()) {
-    if (addInterface.BeginImport( success, error, selLocIsHome)) {   	
+    if (addInterface.BeginImport(success, error)) {
       top.progressInfo.importInterface = addInterface;
       // top.intervalState = setInterval( "ContinueImport()", 100);
-      return( true);
+      return true;
     }
-    else {
-      return( false);
-    }
+    return false;
   }
-  else {
-    if (addInterface.BeginImport( success, error, selLocIsHome)) {	
-      return( true);
-    }
-    else {
-      return( false);
-    }
-  }
+
+  return addInterface.BeginImport(success, error);
 }
 
 /*
   Import filters from a specific module.
   Returns false if it failed and true if it succeeded.
   An error string is returned as error.value.
 */
 function ImportFilters( module, error)
@@ -995,43 +970,19 @@ function next()
     }
     break;
   case "1":
     ImportDialogOKButton();
     break;
   case "3":
     close();
     break;
-  case "4" :
-    var isHomeRadioGroup = document.getElementById("homeorwork");
-    if (isHomeRadioGroup.selectedItem.getAttribute("value") == "Home")
-               selLocIsHome = true ;
-       ExportComm4x() ;
-       break ;
   }
 }
 
-function ExportComm4x()
-{
-  var result ;
-  if (addInterface.WantsProgress())
-  {
-    result = addInterface.BeginImport( successStr, errorStr, selLocIsHome) ;
-       top.progressInfo.importInterface = addInterface;
-       ShowResults(true, result) ;
-  }
-  else
-  {
-    result = addInterface.BeginImport( successStr, errorStr, selLocIsHome) ;
-       ShowResults(false, result) ;
-  }
-
-  return true ;
-}
-
 function SelectFirstItem()
 {
   var listbox = document.getElementById("moduleList");
   listbox.selectedIndex = 0;
   ImportSelectionChanged();
 }
 
 function enableAdvance()
--- a/mailnews/import/content/importDialog.xul
+++ b/mailnews/import/content/importDialog.xul
@@ -121,32 +121,16 @@
       </groupbox>
     </vbox>
     <vbox class="wizard-box">
       <description id="status"/>
       <hbox style="overflow: auto" class="inset" flex="1">
         <description id="results" flex="1"/>
       </hbox>
     </vbox>
-    <vbox class="wizard-box">
-      <description>&FieldDiscInputText1.label;</description>
-      <description>&FieldDiscInputText2.label;</description>
-      <separator/>
-      <separator class="thin"/>
-      <radiogroup id="homeorwork" class="indent">
-        <radio value="Home" id="homeRadio" label="&importHome.label;"
-               accesskey="&importHome.accesskey;"/>
-        <radio value="Work" id="workRadio" label="&importWork.label;"
-               accesskey="&importWork.accesskey;"/>
-      </radiogroup>
-         <separator/>
-         <separator/>
-         <description>&FieldDiscWarning.label;</description>
-         <label id="warning" flex="1"/>
-    </vbox>
   </deck>
 
   <separator/>
   
   <separator class="groove"/>
   
   <hbox class="box-padded">
     <spacer flex="1"/>
--- a/mailnews/import/eudora/src/nsEudoraImport.cpp
+++ b/mailnews/import/eudora/src/nsEudoraImport.cpp
@@ -149,46 +149,37 @@ public:
 
   static nsresult Create(nsIImportAddressBooks** aImport);
 
   // nsISupports interface
   NS_DECL_ISUPPORTS
 
   // nsIImportAddressBooks interface
 
-  /* PRBool GetSupportsMultiple (); */
   NS_IMETHOD GetSupportsMultiple(PRBool *_retval) { *_retval = PR_TRUE; return( NS_OK);}
 
-  /* PRBool GetAutoFind (out wstring description); */
   NS_IMETHOD GetAutoFind(PRUnichar **description, PRBool *_retval);
 
-  /* PRBool GetNeedsFieldMap (nsIFile location); */
   NS_IMETHOD GetNeedsFieldMap(nsIFile *location, PRBool *_retval) { *_retval = PR_FALSE; return( NS_OK);}
 
-  /* void GetDefaultLocation (out nsIFile location, out boolean found, out boolean userVerify); */
   NS_IMETHOD GetDefaultLocation(nsIFile **location, PRBool *found, PRBool *userVerify);
 
-  /* nsISupportsArray FindAddressBooks (in nsIFile location); */
   NS_IMETHOD FindAddressBooks(nsIFile *location, nsISupportsArray **_retval);
 
-  /* nsISupports GetFieldMap (in nsIImportABDescriptor source); */
   NS_IMETHOD InitFieldMap(nsIImportFieldMap *fieldMap)
     { return( NS_ERROR_FAILURE); }
 
-  /* void ImportAddressBook (in nsIImportABDescriptor source, in nsIAddrDatabase destination, in nsIImportFieldMap fieldMap, in boolean isAddrLocHome, out wstring errorLog, out wstring successLog, out boolean fatalError); */
   NS_IMETHOD ImportAddressBook(nsIImportABDescriptor *source,
                                nsIAddrDatabase *destination,
                                nsIImportFieldMap *fieldMap,
                                nsISupports *aSupportService,
-                               PRBool isAddrLocHome,
                                PRUnichar **errorLog,
                                PRUnichar **successLog,
                                PRBool *fatalError);
 
-  /* unsigned long GetImportProgress (); */
   NS_IMETHOD GetImportProgress(PRUint32 *_retval);
 
   NS_IMETHOD GetSampleData( PRInt32 index, PRBool *pFound, PRUnichar **pStr)
     { return( NS_ERROR_FAILURE);}
 
   NS_IMETHOD SetSampleLocation( nsIFile *) { return( NS_OK); }
 
 private:
@@ -731,17 +722,16 @@ void ImportEudoraAddressImpl::ReportSucc
 }
 
 
 NS_IMETHODIMP
 ImportEudoraAddressImpl::ImportAddressBook(nsIImportABDescriptor *pSource,
                                            nsIAddrDatabase *pDestination,
                                            nsIImportFieldMap *fieldMap,
                                            nsISupports *aSupportService,
-                                           PRBool isAddrLocHome,
                                            PRUnichar **pErrorLog,
                                            PRUnichar **pSuccessLog,
                                            PRBool *fatalError)
 {
     NS_PRECONDITION(pSource != nsnull, "null ptr");
     NS_PRECONDITION(pDestination != nsnull, "null ptr");
     NS_PRECONDITION(fatalError != nsnull, "null ptr");
 
--- a/mailnews/import/oexpress/nsOEImport.cpp
+++ b/mailnews/import/oexpress/nsOEImport.cpp
@@ -128,46 +128,38 @@ public:
 
   static nsresult Create(nsIImportAddressBooks** aImport);
 
     // nsISupports interface
     NS_DECL_ISUPPORTS
 
     // nsIImportAddressBooks interface
 
-  /* PRBool GetSupportsMultiple (); */
   NS_IMETHOD GetSupportsMultiple(PRBool *_retval) { *_retval = PR_FALSE; return( NS_OK);}
 
-  /* PRBool GetAutoFind (out wstring description); */
   NS_IMETHOD GetAutoFind(PRUnichar **description, PRBool *_retval);
 
-  /* PRBool GetNeedsFieldMap ( nsIFile *location); */
   NS_IMETHOD GetNeedsFieldMap(nsIFile *pLoc, PRBool *_retval) { *_retval = PR_FALSE; return( NS_OK);}
 
-  /* void GetDefaultLocation (out nsIFile location, out boolean found, out boolean userVerify); */
   NS_IMETHOD GetDefaultLocation(nsIFile **location, PRBool *found, PRBool *userVerify)
     { return( NS_ERROR_FAILURE);}
 
-  /* nsISupportsArray FindAddressBooks (in nsIFile location); */
   NS_IMETHOD FindAddressBooks(nsIFile *location, nsISupportsArray **_retval);
 
-  /* nsISupports InitFieldMap(nsIImportFieldMap *fieldMap); */
   NS_IMETHOD InitFieldMap(nsIImportFieldMap *fieldMap)
     { return( NS_ERROR_FAILURE); }
 
   NS_IMETHOD ImportAddressBook(nsIImportABDescriptor *source,
                                nsIAddrDatabase *destination,
                                nsIImportFieldMap *fieldMap,
                                nsISupports *aSupportService,
-                               PRBool isAddrLocHome,
                                PRUnichar **errorLog,
                                PRUnichar **successLog,
                                PRBool *fatalError);
 
-  /* unsigned long GetImportProgress (); */
   NS_IMETHOD GetImportProgress(PRUint32 *_retval);
 
   NS_IMETHOD GetSampleData( PRInt32 index, PRBool *pFound, PRUnichar **pStr)
     { return( NS_ERROR_FAILURE);}
 
   NS_IMETHOD SetSampleLocation( nsIFile *) { return( NS_OK); }
 
 private:
@@ -600,17 +592,16 @@ NS_IMETHODIMP ImportOEAddressImpl::FindA
 }
 
 
 
 NS_IMETHODIMP ImportOEAddressImpl::ImportAddressBook(nsIImportABDescriptor *source,
                                                      nsIAddrDatabase *destination,
                                                      nsIImportFieldMap *fieldMap,
                                                      nsISupports *aSupportService,
-                                                     PRBool isAddrLocHome,
                                                      PRUnichar **errorLog,
                                                      PRUnichar **successLog,
                                                      PRBool *fatalError)
 {
     NS_PRECONDITION(source != nsnull, "null ptr");
     // NS_PRECONDITION(destination != nsnull, "null ptr");
     // NS_PRECONDITION(fieldMap != nsnull, "null ptr");
     NS_PRECONDITION(fatalError != nsnull, "null ptr");
--- a/mailnews/import/public/nsIImportAddressBooks.idl
+++ b/mailnews/import/public/nsIImportAddressBooks.idl
@@ -68,17 +68,17 @@
 
 interface   nsIFile;
 interface   nsISupportsArray;
 interface  nsIImportABDescriptor;
 interface  nsIOutputStream;
 interface  nsIAddrDatabase;
 interface  nsIImportFieldMap;
 
-[scriptable, uuid(49e2bdf8-c5c3-4425-8c67-f20d15d45a71)]
+[scriptable, uuid(d64a87ba-f87b-6378-5ed1-4025a7474334)]
 interface nsIImportAddressBooks : nsISupports
 {
 
   /*
     Does this interface supports 1 or 1..n address books.  You only
     get to choose 1 location so for formats where 1..n address books
     are imported from a directory, then return true.  For a 1 to 1 relationship
     between location and address books return false.
@@ -134,26 +134,24 @@ interface nsIImportAddressBooks : nsISup
    * @param aDestination    The proxy database for the destination of the
    *                        import.
    * @param aFieldMap       The field map containing the mapping of fields to be
    *                        used in cvs and tab type imports.
    * @param aSupportService An optional proxy support service (nsnull is
    *                        acceptable if it is not required), may be required
    *                        for certain import types (e.g. nsIAbLDIFService for
    *                        LDIF import).
-   * @param aIsAddrLocHome  Whether or not an address is the home location.
    * @param aErrorLog       The error log from the import.
    * @param aSuccessLog     The success log from the import.
    * @param aFatalError     True if there was a fatal error doing the import.
    */
   void ImportAddressBook(in nsIImportABDescriptor aSource,
                          in nsIAddrDatabase aDestination,
                          in nsIImportFieldMap aFieldMap,
                          in nsISupports aSupportService,
-                         in boolean aIsAddrLocHome,
                          out wstring aErrorLog,
                          out wstring aSuccessLog,
                          out boolean aFatalError);
 
   /*
     Return the amount of the address book that has been imported so far.  This number
     is used to present progress information and must never be larger than the
     size specified in nsIImportABDescriptor.GetSize();  May be called from
--- a/mailnews/import/public/nsIImportGeneric.idl
+++ b/mailnews/import/public/nsIImportGeneric.idl
@@ -41,17 +41,17 @@
 
 */
 
 #include "nsISupports.idl"
 
 interface nsIDOMWindowInternal;
 interface nsISupportsString;
 
-[scriptable, uuid(9b5c20c0-2348-11d3-a206-00a0cc26da63)]
+[scriptable, uuid(d64a87b8-aeb4-da40-fe28-57df1e50c64f)]
 interface nsIImportGeneric : nsISupports
 {
   /* Use these to prepare for the import */
     /*
       "mailInterface" - nsIImportMail interface
       "mailBoxes" - nsISupportsArray of nsIImportMailboxDescriptors
       "mailLocation" - nsIFile, source location for mail
 
@@ -90,17 +90,18 @@ interface nsIImportGeneric : nsISupports
 
   /* Use these for the actual import */
     /* Begin import is expected to start a new thread UNLESS WantsProgress returned
       FALSE.  It is REQUIRED to call WantsProgress before calling BeginImport.
       If WantsProgress was false then this will return the success or
       failure of the import.  Failure can be reported even if WantsProgress
       returned TRUE.
      */
-  boolean         BeginImport( in nsISupportsString successLog, in nsISupportsString errorLog, in boolean isAddrLocHome);
+  boolean BeginImport(in nsISupportsString successLog,
+                      in nsISupportsString errorLog);
     /*
       If WantsProgress returned TRUE then this will indicate if the import should
       continue.  If this returns FALSE then no other methods should be called
       and the error log should be shown to the user.
     */
   boolean    ContinueImport();
     /*
       Returns the percentage done.  When this returns 100 then the import is done.
--- a/mailnews/import/src/nsImportAddressBooks.cpp
+++ b/mailnews/import/src/nsImportAddressBooks.cpp
@@ -80,29 +80,24 @@ public:
 
   /* nsISupports GetData (in string dataId); */
   NS_IMETHOD GetData(const char *dataId, nsISupports **_retval);
 
   NS_IMETHOD SetData(const char *dataId, nsISupports *pData);
 
   NS_IMETHOD GetStatus( const char *statusKind, PRInt32 *_retval);
 
-  /* boolean WantsProgress (); */
   NS_IMETHOD WantsProgress(PRBool *_retval);
 
-    /* boolean BeginImport (in nsISupportsString successLog, in nsISupportsString errorLog, in boolean isAddrLocHome); */
-    NS_IMETHOD BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool isAddrLocHome, PRBool *_retval) ;
+  NS_IMETHOD BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool *_retval) ;
 
-  /* boolean ContinueImport (); */
   NS_IMETHOD ContinueImport(PRBool *_retval);
 
-  /* long GetProgress (); */
   NS_IMETHOD GetProgress(PRInt32 *_retval);
 
-  /* void CancelImport (); */
   NS_IMETHOD CancelImport(void);
 
 private:
   void  GetDefaultLocation( void);
   void  GetDefaultBooks( void);
   void  GetDefaultFieldMap( void);
 
 public:
@@ -139,17 +134,16 @@ public:
   PRUint32          currentSize;
   nsISupportsArray *      books;
   nsIAbLDIFService *ldifService;
   nsIImportAddressBooks *    addressImport;
   nsIImportFieldMap *      fieldMap;
   nsISupportsString *    successLog;
   nsISupportsString *    errorLog;
   char *            pDestinationUri;
-  PRBool                      bAddrLocInput ;
     nsIStringBundle*            stringBundle;
 
   AddressThreadData();
   ~AddressThreadData();
   void DriverDelete();
   void ThreadDelete();
   void DriverAbort();
 };
@@ -533,17 +527,17 @@ void nsImportGenericAddressBooks::SetLog
   }
   if (pError) {
     pError->GetData(str);
         str.Append(error);
         pError->SetData(error);
   }
 }
 
-NS_IMETHODIMP nsImportGenericAddressBooks::BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool isAddrLocHome, PRBool *_retval)
+NS_IMETHODIMP nsImportGenericAddressBooks::BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool *_retval)
 {
   NS_PRECONDITION(_retval != nsnull, "null ptr");
     if (!_retval)
         return NS_ERROR_NULL_POINTER;
 
   nsString  success;
   nsString  error;
 
@@ -596,17 +590,16 @@ NS_IMETHODIMP nsImportGenericAddressBook
   m_pThreadData->fieldMap = m_pFieldMap;
   NS_IF_ADDREF( m_pFieldMap);
   m_pThreadData->errorLog = m_pErrorLog;
   NS_IF_ADDREF( m_pErrorLog);
   m_pThreadData->successLog = m_pSuccessLog;
   NS_IF_ADDREF( m_pSuccessLog);
   if (m_pDestinationUri)
     m_pThreadData->pDestinationUri = strdup( m_pDestinationUri);
-  m_pThreadData->bAddrLocInput = isAddrLocHome ;
 
   NS_IF_ADDREF(m_pThreadData->stringBundle = m_stringBundle);
 
   nsresult rv;
   nsCOMPtr<nsIAbLDIFService> ldifService(do_GetService(NS_ABLDIFSERVICE_CONTRACTID, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIProxyObjectManager> proxyObjectManager =
@@ -1028,17 +1021,16 @@ static void ImportAddressThread( void *s
             }
           }
           */
 
           rv = pData->addressImport->ImportAddressBook(book,
                                                        proxyAddrDatabase,
                                                        pData->fieldMap,
                                                        pData->ldifService,
-                                                       pData->bAddrLocInput,
                                                        &pError,
                                                        &pSuccess,
                                                        &fatalError);
           if (pSuccess) {
             success.Append( pSuccess);
             NS_Free( pSuccess);
           }
           if (pError) {
--- a/mailnews/import/src/nsImportMail.cpp
+++ b/mailnews/import/src/nsImportMail.cpp
@@ -93,29 +93,24 @@ public:
 
   /* nsISupports GetData (in string dataId); */
   NS_IMETHOD GetData(const char *dataId, nsISupports **_retval);
 
   NS_IMETHOD SetData(const char *dataId, nsISupports *pData);
 
   NS_IMETHOD GetStatus( const char *statusKind, PRInt32 *_retval);
 
-  /* boolean WantsProgress (); */
   NS_IMETHOD WantsProgress(PRBool *_retval);
 
-    /* boolean BeginImport (in nsISupportsString successLog, in nsISupportsString errorLog, in boolean isAddrLocHome); */
-    NS_IMETHODIMP BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool isAddrLocHome, PRBool *_retval) ;
+  NS_IMETHODIMP BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool *_retval) ;
 
-  /* boolean ContinueImport (); */
   NS_IMETHOD ContinueImport(PRBool *_retval);
 
-  /* long GetProgress (); */
   NS_IMETHOD GetProgress(PRInt32 *_retval);
 
-  /* void CancelImport (); */
   NS_IMETHOD CancelImport(void);
 
 private:
   PRBool  CreateFolder( nsIMsgFolder **ppFolder);
   void  GetDefaultMailboxes( void);
   void  GetDefaultLocation( void);
   void  GetDefaultDestination( void);
   void  GetMailboxName( PRUint32 index, nsISupportsString *pStr);
@@ -476,17 +471,17 @@ void nsImportGenericMail::GetMailboxName
       box->GetDisplayName(getter_Copies(name));
       if (!name.IsEmpty()) {
         pStr->SetData(name);
       }
     }
   }
 }
 
-NS_IMETHODIMP nsImportGenericMail::BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool isAddrLocHome, PRBool *_retval)
+NS_IMETHODIMP nsImportGenericMail::BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool *_retval)
 {
   NS_PRECONDITION(_retval != nsnull, "null ptr");
     if (!_retval)
         return NS_ERROR_NULL_POINTER;
 
   nsString  success;
   nsString  error;
 
--- a/mailnews/import/test/unit/resources/import_helper.js
+++ b/mailnews/import/test/unit/resources/import_helper.js
@@ -1,17 +1,17 @@
 // used by checkProgress to periodically check the progress of the import
 var gAbImportHelper;
 /**
  * AbImportHelper
  * A helper for Address Book imports. To use, supply at least the file and type.
  * If you would like the results checked, add a new array in the addressbook
  * JSON file in the resources folder and supply aAbName and aJsonName.
  * See AB_README for more information.
- * 
+ *
  * @param aFile     An instance of nsIAbFile to import.
  * @param aType     The type of import.  Should be LDIF, CSV, or TAB.
  *
  * Optional parameters: Include if you would like the import checked.
  * @param aAbName   The name the address book will have (the filename without
  *                  the extension).
  * @param aJsonName The name of the array in addressbook.json with the cards
  *                  to compare with the imported cards.
@@ -73,17 +73,17 @@ AbImportHelper.prototype =
     // get the import interface used for all text imports
     this.mAbInterface = this.getInterface("addressbook", ".csv");
     this.mAbInterface.SetData("addressLocation", this.mFile);
     // skip setting the field map if this is an LDIF import
     if (!this.mLdif)
       this.mAbInterface.SetData("fieldMap", this.getDefaultFieldMap(true));
 
     do_check_true(this.mAbInterface.WantsProgress());
-    do_check_true(this.mAbInterface.BeginImport(null, null, false));
+    do_check_true(this.mAbInterface.BeginImport(null, null));
     do_test_pending();
     this.checkProgress();
   },
   /**
    * AbImportHelper.getInterface
    * Returns an import interface based on the name of the module and a string
    * to search for.
    *
@@ -135,17 +135,17 @@ AbImportHelper.prototype =
   /**
    * AbImportHelper.checkProgress
    * Checks the progress of an import every 200 milliseconds until it is
    * complete.  Checks the test results if there is an original address book,
    * otherwise evaluates the optional command, or calls do_test_finished().
    */
   checkProgress: function()
   {
-    do_check_true(this.mAbInterface && 
+    do_check_true(this.mAbInterface &&
                   this.mAbInterface instanceof Ci.nsIImportGeneric);
     do_check_true(this.mAbInterface.ContinueImport());
     // if the import isn't done, check again in 200 milliseconds.
     if (this.mAbInterface.GetProgress() != 100) {
       // use the helper object to check the progress of the import after 200 ms
       gAbImportHelper = this;
       do_timeout(200, function(){gAbImportHelper.checkProgress();});
     }
@@ -261,14 +261,14 @@ AbImportHelper.prototype =
     var str = {};
     // get the entire file into the json string
     while(istream.readString(4096, str) != 0)
       json += str.value;
     // close the input streams
     istream.close();
     fis.close();
     // decode the JSON and get the array of cards
-    var nsIJSON = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON);  
+    var nsIJSON = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON);
     var arr = nsIJSON.decode(json)[aName];
     do_check_true(arr && arr.length > 0);
     return arr;
   }
 }
--- a/mailnews/import/test/unit/test_bug_437556.js
+++ b/mailnews/import/test/unit/test_bug_437556.js
@@ -1,21 +1,21 @@
 /**
- * Test for a regression of Bug 437556: mailnews crashes while importing an 
+ * Test for a regression of Bug 437556: mailnews crashes while importing an
  * address book if a field map is required but not set.
  */
 function run_test()
 {
   var file = do_get_file("resources/basic_addressbook.csv");
   var errorStr = Cc["@mozilla.org/supports-string;1"]
                   .createInstance(Ci.nsISupportsString);
   // get the Address Book text import interface and make sure it succeeded
   var helper = new AbImportHelper(file, "CSV");
   var abInterface = helper.getInterface("addressbook", ".csv");
   do_check_neq(abInterface, null);
   // prepare to start the import
   abInterface.SetData("addressLocation", file);
   do_check_true(abInterface.WantsProgress());
   // start the import
   // BeginImport should return false and log an error if the fieldMap isn't set
-  do_check_false(abInterface.BeginImport(null, errorStr, false));
+  do_check_false(abInterface.BeginImport(null, errorStr));
   do_check_neq(errorStr, "");
 }
--- a/mailnews/import/text/src/nsTextImport.cpp
+++ b/mailnews/import/text/src/nsTextImport.cpp
@@ -93,45 +93,36 @@ public:
   static nsresult Create(nsIImportAddressBooks** aImport,
                          nsIStringBundle *aStringBundle);
 
     // nsISupports interface
     NS_DECL_ISUPPORTS
 
     // nsIImportAddressBooks interface
     
-  /* PRBool GetSupportsMultiple (); */
   NS_IMETHOD GetSupportsMultiple(PRBool *_retval) { *_retval = PR_FALSE; return( NS_OK);}
 
-  /* PRBool GetAutoFind (out wstring description); */
   NS_IMETHOD GetAutoFind(PRUnichar **description, PRBool *_retval);
 
-  /* PRBool GetNeedsFieldMap (nsIFile *location); */
   NS_IMETHOD GetNeedsFieldMap(nsIFile *location, PRBool *_retval);
 
-  /* void GetDefaultLocation (out nsIFile location, out boolean found, out boolean userVerify); */
   NS_IMETHOD GetDefaultLocation(nsIFile **location, PRBool *found, PRBool *userVerify);
 
-  /* nsISupportsArray FindAddressBooks (in nsIFile location); */
   NS_IMETHOD FindAddressBooks(nsIFile *location, nsISupportsArray **_retval);
 
-  /* nsISupports InitFieldMap(nsIImportFieldMap fieldMap); */
   NS_IMETHOD InitFieldMap(nsIImportFieldMap *fieldMap);
 
-  /* void ImportAddressBook (in nsIImportABDescriptor source, in nsIAddrDatabase destination, in nsIImportFieldMap fieldMap, in boolean isAddrLocHome, out wstring errorLog, out wstring successLog, out boolean fatalError); */
   NS_IMETHOD ImportAddressBook(nsIImportABDescriptor *source,
                                nsIAddrDatabase *destination,
                                nsIImportFieldMap *fieldMap,
                                nsISupports *aSupportService,
-                               PRBool isAddrLocHome,
                                PRUnichar **errorLog,
                                PRUnichar **successLog,
                                PRBool *fatalError);
 
-  /* unsigned long GetImportProgress (); */
   NS_IMETHOD GetImportProgress(PRUint32 *_retval);
 
   NS_IMETHOD GetSampleData( PRInt32 index, PRBool *pFound, PRUnichar **pStr);
 
   NS_IMETHOD SetSampleLocation( nsIFile *);
 
 private:
   void ClearSampleFile( void);
@@ -426,17 +417,16 @@ void ImportAddressImpl::SetLogs( nsStrin
 }
 
 
 NS_IMETHODIMP
 ImportAddressImpl::ImportAddressBook(nsIImportABDescriptor *pSource,
                                      nsIAddrDatabase *pDestination,
                                      nsIImportFieldMap *fieldMap,
                                      nsISupports *aSupportService,
-                                     PRBool isAddrLocHome,
                                      PRUnichar ** pErrorLog,
                                      PRUnichar ** pSuccessLog,
                                      PRBool * fatalError)
 {
   NS_PRECONDITION(pSource != nsnull, "null ptr");
   NS_PRECONDITION(pDestination != nsnull, "null ptr");
   NS_PRECONDITION(fatalError != nsnull, "null ptr");
 
--- a/mailnews/import/vcard/src/nsVCardImport.cpp
+++ b/mailnews/import/vcard/src/nsVCardImport.cpp
@@ -92,17 +92,16 @@ public:
 
   NS_IMETHOD InitFieldMap(nsIImportFieldMap *fieldMap)
   { return NS_ERROR_FAILURE;}
 
   NS_IMETHOD ImportAddressBook(nsIImportABDescriptor *source,
                                nsIAddrDatabase *destination,
                                nsIImportFieldMap *fieldMap,
                                nsISupports *aSupportService,
-                               PRBool isAddrLocHome,
                                PRUnichar **errorLog,
                                PRUnichar **successLog,
                                PRBool *fatalError);
 
   NS_IMETHOD GetImportProgress(PRUint32 *_retval);
 
   NS_IMETHOD GetSampleData(PRInt32 index, PRBool *pFound, PRUnichar **pStr)
   { return NS_ERROR_FAILURE;}
@@ -372,17 +371,16 @@ void ImportVCardAddressImpl::SetLogs(
     *pSuccess = ToNewUnicode(success);
 }
 
 NS_IMETHODIMP ImportVCardAddressImpl::ImportAddressBook(
     nsIImportABDescriptor *pSource,
     nsIAddrDatabase *pDestination,
     nsIImportFieldMap *fieldMap,
     nsISupports *aSupportService,
-    PRBool isAddrLocHome,
     PRUnichar ** pErrorLog,
     PRUnichar ** pSuccessLog,
     PRBool * fatalError)
 {
   NS_ENSURE_ARG_POINTER(pSource);
   NS_ENSURE_ARG_POINTER(pDestination);
   NS_ENSURE_ARG_POINTER(fatalError);
 
--- a/suite/locales/en-US/chrome/mailnews/importDialog.dtd
+++ b/suite/locales/en-US/chrome/mailnews/importDialog.dtd
@@ -64,16 +64,8 @@
 <!ENTITY forward.label            "Next &gt;">
 <!ENTITY finish.label             "Finish">
 <!ENTITY cancel.label             "Cancel">
 
 <!ENTITY select.label             "or select the type of material to import:">
 
 <!ENTITY title.label              "Title">
 <!ENTITY processing.label         "Importing…">
-
-<!ENTITY FieldDiscInputText1.label  "Netscape Communicator 4.x has one mailing address for each card, while &brandShortName; has two (Home and Work).">
-<!ENTITY FieldDiscInputText2.label  "Select the category in which you want to store the imported mailing addresses:">
-<!ENTITY FieldDiscWarning.label  "This category will be used for all the entries of the selected address book: ">
-<!ENTITY importHome.label        "Home">
-<!ENTITY importHome.accesskey    "H">
-<!ENTITY importWork.label        "Work">
-<!ENTITY importWork.accesskey    "W">
--- a/suite/locales/en-US/chrome/mailnews/importMsgs.properties
+++ b/suite/locales/en-US/chrome/mailnews/importMsgs.properties
@@ -330,21 +330,17 @@ AddrProgressMeterText=Converting address
 #Import file dialog strings
 ImportSelectSettings=Select Settings File
 ImportSelectMailDir=Select Mail Directory
 ImportSelectAddrDir=Select Address Book Directory
 ImportSelectAddrFile=Select Address Book File
 
 # LOCALIZATION NOTE : "Communicator 4.x" is the used for previous versions of Netscape Communicator
 # Please translate using the brandname in respective languages for Netscape Communicator 4 releases.
-# LOCALIZATION NOTE : Please do not translate "*.na2", this represents the extension of the address book 
-# files from the Netscape Communicator 4 releases.
-# Comm4.xTo6.xImport user selection string
 Comm4xImportName=Communicator 4.x
-Comm4xFiles=Communicator Address Book files (*.na2)
 
 # Folder Names for imported Mail
 DefaultFolderName=Imported Mail
 # LOCALIZATION NOTE: Do not translate the word "%S" below.
 ImportModuleFolderName=%S Import
  
 # LOCALIZATION NOTE : "Communicator 4.x" is the used for previous versions of Netscape Communicator
 # Please translate using the brandname in respective languages for Netscape Communicator 4 releases.