summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2010-01-10 17:19:24 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-01-10 17:20:33 +0100
commitf5a394a5051384a930d635da22ccafc6beb1cb84 (patch)
treed28fc14408a6bb91170e05880b4d2af6a17fcc14 /src/gui
parent5757066312cab082378dbc5d8df97dea3fe40af0 (diff)
downloadmana-f5a394a5051384a930d635da22ccafc6beb1cb84.tar.gz
mana-f5a394a5051384a930d635da22ccafc6beb1cb84.tar.bz2
mana-f5a394a5051384a930d635da22ccafc6beb1cb84.tar.xz
mana-f5a394a5051384a930d635da22ccafc6beb1cb84.zip
Change code style
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/charcreatedialog.cpp13
-rw-r--r--src/gui/charselectdialog.cpp6
-rw-r--r--src/gui/chat.cpp9
-rw-r--r--src/gui/emotepopup.cpp3
-rw-r--r--src/gui/guildlistbox.cpp3
-rw-r--r--src/gui/guildwindow.cpp4
-rw-r--r--src/gui/inventorywindow.cpp5
-rw-r--r--src/gui/itemamount.cpp2
-rw-r--r--src/gui/itemcontainer.cpp16
-rw-r--r--src/gui/ministatus.cpp6
-rw-r--r--src/gui/outfitwindow.cpp53
-rw-r--r--src/gui/partywindow.cpp3
-rw-r--r--src/gui/playerbox.cpp6
-rw-r--r--src/gui/popupmenu.cpp3
-rw-r--r--src/gui/sell.cpp3
-rw-r--r--src/gui/serverdialog.cpp14
-rw-r--r--src/gui/shop.cpp2
-rw-r--r--src/gui/statuswindow.cpp3
-rw-r--r--src/gui/table.cpp9
-rw-r--r--src/gui/textdialog.cpp3
-rw-r--r--src/gui/trade.cpp13
-rw-r--r--src/gui/viewport.cpp9
-rw-r--r--src/gui/widgets/browserbox.cpp3
-rw-r--r--src/gui/widgets/icon.cpp2
-rw-r--r--src/gui/widgets/slider.cpp3
-rw-r--r--src/gui/widgets/tab.cpp3
-rw-r--r--src/gui/widgets/whispertab.cpp3
27 files changed, 110 insertions, 92 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp
index 86a8bf2b..bd2f095b 100644
--- a/src/gui/charcreatedialog.cpp
+++ b/src/gui/charcreatedialog.cpp
@@ -201,13 +201,18 @@ void CharCreateDialog::action(const gcn::ActionEvent &event)
mHairStyle--;
updateHair();
}
- else if (event.getId() == "statslider") {
+ else if (event.getId() == "statslider")
+ {
updateSliders();
}
- else if (event.getId() == "gender"){
- if (mMale->isSelected()) {
+ else if (event.getId() == "gender")
+ {
+ if (mMale->isSelected())
+ {
mPlayer->setGender(GENDER_MALE);
- } else {
+ }
+ else
+ {
mPlayer->setGender(GENDER_FEMALE);
}
}
diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp
index 8dc292ab..04f2d2b6 100644
--- a/src/gui/charselectdialog.cpp
+++ b/src/gui/charselectdialog.cpp
@@ -142,7 +142,8 @@ CharSelectDialog::CharSelectDialog(LockedArray<LocalPlayer*> *charInfo,
place(0, 0, mAccountNameLabel, 2);
place(0, 1, mSwitchLoginButton);
- if (optionalActions & Net::LoginHandler::Unregister) {
+ if (optionalActions & Net::LoginHandler::Unregister)
+ {
gcn::Button *unregisterButton = new Button(_("Unregister"),
"unregister", this);
place(3, 1, unregisterButton);
@@ -150,7 +151,8 @@ CharSelectDialog::CharSelectDialog(LockedArray<LocalPlayer*> *charInfo,
place(0, 2, mChangePasswordButton);
- if (optionalActions & Net::LoginHandler::ChangeEmail) {
+ if (optionalActions & Net::LoginHandler::ChangeEmail)
+ {
gcn::Button *changeEmailButton = new Button(_("Change Email"),
"change_email", this);
place(3, 2, changeEmailButton);
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index c9defe33..d7b82de1 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -133,9 +133,8 @@ void ChatWindow::logic()
Window::logic();
Tab *tab = getFocused();
- if (tab != mCurrentTab) {
+ if (tab != mCurrentTab)
mCurrentTab = tab;
- }
}
ChatTab *ChatWindow::getFocused() const
@@ -336,7 +335,7 @@ void ChatWindow::mousePressed(gcn::MouseEvent &event)
{
Window::mousePressed(event);
- if(event.isConsumed())
+ if (event.isConsumed())
return;
mMoved = event.getY() <= mCurrentTab->getHeight();
@@ -349,10 +348,10 @@ void ChatWindow::mouseDragged(gcn::MouseEvent &event)
{
Window::mouseDragged(event);
- if(event.isConsumed())
+ if (event.isConsumed())
return;
- if(isMovable() && mMoved)
+ if (isMovable() && mMoved)
{
int newX = std::max(0, getX() + event.getX() - mDragOffsetX);
int newY = std::max(0, getY() + event.getY() - mDragOffsetY);
diff --git a/src/gui/emotepopup.cpp b/src/gui/emotepopup.cpp
index 707f4bfa..ce664cae 100644
--- a/src/gui/emotepopup.cpp
+++ b/src/gui/emotepopup.cpp
@@ -110,7 +110,8 @@ void EmotePopup::mousePressed(gcn::MouseEvent &event)
return;
const int index = getIndexAt(event.getX(), event.getY());
- if (index != -1) {
+ if (index != -1)
+ {
setSelectedEmoteIndex(index);
emoteShortcut->setEmoteSelected(index + 1);
}
diff --git a/src/gui/guildlistbox.cpp b/src/gui/guildlistbox.cpp
index 89d311f1..0081c78c 100644
--- a/src/gui/guildlistbox.cpp
+++ b/src/gui/guildlistbox.cpp
@@ -48,7 +48,8 @@ void GuildListBox::draw(gcn::Graphics *gcnGraphics)
int fontHeight = getFont()->getHeight();
// Draw rectangle below the selected list element
- if (mSelected >= 0) {
+ if (mSelected >= 0)
+ {
graphics->fillRectangle(gcn::Rectangle(0, fontHeight * mSelected,
getWidth(), fontHeight));
}
diff --git a/src/gui/guildwindow.cpp b/src/gui/guildwindow.cpp
index 1868de6a..00f59cb6 100644
--- a/src/gui/guildwindow.cpp
+++ b/src/gui/guildwindow.cpp
@@ -141,7 +141,7 @@ void GuildWindow::action(const gcn::ActionEvent &event)
else if (eventId == "CREATE_GUILD_OK")
{
std::string name = guildDialog->getText();
- if(name.size() > 16)
+ if (name.size() > 16)
{
// TODO : State too many characters in input.
return;
@@ -205,7 +205,7 @@ void GuildWindow::updateTab()
void GuildWindow::setTab(const std::string &guildName)
{
// Only enable invite button if user has rights
- if(player_node->checkInviteRights(guildName))
+ if (player_node->checkInviteRights(guildName))
{
mGuildButton[1]->setEnabled(true);
}
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index e593bc1b..6837aa38 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -295,10 +295,7 @@ void InventoryWindow::updateButtons()
mDropButton->setCaption(_("Drop"));
if (Net::getInventoryHandler()->canSplit(selectedItem))
- {
mSplitButton->setEnabled(true);
- }
- else {
+ else
mSplitButton->setEnabled(false);
- }
}
diff --git a/src/gui/itemamount.cpp b/src/gui/itemamount.cpp
index e0162eda..4bc53892 100644
--- a/src/gui/itemamount.cpp
+++ b/src/gui/itemamount.cpp
@@ -156,7 +156,7 @@ ItemAmountWindow::~ItemAmountWindow()
// Show ItemTooltip
void ItemAmountWindow::mouseMoved(gcn::MouseEvent &event)
{
- if(event.getSource() == mItemIcon)
+ if (event.getSource() == mItemIcon)
{
mItemPopup->setItem(mItem->getInfo());
mItemPopup->view(viewport->getMouseX(), viewport->getMouseY());
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index c8d3ca7d..ff431c31 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -120,12 +120,14 @@ void ItemContainer::draw(gcn::Graphics *graphics)
{
if (itemIndex == mSelectedIndex)
{
- if (mSelectionStatus == SEL_DRAGGING) {
+ if (mSelectionStatus == SEL_DRAGGING)
+ {
// Reposition the coords to that of the cursor.
itemX = mDragPosX - (BOX_WIDTH / 2);
itemY = mDragPosY - (BOX_HEIGHT / 2);
}
- else {
+ else
+ {
// Draw selection border image.
g->drawImage(mSelImg, itemX, itemY);
}
@@ -395,12 +397,10 @@ void ItemContainer::moveHighlight(Direction direction)
{
if (mHighlightedIndex == -1)
{
- if (mSelectedIndex != -1) {
+ if (mSelectedIndex != -1)
mHighlightedIndex = mSelectedIndex;
- }
- else {
+ else
mHighlightedIndex = 0;
- }
return;
}
@@ -408,9 +408,7 @@ void ItemContainer::moveHighlight(Direction direction)
{
case Left:
if (mHighlightedIndex % mGridColumns == 0)
- {
mHighlightedIndex += mGridColumns;
- }
mHighlightedIndex--;
break;
case Right:
@@ -423,9 +421,7 @@ void ItemContainer::moveHighlight(Direction direction)
break;
case Up:
if (mHighlightedIndex / mGridColumns == 0)
- {
mHighlightedIndex += (mGridColumns * mGridRows);
- }
mHighlightedIndex -= mGridColumns;
break;
case Down:
diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp
index 51dbdebc..7083147a 100644
--- a/src/gui/ministatus.cpp
+++ b/src/gui/ministatus.cpp
@@ -82,8 +82,10 @@ void MiniStatusWindow::drawIcons(Graphics *graphics)
{
// Draw icons
int icon_x = mXpBar->getX() + mXpBar->getWidth() + 4;
- for (unsigned int i = 0; i < mIcons.size(); i++) {
- if (mIcons[i]) {
+ for (unsigned int i = 0; i < mIcons.size(); i++)
+ {
+ if (mIcons[i])
+ {
mIcons[i]->draw(graphics, icon_x, 3);
icon_x += 2 + mIcons[i]->getWidth();
}
diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp
index 6cb23286..ba060504 100644
--- a/src/gui/outfitwindow.cpp
+++ b/src/gui/outfitwindow.cpp
@@ -102,9 +102,8 @@ void OutfitWindow::load()
std::vector<int> tokens;
- while (ss >> buf) {
+ while (ss >> buf)
tokens.push_back(atoi(buf.c_str()));
- }
for (int i = 0; i < (int)tokens.size(); i++)
{
@@ -134,19 +133,21 @@ void OutfitWindow::action(const gcn::ActionEvent &event)
{
if (event.getId() == "next")
{
- if (mCurrentOutfit < (OUTFITS_COUNT - 1)) {
+ if (mCurrentOutfit < (OUTFITS_COUNT - 1))
mCurrentOutfit++;
- } else {
+ else
mCurrentOutfit = 0;
- }
mCurrentLabel->setCaption(strprintf(_("Outfit: %d"), mCurrentOutfit + 1));
mUnequipCheck->setSelected(mItemsUnequip[mCurrentOutfit]);
}
else if (event.getId() == "previous")
{
- if (mCurrentOutfit > 0) {
+ if (mCurrentOutfit > 0)
+ {
mCurrentOutfit--;
- } else {
+ }
+ else
+ {
mCurrentOutfit = OUTFITS_COUNT - 1;
}
mCurrentLabel->setCaption(strprintf(_("Outfit: %d"), mCurrentOutfit + 1));
@@ -166,9 +167,8 @@ void OutfitWindow::wearOutfit(int outfit)
item = player_node->getInventory()->findItem(mItems[outfit][i]);
if (item && !item->isEquipped() && item->getQuantity())
{
- if (item->isEquipment()) {
+ if (item->isEquipment())
Net::getInventoryHandler()->equipItem(item);
- }
}
}
@@ -236,12 +236,13 @@ void OutfitWindow::draw(gcn::Graphics *graphics)
void OutfitWindow::mouseDragged(gcn::MouseEvent &event)
{
Window::mouseDragged(event);
- if (event.getButton() == gcn::MouseEvent::LEFT) {
- if (!mItemMoved && mItemClicked) {
+ if (event.getButton() == gcn::MouseEvent::LEFT)
+ {
+ if (!mItemMoved && mItemClicked)
+ {
const int index = getIndexFromGrid(event.getX(), event.getY());
- if (index == -1) {
+ if (index == -1)
return;
- }
const int itemId = mItems[mCurrentOutfit][index];
if (itemId < 0)
return;
@@ -252,7 +253,8 @@ void OutfitWindow::mouseDragged(gcn::MouseEvent &event)
mItems[mCurrentOutfit][index] = -1;
}
}
- if (mItemMoved) {
+ if (mItemMoved)
+ {
mCursorPosX = event.getX();
mCursorPosY = event.getY();
}
@@ -263,16 +265,17 @@ void OutfitWindow::mousePressed(gcn::MouseEvent &event)
{
Window::mousePressed(event);
const int index = getIndexFromGrid(event.getX(), event.getY());
- if (index == -1) {
+ if (index == -1)
return;
- }
// Stores the selected item if there is one.
- if (isItemSelected()) {
+ if (isItemSelected())
+ {
mItems[mCurrentOutfit][index] = mItemSelected;
mItemSelected = -1;
}
- else if (mItems[mCurrentOutfit][index]) {
+ else if (mItems[mCurrentOutfit][index])
+ {
mItemClicked = true;
}
}
@@ -287,17 +290,18 @@ void OutfitWindow::mouseReleased(gcn::MouseEvent &event)
mItemSelected = -1;
}
const int index = getIndexFromGrid(event.getX(), event.getY());
- if (index == -1) {
+ if (index == -1)
+ {
mItemMoved = NULL;
return;
}
- if (mItemMoved) {
+ if (mItemMoved)
+ {
mItems[mCurrentOutfit][index] = mItemMoved->getId();
mItemMoved = NULL;
}
- if (mItemClicked) {
+ if (mItemClicked)
mItemClicked = false;
- }
}
}
@@ -305,15 +309,12 @@ int OutfitWindow::getIndexFromGrid(int pointX, int pointY) const
{
const gcn::Rectangle tRect = gcn::Rectangle(
10, 25, 10 + mGridWidth * mBoxWidth, 25 + mGridHeight * mBoxHeight);
- if (!tRect.isPointInRect(pointX, pointY)) {
+ if (!tRect.isPointInRect(pointX, pointY))
return -1;
- }
const int index = (((pointY - 25) / mBoxHeight) * mGridWidth) +
(pointX - 10) / mBoxWidth;
if (index >= OUTFIT_ITEM_COUNT)
- {
return -1;
- }
return index;
}
diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp
index 67f1d4c0..da8189d6 100644
--- a/src/gui/partywindow.cpp
+++ b/src/gui/partywindow.cpp
@@ -46,7 +46,8 @@ PartyMember::~PartyMember()
void PartyMember::setLeader(bool leader)
{
- if (mLeader != leader) {
+ if (mLeader != leader)
+ {
mLeader = leader;
mAvatar->setDisplayBold(leader);
}
diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp
index 70af6690..c1d6f5e5 100644
--- a/src/gui/playerbox.cpp
+++ b/src/gui/playerbox.cpp
@@ -49,8 +49,10 @@ PlayerBox::PlayerBox(const Player *player):
int bggridy[4] = {0, 3, 28, 31};
int a = 0, x, y;
- for (y = 0; y < 3; y++) {
- for (x = 0; x < 3; x++) {
+ for (y = 0; y < 3; y++)
+ {
+ for (x = 0; x < 3; x++)
+ {
background.grid[a] = textbox->getSubImage(
bggridx[x], bggridy[y],
bggridx[x + 1] - bggridx[x] + 1,
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 3450f4a5..ffb7c028 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -94,7 +94,8 @@ void PopupMenu::showPopup(int x, int y, Being *being)
mBrowserBox->addRow("##3---");
- switch (player_relations.getRelation(name)) {
+ switch (player_relations.getRelation(name))
+ {
case PlayerRelation::NEUTRAL:
mBrowserBox->addRow(strprintf("@@friend|%s@@",
strprintf(_("Befriend %s"),
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index d434408b..92ad1dbd 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -188,7 +188,8 @@ void SellDialog::action(const gcn::ActionEvent &event)
mPlayerMoney +=
mAmountItems * mShopItems->at(selectedItem)->getPrice();
mMaxItems -= mAmountItems;
- while (mAmountItems > 0) {
+ while (mAmountItems > 0)
+ {
// This order is important, item->getCurrentInvIndex() would return
// the inventory index of the next Duplicate otherwise.
itemIndex = item->getCurrentInvIndex();
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index bbbf132d..9dbc1025 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -159,14 +159,16 @@ ServerDialog::ServerDialog(ServerInfo *serverInfo, const std::string &dir):
setFieldsReadOnly(true);
setVisible(true);
- if (mServerNameField->getText().empty()) {
+ if (mServerNameField->getText().empty())
+ {
mServerNameField->requestFocus();
- } else {
- if (mPortField->getText().empty()) {
+ }
+ else
+ {
+ if (mPortField->getText().empty())
mPortField->requestFocus();
- } else {
+ else
mConnectButton->requestFocus();
- }
}
downloadServerList();
@@ -175,9 +177,7 @@ ServerDialog::ServerDialog(ServerInfo *serverInfo, const std::string &dir):
ServerDialog::~ServerDialog()
{
if (mDownload)
- {
mDownload->cancel();
- }
delete mServersListModel;
}
diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp
index b72be694..513e50cc 100644
--- a/src/gui/shop.cpp
+++ b/src/gui/shop.cpp
@@ -90,7 +90,7 @@ ShopItem *ShopItems::findItem(int id)
ShopItem *item;
std::vector<ShopItem*>::iterator it;
- for(it = mShopItems.begin(); it != mShopItems.end(); it++)
+ for (it = mShopItems.begin(); it != mShopItems.end(); it++)
{
item = *(it);
if (item->getId() == id)
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index 4db8c751..cda83e82 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -543,7 +543,8 @@ void ChangeDisplay::action(const gcn::ActionEvent &event)
int newmod = player_node->getAttributeEffective(mId) - 1;
player_node->setAttributeEffective(mId, newmod);
Net::getPlayerHandler()->decreaseAttribute(mId);
- } else if (event.getSource() == mInc)
+ }
+ else if (event.getSource() == mInc)
{
int newpoints = player_node->getCharacterPoints() - 1;
player_node->setCharacterPoints(newpoints);
diff --git a/src/gui/table.cpp b/src/gui/table.cpp
index 995c393c..e2808992 100644
--- a/src/gui/table.cpp
+++ b/src/gui/table.cpp
@@ -533,9 +533,12 @@ void GuiTable::_setFocusHandler(gcn::FocusHandler* focusHandler)
{
gcn::Widget::_setFocusHandler(focusHandler);
- if (mModel) {
- for (int r = 0; r < mModel->getRows(); ++r) {
- for (int c = 0; c < mModel->getColumns(); ++c) {
+ if (mModel)
+ {
+ for (int r = 0; r < mModel->getRows(); ++r)
+ {
+ for (int c = 0; c < mModel->getColumns(); ++c)
+ {
gcn::Widget *w = mModel->getElementAt(r, c);
if (w)
w->_setFocusHandler(focusHandler);
diff --git a/src/gui/textdialog.cpp b/src/gui/textdialog.cpp
index 8430e974..326954e2 100644
--- a/src/gui/textdialog.cpp
+++ b/src/gui/textdialog.cpp
@@ -57,7 +57,8 @@ TextDialog::TextDialog(const std::string &title, const std::string &msg,
add(mOkButton);
add(cancelButton);
- if (getParent()) {
+ if (getParent())
+ {
setLocationRelativeTo(getParent());
getParent()->moveToTop(this);
}
diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp
index 5a659da9..b942b565 100644
--- a/src/gui/trade.cpp
+++ b/src/gui/trade.cpp
@@ -256,9 +256,9 @@ void TradeWindow::action(const gcn::ActionEvent &event)
if (event.getId() == "add")
{
- if(mStatus != PREPARING)
+ if (mStatus != PREPARING)
return;
-
+
if (!inventoryWindow->isVisible())
{
inventoryWindow->setVisible(true);
@@ -309,14 +309,15 @@ void TradeWindow::action(const gcn::ActionEvent &event)
}
else if (event.getId() == "money")
{
- if(mStatus != PREPARING)
+ if (mStatus != PREPARING)
return;
-
+
int v = atoi(mMoneyField->getText().c_str());
int curMoney = player_node->getMoney();
- if(v > curMoney)
+ if (v > curMoney)
{
- localChatTab->chatLog(_("You don't have enough money."), BY_SERVER);
+ localChatTab->chatLog(_("You don't have enough money."),
+ BY_SERVER);
v = curMoney;
}
Net::getTradeHandler()->setMoney(v);
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index dc4b9721..e8a0e260 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -192,7 +192,8 @@ void Viewport::draw(gcn::Graphics *gcnGraphics)
{
mMap->draw(graphics, (int) mPixelViewX, (int) mPixelViewY);
- if (mShowDebugPath) {
+ if (mShowDebugPath)
+ {
mMap->drawCollision(graphics,
(int) mPixelViewX,
(int) mPixelViewY,
@@ -376,7 +377,8 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
break;
}
// Picks up a item if we clicked on one
- } else if ((item = floorItemManager->findByCoordinates(tilex, tiley)))
+ }
+ else if ((item = floorItemManager->findByCoordinates(tilex, tiley)))
{
player_node->pickUp(item);
}
@@ -452,9 +454,8 @@ void Viewport::optionChanged(const std::string &name)
mScrollLaziness = (int) config.getValue("ScrollLaziness", 32);
mScrollRadius = (int) config.getValue("ScrollRadius", 32);
- if (name == "visiblenames") {
+ if (name == "visiblenames")
mVisibleNames = config.getValue("visiblenames", 1);
- }
}
void Viewport::mouseMoved(gcn::MouseEvent &event)
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 91098074..d189947d 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -233,9 +233,8 @@ void BrowserBox::mousePressed(gcn::MouseEvent &event)
LinkIterator i = find_if(mLinks.begin(), mLinks.end(),
MouseOverLink(event.getX(), event.getY()));
- if (i != mLinks.end()) {
+ if (i != mLinks.end())
mLinkHandler->handleLink(i->link);
- }
}
void BrowserBox::mouseMoved(gcn::MouseEvent &event)
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index 0e29f603..21a33e10 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -48,7 +48,7 @@ void Icon::setImage(Image *image)
void Icon::draw(gcn::Graphics *g)
{
- if(mImage)
+ if (mImage)
{
Graphics *graphics = static_cast<Graphics*>(g);
const int x = (getWidth() - mImage->getWidth()) / 2;
diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp
index 1e9fe4f5..66fe780d 100644
--- a/src/gui/widgets/slider.cpp
+++ b/src/gui/widgets/slider.cpp
@@ -175,7 +175,8 @@ void Slider::draw(gcn::Graphics *graphics)
x += w;
static_cast<Graphics*>(graphics)->drawImage(hEnd, x, y);
- } else
+ }
+ else
{
static_cast<Graphics*>(graphics)->drawImage(hStartHi, x, y);
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp
index 99a95d96..a49c4f12 100644
--- a/src/gui/widgets/tab.cpp
+++ b/src/gui/widgets/tab.cpp
@@ -150,7 +150,8 @@ void Tab::draw(gcn::Graphics *graphics)
mode = TAB_SELECTED;
// if tab is selected, it doesnt need to highlight activity
mHighlighted = false;
- } else if (mHasMouse)
+ }
+ else if (mHasMouse)
{
mode = TAB_HIGHLIGHTED;
}
diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp
index 537aa2cc..51ae6e8f 100644
--- a/src/gui/widgets/whispertab.cpp
+++ b/src/gui/widgets/whispertab.cpp
@@ -46,7 +46,8 @@ WhisperTab::~WhisperTab()
void WhisperTab::handleInput(const std::string &msg)
{
- if (msg.empty()) {
+ if (msg.empty())
+ {
chatLog(_("Cannot send empty chat!"), BY_SERVER, false);
return;
}