we can't use the localized pretty name for "Local Folders" for the
the hostname of the "Local Folders" server, or for the name of the directory on disk. if we did, as soon as someone localized "Local Folders" migration would break. while I'm here, only hard code these strings once. to allow people to build without mailnews, hard code them in nsIPrefMigration.idl r=alecf git-svn-id: svn://10.0.0.236/trunk@71330 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
edd2af6a7d
commit
5e070cbda5
@ -71,6 +71,8 @@
|
||||
#include "nsIMsgFilterService.h"
|
||||
#include "nsIMsgFilterList.h"
|
||||
|
||||
#include "nsIPrefMigration.h" // for NEW_LOCAL_MAIL_DIR_NAME
|
||||
|
||||
#define BUF_STR_LEN 1024
|
||||
|
||||
#if defined(DEBUG_sspitzer) || defined(DEBUG_seth)
|
||||
@ -112,9 +114,6 @@ static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
#ifdef HAVE_MOVEMAIL
|
||||
#define MOVEMAIL_FAKE_HOST_NAME "movemail"
|
||||
#endif /* HAVE_MOVEMAIL */
|
||||
#define NEW_MAIL_DIR_NAME "Mail"
|
||||
#define NEW_NEWS_DIR_NAME "News"
|
||||
#define NEW_IMAPMAIL_DIR_NAME "ImapMail"
|
||||
#define DEFAULT_4X_DRAFTS_FOLDER_NAME "Drafts"
|
||||
#define DEFAULT_4X_SENT_FOLDER_NAME "Sent"
|
||||
#define DEFAULT_4X_TEMPLATES_FOLDER_NAME "Templates"
|
||||
@ -419,11 +418,7 @@ nsMessengerMigrator::initializeStrings()
|
||||
// convert to unicode and ASCII
|
||||
|
||||
mLocalFoldersName.Assign(localFolders);
|
||||
// should we use utf8 here? or maybe the system charset?
|
||||
// or if we switch to nsIFile, it won't matter?
|
||||
// this string is only visible to the user when creating the root
|
||||
// folder on disk
|
||||
mLocalFoldersHostname.AssignWithConversion(localFolders);
|
||||
mLocalFoldersHostname = NEW_LOCAL_MAIL_DIR_NAME;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -30,6 +30,12 @@ interface nsIWebShellWindow;
|
||||
#define NS_PREFCONVERTER_PROGID "component://netscape/migration/pref-converter"
|
||||
#define NS_ERROR_NOT_ENOUGH_SPACE_TO_MIGRATE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_MAILNEWS, 1)
|
||||
|
||||
/* these are hard coded, in ascii, as they will be used for directory folder names on disk. NEW_LOCAL_MAIL_DIR_NAME is also used as the host name for the local folders account */
|
||||
#define NEW_MAIL_DIR_NAME "Mail"
|
||||
#define NEW_NEWS_DIR_NAME "News"
|
||||
#define NEW_IMAPMAIL_DIR_NAME "ImapMail"
|
||||
#define NEW_LOCAL_MAIL_DIR_NAME "Local Folders"
|
||||
|
||||
%}
|
||||
|
||||
[scriptable, uuid(85c86e4c-6a6c-11d3-9a55-004005263078)]
|
||||
|
||||
@ -155,16 +155,6 @@
|
||||
|
||||
#define NEW_DIR_SUFFIX "5"
|
||||
|
||||
/* sspitzer:
|
||||
* TODO: these should come from the messenger back end, which gets them
|
||||
* from a string bundle somewhere
|
||||
*/
|
||||
/* these are the same for all platforms */
|
||||
#define NEW_MAIL_DIR_NAME "Mail"
|
||||
#define NEW_NEWS_DIR_NAME "News"
|
||||
#define NEW_IMAPMAIL_DIR_NAME "ImapMail"
|
||||
#define NEW_LOCAL_MAIL_DIR_NAME "Local Folders"
|
||||
|
||||
/* who's going to win the file name battle? */
|
||||
#if defined(XP_UNIX)
|
||||
#define PREF_FILE_NAME_IN_4x "preferences.js"
|
||||
|
||||
@ -953,19 +953,19 @@ nsresult nsProfile::CreateUserDirectories(const nsFileSpec& profileDir)
|
||||
nsFileSpec tmpDir;
|
||||
|
||||
tmpDir = profileDir;
|
||||
tmpDir += "News";
|
||||
tmpDir += NEW_NEWS_DIR_NAME;
|
||||
|
||||
if (!tmpDir.Exists())
|
||||
tmpDir.CreateDirectory();
|
||||
|
||||
tmpDir = profileDir;
|
||||
tmpDir += "ImapMail";
|
||||
tmpDir += NEW_IMAPMAIL_DIR_NAME;
|
||||
|
||||
if (!tmpDir.Exists())
|
||||
tmpDir.CreateDirectory();
|
||||
|
||||
tmpDir = profileDir;
|
||||
tmpDir += "Mail";
|
||||
tmpDir += NEW_MAIL_DIR_NAME;
|
||||
|
||||
if (!tmpDir.Exists())
|
||||
tmpDir.CreateDirectory();
|
||||
|
||||
@ -50,6 +50,7 @@
|
||||
#endif
|
||||
|
||||
#include "nsIProfile.h"
|
||||
#include "nsIPrefMigration.h" // for NEW_IMAPMAIL_DIR_NAME, etc
|
||||
|
||||
#include "plstr.h"
|
||||
#include "prenv.h"
|
||||
@ -566,21 +567,21 @@ void nsSpecialFileSpec::operator = (Type aType)
|
||||
case App_MailDirectory50:
|
||||
{
|
||||
*this = nsSpecialFileSpec(App_UserProfileDirectory50);
|
||||
*this += "Mail";
|
||||
*this += NEW_MAIL_DIR_NAME;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case App_ImapMailDirectory50:
|
||||
{
|
||||
*this = nsSpecialFileSpec(App_UserProfileDirectory50);
|
||||
*this += "ImapMail";
|
||||
*this += NEW_IMAPMAIL_DIR_NAME;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case App_NewsDirectory50:
|
||||
{
|
||||
*this = nsSpecialFileSpec(App_UserProfileDirectory50);
|
||||
*this += "News";
|
||||
*this += NEW_NEWS_DIR_NAME;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user