From 13310304eaa4e168bd02ec9726a88d504bc394a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sat, 8 Sep 2007 15:15:32 +0000 Subject: [PATCH] * fixed Mail startup, it would not open a window because of an uninitialized variable (#1459) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22200 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/mail/MailApp.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/apps/mail/MailApp.cpp b/src/apps/mail/MailApp.cpp index 8138c6e117..332be7574e 100644 --- a/src/apps/mail/MailApp.cpp +++ b/src/apps/mail/MailApp.cpp @@ -116,6 +116,7 @@ TMailApp::TMailApp() fSigWindow(NULL), fPrintSettings(NULL), + fPrintHelpAndExit(false), fWrapMode(true), fShowHeader(false), @@ -504,11 +505,10 @@ TMailApp::ReadyToRun() dataPath.Append("words"); // Only Load if Words Dictionary - if (BEntry(kWordsPath).Exists() || BEntry(dataPath.Path()).Exists()) - { - // If "/boot/optional/goodies/words" exists but there is no system dictionary, copy words - if (!BEntry(dataPath.Path()).Exists() && BEntry(kWordsPath).Exists()) - { + if (BEntry(kWordsPath).Exists() || BEntry(dataPath.Path()).Exists()) { + // If "/boot/optional/goodies/words" exists but there is no + // system dictionary, copy words + if (!BEntry(dataPath.Path()).Exists() && BEntry(kWordsPath).Exists()) { BFile words(kWordsPath, B_READ_ONLY); BFile copy(dataPath.Path(), B_WRITE_ONLY | B_CREATE_FILE); char buffer[4096]; @@ -522,8 +522,7 @@ TMailApp::ReadyToRun() // Create user dictionary if it does not exist dataPath = dictionaryDir; dataPath.Append("user"); - if (!BEntry(dataPath.Path()).Exists()) - { + if (!BEntry(dataPath.Path()).Exists()) { BFile user(dataPath.Path(), B_WRITE_ONLY | B_CREATE_FILE); BNodeInfo(&user).SetType("text/plain"); } @@ -535,13 +534,11 @@ TMailApp::ReadyToRun() gUserDict = -1; while (gDictCount < MAX_DICTIONARIES - && directory.GetNextEntry(&entry) != B_ENTRY_NOT_FOUND) - { + && directory.GetNextEntry(&entry) != B_ENTRY_NOT_FOUND) { dataPath.SetTo(&entry); // Identify the user dictionary - if (strcmp("user", dataPath.Leaf()) == 0) - { + if (strcmp("user", dataPath.Leaf()) == 0) { gUserDictFile = new BFile(dataPath.Path(), B_WRITE_ONLY | B_OPEN_AT_END); gUserDict = gDictCount; } @@ -563,8 +560,7 @@ TMailApp::ReadyToRun() // Create a new window if starting up without any extra arguments. - if (!fPrintHelpAndExit && !fWindowCount) - { + if (!fPrintHelpAndExit && !fWindowCount) { TMailWindow *window; window = NewWindow(); window->Show();