Hopefully this are all remaining read erros.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30651 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e94e90f071
commit
f5b22bcfa8
@ -130,7 +130,7 @@ TMailApp::TMailApp()
|
||||
{
|
||||
// set default values
|
||||
fContentFont.SetSize(12.0);
|
||||
fAutoMarkReaded = true;
|
||||
fAutoMarkRead = true;
|
||||
fSignature = (char *)malloc(strlen(SIG_NONE) + 1);
|
||||
strcpy(fSignature, SIG_NONE);
|
||||
fReplyPreamble = (char *)malloc(1);
|
||||
@ -349,7 +349,7 @@ TMailApp::MessageReceived(BMessage *msg)
|
||||
&fColoredQuotes, &fDefaultChain, &fUseAccountFrom,
|
||||
&fReplyPreamble, &fSignature, &fMailCharacterSet,
|
||||
&fWarnAboutUnencodableCharacters,
|
||||
&fStartWithSpellCheckOn, &fAutoMarkReaded,
|
||||
&fStartWithSpellCheckOn, &fAutoMarkRead,
|
||||
&fShowButtonBar);
|
||||
fPrefsWindow->Show();
|
||||
}
|
||||
@ -912,7 +912,7 @@ TMailApp::SaveSettings()
|
||||
settings.AddRect("SignatureWindowSize", fSignatureWindowFrame);
|
||||
settings.AddBool("WordWrapMode", fWrapMode);
|
||||
settings.AddPoint("PreferencesWindowLocation", fPrefsWindowPos);
|
||||
settings.AddBool("AutoMarkReaded", fAutoMarkReaded);
|
||||
settings.AddBool("AutoMarkRead", fAutoMarkRead);
|
||||
settings.AddString("SignatureText", fSignature);
|
||||
settings.AddInt32("CharacterSet", fMailCharacterSet);
|
||||
settings.AddString("FindString", FindWindow::GetFindString());
|
||||
@ -1001,8 +1001,8 @@ TMailApp::LoadSettings()
|
||||
if (settings.FindPoint("PreferencesWindowLocation", &point) == B_OK)
|
||||
fPrefsWindowPos = point;
|
||||
|
||||
if (settings.FindBool("AutoMarkReaded", &boolValue) == B_OK)
|
||||
fAutoMarkReaded = boolValue;
|
||||
if (settings.FindBool("AutoMarkRead", &boolValue) == B_OK)
|
||||
fAutoMarkRead = boolValue;
|
||||
|
||||
const char *string;
|
||||
if (settings.FindString("SignatureText", &string) == B_OK) {
|
||||
@ -1142,10 +1142,10 @@ TMailApp::NewWindow(const entry_ref* ref, const char* to, bool resend,
|
||||
|
||||
|
||||
bool
|
||||
TMailApp::AutoMarkReaded()
|
||||
TMailApp::AutoMarkRead()
|
||||
{
|
||||
BAutolock _(this);
|
||||
return fAutoMarkReaded;
|
||||
return fAutoMarkRead;
|
||||
}
|
||||
|
||||
|
||||
|
@ -73,7 +73,7 @@ class TMailApp : public BApplication {
|
||||
void SetLastWindowFrame(BRect frame);
|
||||
|
||||
// TODO: move these into a MailSettings class
|
||||
bool AutoMarkReaded();
|
||||
bool AutoMarkRead();
|
||||
BString Signature();
|
||||
BString ReplyPreamble();
|
||||
bool WrapMode();
|
||||
@ -114,7 +114,7 @@ class TMailApp : public BApplication {
|
||||
bool fPrintHelpAndExit;
|
||||
|
||||
// TODO: these should go into a settings class
|
||||
bool fAutoMarkReaded;
|
||||
bool fAutoMarkRead;
|
||||
char* fSignature;
|
||||
char* fReplyPreamble;
|
||||
bool fWrapMode;
|
||||
|
@ -167,7 +167,7 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
|
||||
fChanged(false),
|
||||
fStartingText(NULL),
|
||||
fOriginatingWindow(NULL),
|
||||
fReadedButton(NULL),
|
||||
fReadButton(NULL),
|
||||
fNextButton(NULL)
|
||||
{
|
||||
if (messenger != NULL)
|
||||
@ -194,7 +194,7 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
|
||||
fIncoming = false;
|
||||
}
|
||||
|
||||
fAutoMarkReaded = fApp->AutoMarkReaded();
|
||||
fAutoMarkRead = fApp->AutoMarkRead();
|
||||
BRect r(0, 0, RIGHT_BOUNDARY, 15);
|
||||
fMenuBar = new BMenuBar(r, "");
|
||||
|
||||
@ -634,8 +634,8 @@ TMailWindow::BuildButtonBar()
|
||||
new BMessage(M_NEXTMSG));
|
||||
bbar->AddButton(MDR_DIALECT_CHOICE ("Previous","前へ"), 20,
|
||||
new BMessage(M_PREVMSG));
|
||||
if (!fAutoMarkReaded) {
|
||||
_AddReadedButton();
|
||||
if (!fAutoMarkRead) {
|
||||
_AddReadButton();
|
||||
}
|
||||
}
|
||||
bbar->AddButton(MDR_DIALECT_CHOICE ("Inbox","受信箱"), 36,
|
||||
@ -696,7 +696,7 @@ TMailWindow::UpdateViews()
|
||||
void
|
||||
TMailWindow::UpdatePreferences()
|
||||
{
|
||||
fAutoMarkReaded = fApp->AutoMarkReaded();
|
||||
fAutoMarkRead = fApp->AutoMarkRead();
|
||||
|
||||
_UpdateReadButton();
|
||||
}
|
||||
@ -817,17 +817,17 @@ TMailWindow::SetTrackerSelectionToCurrent()
|
||||
|
||||
|
||||
void
|
||||
TMailWindow::SetCurrentMessageRead(bool readed)
|
||||
TMailWindow::SetCurrentMessageRead(bool read)
|
||||
{
|
||||
BNode node(fRef);
|
||||
if (node.InitCheck() == B_NO_ERROR) {
|
||||
BString status;
|
||||
if (ReadAttrString(&node, B_MAIL_ATTR_STATUS, &status) == B_NO_ERROR) {
|
||||
if (readed && !status.ICompare("New")) {
|
||||
if (read && !status.ICompare("New")) {
|
||||
node.RemoveAttr(B_MAIL_ATTR_STATUS);
|
||||
WriteAttrString(&node, B_MAIL_ATTR_STATUS, "Read");
|
||||
}
|
||||
if (!readed && !status.ICompare("Read")) {
|
||||
if (!read && !status.ICompare("Read")) {
|
||||
node.RemoveAttr(B_MAIL_ATTR_STATUS);
|
||||
WriteAttrString(&node, B_MAIL_ATTR_STATUS, "New");
|
||||
}
|
||||
@ -1116,7 +1116,7 @@ TMailWindow::MessageReceived(BMessage *msg)
|
||||
foundRef = GetTrackerWindowFile(&nextRef, msg->what ==
|
||||
M_DELETE_NEXT);
|
||||
}
|
||||
if (fIncoming && fAutoMarkReaded)
|
||||
if (fIncoming && fAutoMarkRead)
|
||||
SetCurrentMessageRead();
|
||||
|
||||
if (!fTrackerMessenger.IsValid() || !fIncoming) {
|
||||
@ -1441,7 +1441,7 @@ TMailWindow::MessageReceived(BMessage *msg)
|
||||
SetCurrentMessageRead(false);
|
||||
_UpdateReadButton();
|
||||
break;
|
||||
case M_READED:
|
||||
case M_READ:
|
||||
SetCurrentMessageRead();
|
||||
msg->what = M_NEXTMSG;
|
||||
case M_PREVMSG:
|
||||
@ -1452,7 +1452,7 @@ TMailWindow::MessageReceived(BMessage *msg)
|
||||
if (GetTrackerWindowFile(&nextRef, (msg->what == M_NEXTMSG))) {
|
||||
TMailWindow *window = static_cast<TMailApp *>(be_app)->FindWindow(nextRef);
|
||||
if (window == NULL) {
|
||||
if (fAutoMarkReaded)
|
||||
if (fAutoMarkRead)
|
||||
SetCurrentMessageRead();
|
||||
OpenMessage(&nextRef, fHeaderView->fCharacterSetUserSees);
|
||||
} else {
|
||||
@ -1707,7 +1707,7 @@ TMailWindow::QuitRequested()
|
||||
}
|
||||
} else if (fRef && !sKeepStatusOnQuit) {
|
||||
// ...Otherwise just set the message read
|
||||
if (fAutoMarkReaded)
|
||||
if (fAutoMarkRead)
|
||||
SetCurrentMessageRead();
|
||||
}
|
||||
|
||||
@ -3133,7 +3133,7 @@ TMailWindow::_BuildQueryString(BEntry* entry) const
|
||||
|
||||
|
||||
void
|
||||
TMailWindow::_AddReadedButton()
|
||||
TMailWindow::_AddReadButton()
|
||||
{
|
||||
bool newMail = false;
|
||||
BNode node(fRef);
|
||||
@ -3147,11 +3147,11 @@ TMailWindow::_AddReadedButton()
|
||||
|
||||
int32 buttonIndex = fButtonBar->IndexOf(fNextButton);
|
||||
if (newMail)
|
||||
fReadedButton = fButtonBar->AddButton(
|
||||
fReadButton = fButtonBar->AddButton(
|
||||
MDR_DIALECT_CHOICE (" Read ", " Read "), 24,
|
||||
new BMessage(M_READED), buttonIndex);
|
||||
new BMessage(M_READ), buttonIndex);
|
||||
else
|
||||
fReadedButton = fButtonBar->AddButton(
|
||||
fReadButton = fButtonBar->AddButton(
|
||||
MDR_DIALECT_CHOICE ("Unread", "Unread"), 28,
|
||||
new BMessage(M_UNREAD), buttonIndex);
|
||||
}
|
||||
@ -3161,10 +3161,10 @@ void
|
||||
TMailWindow::_UpdateReadButton()
|
||||
{
|
||||
if (fApp->ShowButtonBar()) {
|
||||
fButtonBar->RemoveButton(fReadedButton);
|
||||
fReadedButton = NULL;
|
||||
if (!fAutoMarkReaded && !fReadedButton) {
|
||||
_AddReadedButton();
|
||||
fButtonBar->RemoveButton(fReadButton);
|
||||
fReadButton = NULL;
|
||||
if (!fAutoMarkRead && !fReadButton) {
|
||||
_AddReadButton();
|
||||
}
|
||||
}
|
||||
UpdateViews();
|
||||
|
@ -107,7 +107,7 @@ class TMailWindow : public BWindow {
|
||||
void SaveTrackerPosition(entry_ref*);
|
||||
void SetOriginatingWindow(BWindow* window);
|
||||
|
||||
void SetCurrentMessageRead(bool readed = true);
|
||||
void SetCurrentMessageRead(bool read = true);
|
||||
void SetTrackerSelectionToCurrent();
|
||||
TMailWindow* FrontmostWindow();
|
||||
void UpdateViews();
|
||||
@ -126,7 +126,7 @@ class TMailWindow : public BWindow {
|
||||
void _RebuildQueryMenu(bool firstTime = false);
|
||||
char* _BuildQueryString(BEntry* entry) const;
|
||||
|
||||
void _AddReadedButton();
|
||||
void _AddReadButton();
|
||||
void _UpdateReadButton();
|
||||
|
||||
TMailApp* fApp;
|
||||
@ -198,8 +198,8 @@ class TMailWindow : public BWindow {
|
||||
entry_ref fRepliedMail;
|
||||
BMessenger* fOriginatingWindow;
|
||||
|
||||
bool fAutoMarkReaded : 1;
|
||||
BmapButton* fReadedButton;
|
||||
bool fAutoMarkRead : 1;
|
||||
BmapButton* fReadButton;
|
||||
BmapButton* fNextButton;
|
||||
};
|
||||
|
||||
|
@ -113,7 +113,7 @@ enum MENUS {
|
||||
M_COPY,
|
||||
|
||||
// nav
|
||||
M_READED,
|
||||
M_READ,
|
||||
M_UNREAD,
|
||||
M_NEXTMSG,
|
||||
M_PREVMSG,
|
||||
|
@ -100,7 +100,7 @@ enum P_MESSAGES {P_OK = 128, P_CANCEL, P_REVERT, P_FONT,
|
||||
P_SIG, P_ENC, P_WARN_UNENCODABLE,
|
||||
P_SPELL_CHECK_START_ON, P_BUTTON_BAR,
|
||||
P_ACCOUNT, P_REPLYTO, P_REPLY_PREAMBLE,
|
||||
P_COLORED_QUOTES, P_MARK_READED};
|
||||
P_COLORED_QUOTES, P_MARK_READ};
|
||||
|
||||
#define ICON_LABEL_TEXT MDR_DIALECT_CHOICE ("Show Icons & Labels", "アイコンとラベル")
|
||||
#define ICON_TEXT MDR_DIALECT_CHOICE ("Show Icons Only", "アイコンのみ")
|
||||
@ -137,7 +137,7 @@ add_menu_to_layout(BMenuField* menu, BGridLayout* layout, int32& row)
|
||||
TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap,
|
||||
bool* attachAttributes, bool* cquotes, uint32* account, int32* replyTo,
|
||||
char** preamble, char** sig, uint32* encoding, bool* warnUnencodable,
|
||||
bool* spellCheckStartOn, bool* autoMarkReaded, uint8* buttonBar)
|
||||
bool* spellCheckStartOn, bool* autoMarkRead, uint8* buttonBar)
|
||||
:
|
||||
#if USE_LAYOUT_MANAGEMENT
|
||||
BWindow(rect, MDR_DIALECT_CHOICE ("Mail Preferences", "Mailの設定"),
|
||||
@ -183,8 +183,8 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap,
|
||||
fNewSpellCheckStartOn(spellCheckStartOn),
|
||||
fSpellCheckStartOn(*fNewSpellCheckStartOn),
|
||||
|
||||
fNewAutoMarkReaded(autoMarkReaded),
|
||||
fAutoMarkReaded(*fNewAutoMarkReaded)
|
||||
fNewAutoMarkRead(autoMarkRead),
|
||||
fAutoMarkRead(*fNewAutoMarkRead)
|
||||
{
|
||||
strcpy(fSignature, *fNewSignature);
|
||||
|
||||
@ -246,9 +246,9 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap,
|
||||
fSpellCheckStartOnMenu, NULL);
|
||||
add_menu_to_layout(menu, interfaceLayout, layoutRow);
|
||||
|
||||
fAutoMarkReadedMenu = _BuildAutoMarkReadedMenu(fAutoMarkReaded);
|
||||
menu = new BMenuField("autoMarkReaded", AUTO_MARK_READ_TEXT,
|
||||
fAutoMarkReadedMenu, NULL);
|
||||
fAutoMarkReadMenu = _BuildAutoMarkReadMenu(fAutoMarkRead);
|
||||
menu = new BMenuField("autoMarkRead", AUTO_MARK_READ_TEXT,
|
||||
fAutoMarkReadMenu, NULL);
|
||||
add_menu_to_layout(menu, interfaceLayout, layoutRow);
|
||||
// Mail Accounts
|
||||
|
||||
@ -414,9 +414,9 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap,
|
||||
interfaceBox->AddChild(menu);
|
||||
|
||||
r.OffsetBy(0, height + ITEM_SPACE);
|
||||
fAutoMarkReadedMenu = _BuildAutoMarkReadedMenu(fAutoMarkReaded);
|
||||
menu = new BMenuField("autoMarkReaded", AUTO_MARK_READ_TEXT,
|
||||
fAutoMarkReadedMenu, NULL);
|
||||
fAutoMarkReadMenu = _BuildAutoMarkReadMenu(fAutoMarkRead);
|
||||
menu = new BMenuField("autoMarkRead", AUTO_MARK_READ_TEXT,
|
||||
fAutoMarkReadMenu, NULL);
|
||||
menu->SetDivider(labelWidth);
|
||||
menu->SetAlignment(B_ALIGN_RIGHT);
|
||||
interfaceBox->AddChild(menu);
|
||||
@ -593,7 +593,7 @@ TPrefsWindow::MessageReceived(BMessage* msg)
|
||||
*fNewEncoding = fEncoding;
|
||||
*fNewWarnUnencodable = fWarnUnencodable;
|
||||
*fNewSpellCheckStartOn = fSpellCheckStartOn;
|
||||
*fNewAutoMarkReaded = fAutoMarkReaded;
|
||||
*fNewAutoMarkRead = fAutoMarkRead;
|
||||
*fNewButtonBar = fButtonBar;
|
||||
|
||||
be_app->PostMessage(PREFS_CHANGED);
|
||||
@ -734,8 +734,8 @@ TPrefsWindow::MessageReceived(BMessage* msg)
|
||||
case P_SPELL_CHECK_START_ON:
|
||||
msg->FindBool("spellCheckStartOn", fNewSpellCheckStartOn);
|
||||
break;
|
||||
case P_MARK_READED:
|
||||
msg->FindBool("autoMarkReaded", fNewAutoMarkReaded);
|
||||
case P_MARK_READ:
|
||||
msg->FindBool("autoMarkRead", fNewAutoMarkRead);
|
||||
be_app->PostMessage(PREFS_CHANGED);
|
||||
break;
|
||||
case P_BUTTON_BAR:
|
||||
@ -764,7 +764,7 @@ TPrefsWindow::MessageReceived(BMessage* msg)
|
||||
|| fEncoding != *fNewEncoding
|
||||
|| fWarnUnencodable != *fNewWarnUnencodable
|
||||
|| fSpellCheckStartOn != *fNewSpellCheckStartOn
|
||||
|| fAutoMarkReaded != *fNewAutoMarkReaded
|
||||
|| fAutoMarkRead != *fNewAutoMarkRead
|
||||
|| fButtonBar != *fNewButtonBar;
|
||||
fRevert->SetEnabled(changed);
|
||||
}
|
||||
@ -1124,10 +1124,10 @@ TPrefsWindow::_BuildSpellCheckStartOnMenu(bool spellCheckStartOn)
|
||||
|
||||
|
||||
BPopUpMenu*
|
||||
TPrefsWindow::_BuildAutoMarkReadedMenu(bool autoMarkReaded)
|
||||
TPrefsWindow::_BuildAutoMarkReadMenu(bool autoMarkRead)
|
||||
{
|
||||
return _BuildBoolMenu(P_MARK_READED, "autoMarkReaded",
|
||||
autoMarkReaded);
|
||||
return _BuildBoolMenu(P_MARK_READ, "autoMarkRead",
|
||||
autoMarkRead);
|
||||
}
|
||||
|
||||
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
char** preamble, char** sig,
|
||||
uint32* encoding, bool* warnUnencodable,
|
||||
bool* spellCheckStartOn,
|
||||
bool* autoMarkReaded, uint8* buttonBar);
|
||||
bool* autoMarkRead, uint8* buttonBar);
|
||||
virtual ~TPrefsWindow();
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
@ -91,8 +91,8 @@ private:
|
||||
bool warnUnencodable);
|
||||
BPopUpMenu* _BuildSpellCheckStartOnMenu(
|
||||
bool spellCheckStartOn);
|
||||
BPopUpMenu* _BuildAutoMarkReadedMenu(
|
||||
bool autoMarkReaded);
|
||||
BPopUpMenu* _BuildAutoMarkReadMenu(
|
||||
bool autoMarkRead);
|
||||
BPopUpMenu* _BuildButtonBarMenu(uint8 show);
|
||||
|
||||
BPopUpMenu* _BuildBoolMenu(uint32 msg,
|
||||
@ -123,8 +123,8 @@ private:
|
||||
bool fWarnUnencodable;
|
||||
bool* fNewSpellCheckStartOn;
|
||||
bool fSpellCheckStartOn;
|
||||
bool* fNewAutoMarkReaded;
|
||||
bool fAutoMarkReaded;
|
||||
bool* fNewAutoMarkRead;
|
||||
bool fAutoMarkRead;
|
||||
|
||||
BButton* fRevert;
|
||||
|
||||
@ -142,7 +142,7 @@ private:
|
||||
BPopUpMenu* fWarnUnencodableMenu;
|
||||
BPopUpMenu* fSpellCheckStartOnMenu;
|
||||
BPopUpMenu* fButtonBarMenu;
|
||||
BPopUpMenu* fAutoMarkReadedMenu;
|
||||
BPopUpMenu* fAutoMarkReadMenu;
|
||||
};
|
||||
|
||||
#endif /* _PREFS_H */
|
||||
|
Loading…
Reference in New Issue
Block a user