From 37d898f0b69707e1f7ac28d2b7da6ba25d919318 Mon Sep 17 00:00:00 2001 From: Clemens Zeidler Date: Wed, 9 Feb 2011 19:18:13 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20coding=20style.=20Thanks=20J=C3=A9r=C3=B4?= =?UTF-8?q?me!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40406 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../imap/IMAPFolderConfig.cpp | 31 +++++++++---------- .../imap/IMAPInboundProtocol.cpp | 20 ++++++------ 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPFolderConfig.cpp b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPFolderConfig.cpp index aaadeecc8a..d50bf147b2 100644 --- a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPFolderConfig.cpp +++ b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPFolderConfig.cpp @@ -79,7 +79,7 @@ CheckBoxItem::DrawItem(BView* owner, BRect itemRect, bool drawEverything) return; rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR); - uint32 flags = 0; + uint32 flags = 0; if (fMouseDown) flags |= BControlLook::B_CLICKED; if (fChecked) @@ -162,10 +162,10 @@ EditListView::MouseDown(BPoint where) int32 index = IndexOf(where); BListItem* item = ItemAt(index); - if (!item) + if (item == NULL) return; EditableListItem* handler = dynamic_cast(item); - if (!handler) + if (handler == NULL) return; fLastMouseDown = handler; @@ -185,10 +185,10 @@ EditListView::MouseUp(BPoint where) int32 index = IndexOf(where); BListItem* item = ItemAt(index); - if (!item) + if (item == NULL) return; EditableListItem* handler = dynamic_cast(item); - if (!handler) + if (handler == NULL) return; handler->MouseUp(where); @@ -276,17 +276,17 @@ void FolderConfigWindow::MessageReceived(BMessage* message) { switch (message->what) { - case kMsgInit: - _LoadFolders(); - break; + case kMsgInit: + _LoadFolders(); + break; - case kMsgApplyButton: - _ApplyChanges(); - PostMessage(B_QUIT_REQUESTED); - break; + case kMsgApplyButton: + _ApplyChanges(); + PostMessage(B_QUIT_REQUESTED); + break; - default: - BWindow::MessageReceived(message); + default: + BWindow::MessageReceived(message); } } @@ -335,8 +335,7 @@ FolderConfigWindow::_ApplyChanges() for (unsigned int i = 0; i < fFolderList.size(); i++) { FolderInfo& info = fFolderList[i]; CheckBoxItem* item = (CheckBoxItem*)fFolderListView->ItemAt(i); - if ((info.subscribed && !item->Checked()) - || (!info.subscribed && item->Checked())) { + if ((info.subscribed != item->Checked())) { haveChanges = true; break; } diff --git a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPInboundProtocol.cpp b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPInboundProtocol.cpp index a75d6b09fa..a9e9cf42d8 100644 --- a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPInboundProtocol.cpp +++ b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPInboundProtocol.cpp @@ -84,18 +84,18 @@ IMAPMailboxThread::MessageReceived(BMessage* message) status_t status = B_ERROR; switch (message->what) { - case kMsgStartWatching: - status = fIMAPMailbox.StartWatchingMailbox(); - if (status != B_OK) - fProtocol.Disconnect(); + case kMsgStartWatching: + status = fIMAPMailbox.StartWatchingMailbox(); + if (status != B_OK) + fProtocol.Disconnect(); - fLock.Lock(); - fIsWatching = false; - fLock.Unlock(); - break; + fLock.Lock(); + fIsWatching = false; + fLock.Unlock(); + break; - default: - BLooper::MessageReceived(message); + default: + BLooper::MessageReceived(message); } }