Backing out prefs changes...need to make this work in multiple threads.

This commit is contained in:
rhp%netscape.com 1999-04-01 03:21:11 +00:00
Родитель b1fe1b95f8
Коммит 6c0bb9d50b
3 изменённых файлов: 17 добавлений и 6 удалений

Просмотреть файл

@ -79,12 +79,18 @@ nsMimeEmitter::nsMimeEmitter()
mReallyOutput = PR_FALSE;
#endif
#ifdef NS_DEBUG
printf("Prefs not working on multiple threads...must find a solution\n");
#endif
mHeaderDisplayType = AllHeaders;
return;
nsresult rv = nsServiceManager::GetService(kPrefCID, kIPrefIID, (nsISupports**)&(mPrefs));
if (! (mPrefs && NS_SUCCEEDED(rv)))
return;
mPrefs->Startup("prefs.js");
mHeaderDisplayType = AllHeaders;
mPrefs->GetIntPref("mail.show_headers", &mHeaderDisplayType);
}

Просмотреть файл

@ -631,7 +631,8 @@ mime_create (const char *content_type, MimeHeaders *hdrs,
{
nsIPref *pref = GetPrefServiceManager(opts); // Pref service manager
pref->GetBoolPref("mailnews.autolookup_unknown_mime_types",&reverse_lookup);
if (pref)
pref->GetBoolPref("mailnews.autolookup_unknown_mime_types",&reverse_lookup);
got_lookup_pref = PR_TRUE;
}

Просмотреть файл

@ -1037,14 +1037,15 @@ mime_bridge_create_stream(MimePluginInstance *newPluginObj,
return NULL;
}
/***
nsresult rv = nsServiceManager::GetService(kPrefCID, kIPrefIID, (nsISupports**)&(msd->prefs));
if (! (msd->prefs && NS_SUCCEEDED(rv)))
{
PR_FREEIF(msd);
return NULL;
}
msd->prefs->Startup(MIME_PREFS_FILE);
***/
// Assign the new mime emitter - will handle output operations
msd->output_emitter = newEmitter;
@ -1122,16 +1123,19 @@ mime_bridge_create_stream(MimePluginInstance *newPluginObj,
// Get the libmime prefs...
MIME_NoInlineAttachments = PR_TRUE;
msd->prefs->GetBoolPref("mail.inline_attachments", &MIME_NoInlineAttachments);
if (msd->prefs)
msd->prefs->GetBoolPref("mail.inline_attachments", &MIME_NoInlineAttachments);
MIME_NoInlineAttachments = !MIME_NoInlineAttachments;
/* This pref is written down in with the
opposite sense of what we like to use... */
MIME_WrapLongLines = PR_FALSE;
msd->prefs->GetBoolPref("mail.wrap_long_lines", &MIME_WrapLongLines);
if (msd->prefs)
msd->prefs->GetBoolPref("mail.wrap_long_lines", &MIME_WrapLongLines);
MIME_VariableWidthPlaintext = PR_TRUE;
msd->prefs->GetBoolPref("mail.fixed_width_messages", &MIME_VariableWidthPlaintext);
if (msd->prefs)
msd->prefs->GetBoolPref("mail.fixed_width_messages", &MIME_VariableWidthPlaintext);
MIME_VariableWidthPlaintext = !MIME_VariableWidthPlaintext;
msd->options->no_inline_p = MIME_NoInlineAttachments;