From 98b4079944748769cf65e48d24eece56e8da6d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 16 Oct 2009 09:16:17 +0000 Subject: [PATCH] * When using localtime_r(), you might have to call tzset() yourself (the exact behaviour is not specified in POSIX). This fixes Mail sometimes not having the correct timezone. * Since it's not specified, we might want to do that always on libroot init? We could introduce a syscall that keeps the already parsed data, if there isn't already to make this cheap. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33608 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/mail/MailApp.cpp | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/apps/mail/MailApp.cpp b/src/apps/mail/MailApp.cpp index ed96a9a056..d914a86e85 100644 --- a/src/apps/mail/MailApp.cpp +++ b/src/apps/mail/MailApp.cpp @@ -97,20 +97,9 @@ static const char *kExact = ".exact"; static const char *kMetaphone = ".metaphone"; -// #pragma mark - -int -main() -{ - TMailApp().Run(); - return B_OK; -} - - -// #pragma mark - - - TMailApp::TMailApp() - : BApplication("application/x-vnd.Be-MAIL"), + : + BApplication("application/x-vnd.Be-MAIL"), fWindowCount(0), fPrefsWindow(NULL), fSigWindow(NULL), @@ -137,7 +126,8 @@ TMailApp::TMailApp() fReplyPreamble[0] = '\0'; fMailWindowFrame.Set(0, 0, 0, 0); - fSignatureWindowFrame.Set(6, TITLE_BAR_HEIGHT, 6 + kSigWidth, TITLE_BAR_HEIGHT + kSigHeight); + fSignatureWindowFrame.Set(6, TITLE_BAR_HEIGHT, 6 + kSigWidth, + TITLE_BAR_HEIGHT + kSigHeight); fPrefsWindowPos.Set(6, TITLE_BAR_HEIGHT); // Find and read settings file. @@ -168,7 +158,7 @@ TMailApp::AboutRequested() view->GetFont(&font); font.SetSize(font.Size() + 7.0f); - font.SetFace(B_BOLD_FACE); + font.SetFace(B_BOLD_FACE); view->SetFontAndColor(0, 4, &font); alert->Go(); @@ -459,7 +449,7 @@ TMailApp::QuitRequested() } } - + SaveSettings(); return true; } @@ -1145,7 +1135,7 @@ bool TMailApp::AutoMarkRead() { BAutolock _(this); - return fAutoMarkRead; + return fAutoMarkRead; } @@ -1252,3 +1242,15 @@ TMailApp::ContentFont() return fContentFont; } + +// #pragma mark - + + +int +main() +{ + tzset(); + + TMailApp().Run(); + return B_OK; +}