本文整理汇总了C++中BMailSettings::DefaultOutboundAccount方法的典型用法代码示例。如果您正苦于以下问题:C++ BMailSettings::DefaultOutboundAccount方法的具体用法?C++ BMailSettings::DefaultOutboundAccount怎么用?C++ BMailSettings::DefaultOutboundAccount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BMailSettings
的用法示例。
在下文中一共展示了BMailSettings::DefaultOutboundAccount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadOldSettings
status_t
TMailApp::LoadSettings()
{
BMailSettings accountSettings;
fDefaultAccount = accountSettings.DefaultOutboundAccount();
BPath path;
status_t status = GetSettingsPath(path);
if (status != B_OK)
return status;
path.Append("BeMail Settings");
BFile file;
status = file.SetTo(path.Path(), B_READ_ONLY);
if (status != B_OK)
return LoadOldSettings();
BMessage settings;
status = settings.Unflatten(&file);
if (status < B_OK || settings.what != 'BeMl') {
// the current settings are corrupted, try old ones
return LoadOldSettings();
}
BRect rect;
if (settings.FindRect("MailWindowSize", &rect) == B_OK)
fMailWindowFrame = rect;
int32 int32Value;
// if (settings.FindInt32("ExperienceLevel", &int32Value) == B_OK)
// level = int32Value;
const char *fontFamily;
if (settings.FindString("FontFamily", &fontFamily) == B_OK) {
const char *fontStyle;
if (settings.FindString("FontStyle", &fontStyle) == B_OK) {
float size;
if (settings.FindFloat("FontSize", &size) == B_OK) {
if (size >= 7)
fContentFont.SetSize(size);
if (fontFamily[0] && fontStyle[0]) {
fContentFont.SetFamilyAndStyle(fontFamily[0] ? fontFamily : NULL,
fontStyle[0] ? fontStyle : NULL);
}
}
}
}
if (settings.FindRect("SignatureWindowSize", &rect) == B_OK)
fSignatureWindowFrame = rect;
bool boolValue;
if (settings.FindBool("WordWrapMode", &boolValue) == B_OK)
fWrapMode = boolValue;
BPoint point;
if (settings.FindPoint("PreferencesWindowLocation", &point) == B_OK)
fPrefsWindowPos = point;
if (settings.FindBool("AutoMarkRead", &boolValue) == B_OK)
fAutoMarkRead = boolValue;
const char *string;
if (settings.FindString("SignatureText", &string) == B_OK) {
free(fSignature);
fSignature = strdup(string);
}
if (settings.FindInt32("CharacterSet", &int32Value) == B_OK)
fMailCharacterSet = int32Value;
if (fMailCharacterSet != B_MAIL_UTF8_CONVERSION
&& fMailCharacterSet != B_MAIL_US_ASCII_CONVERSION
&& BCharacterSetRoster::GetCharacterSetByConversionID(fMailCharacterSet) == NULL)
fMailCharacterSet = B_MS_WINDOWS_CONVERSION;
if (settings.FindString("FindString", &string) == B_OK)
FindWindow::SetFindString(string);
int8 int8Value;
if (settings.FindInt8("ShowButtonBar", &int8Value) == B_OK)
fShowToolBar = int8Value;
if (settings.FindInt32("UseAccountFrom", &int32Value) == B_OK)
fUseAccountFrom = int32Value;
if (fUseAccountFrom < ACCOUNT_USE_DEFAULT
|| fUseAccountFrom > ACCOUNT_FROM_MAIL)
fUseAccountFrom = ACCOUNT_USE_DEFAULT;
if (settings.FindBool("ColoredQuotes", &boolValue) == B_OK)
fColoredQuotes = boolValue;
if (settings.FindString("ReplyPreamble", &string) == B_OK) {
free(fReplyPreamble);
fReplyPreamble = strdup(string);
}
if (settings.FindBool("AttachAttributes", &boolValue) == B_OK)
fAttachAttributes = boolValue;
//.........这里部分代码省略.........