diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-18 12:18:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-18 14:52:11 +0300 |
commit | bb9ed14fc1bf7dc20f1e951e67bb359c273033a3 (patch) | |
tree | c46e7e5708d3a2058233a41a08995e6c861703ea /src/gui/windows | |
parent | 10273bc94e90fefcfe3fc215aaaaafe7e0e96bd4 (diff) | |
download | plus-bb9ed14fc1bf7dc20f1e951e67bb359c273033a3.tar.gz plus-bb9ed14fc1bf7dc20f1e951e67bb359c273033a3.tar.bz2 plus-bb9ed14fc1bf7dc20f1e951e67bb359c273033a3.tar.xz plus-bb9ed14fc1bf7dc20f1e951e67bb359c273033a3.zip |
fix code style.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/botcheckerwindow.cpp | 3 | ||||
-rw-r--r-- | src/gui/windows/buydialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/charcreatedialog.cpp | 13 | ||||
-rw-r--r-- | src/gui/windows/charcreatedialog.h | 2 | ||||
-rw-r--r-- | src/gui/windows/chardeleteconfirm.h | 5 | ||||
-rw-r--r-- | src/gui/windows/charselectdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/debugwindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/itemamountwindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/logindialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/registerdialog.cpp | 6 | ||||
-rw-r--r-- | src/gui/windows/shopwindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/socialwindow.cpp | 7 | ||||
-rw-r--r-- | src/gui/windows/whoisonline.cpp | 14 |
13 files changed, 23 insertions, 36 deletions
diff --git a/src/gui/windows/botcheckerwindow.cpp b/src/gui/windows/botcheckerwindow.cpp index aa991b36b..8e4bdd047 100644 --- a/src/gui/windows/botcheckerwindow.cpp +++ b/src/gui/windows/botcheckerwindow.cpp @@ -29,12 +29,9 @@ #include "gui/models/userstablemodel.h" -#include "actormanager.h" #include "client.h" #include "configuration.h" -#include "being/localplayer.h" - #include "utils/gettext.h" #include "debug.h" diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp index f0daaeef2..6799bcaf8 100644 --- a/src/gui/windows/buydialog.cpp +++ b/src/gui/windows/buydialog.cpp @@ -159,7 +159,7 @@ namespace return type1 < type2; } } itemTypeBuySorter; -} +} // namespace BuyDialog::DialogList BuyDialog::instances; diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index 203ab01d2..cc254bce0 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -148,7 +148,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, setSticky(true); setWindowName("NewCharacter"); - mPlayer->setGender(GENDER_MALE); + mPlayer->setGender(Gender::MALE); const std::vector<int> &items = CharDB::getDefaultItems(); int i = 1; for (std::vector<int>::const_iterator it = items.begin(), @@ -410,9 +410,9 @@ void CharCreateDialog::action(const ActionEvent &event) else if (id == "gender") { if (mMale->isSelected()) - mPlayer->setGender(GENDER_MALE); + mPlayer->setGender(Gender::MALE); else - mPlayer->setGender(GENDER_FEMALE); + mPlayer->setGender(Gender::FEMALE); } else if (id == "action") { @@ -537,15 +537,16 @@ void CharCreateDialog::setAttributes(const StringVect &labels, setButtonsPosition(w, h); } -void CharCreateDialog::setFixedGender(const bool fixed, const Gender gender) +void CharCreateDialog::setFixedGender(const bool fixed, + const Gender::Type gender) { - if (gender == GENDER_FEMALE) + if (gender == Gender::FEMALE) { mFemale->setSelected(true); mMale->setSelected(false); mOther->setSelected(false); } - else if (gender == GENDER_MALE) + else if (gender == Gender::MALE) { mFemale->setSelected(false); mMale->setSelected(true); diff --git a/src/gui/windows/charcreatedialog.h b/src/gui/windows/charcreatedialog.h index e0a188303..58395e21e 100644 --- a/src/gui/windows/charcreatedialog.h +++ b/src/gui/windows/charcreatedialog.h @@ -73,7 +73,7 @@ class CharCreateDialog final : public Window, const int min, const int max); void setFixedGender(const bool fixed, - const Gender gender = GENDER_FEMALE); + const Gender::Type gender = Gender::FEMALE); void logic() override final; diff --git a/src/gui/windows/chardeleteconfirm.h b/src/gui/windows/chardeleteconfirm.h index 4ab990eae..06840ceda 100644 --- a/src/gui/windows/chardeleteconfirm.h +++ b/src/gui/windows/chardeleteconfirm.h @@ -20,6 +20,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#ifndef GUI_WINDOWS_CHARDELETECONFIRM_H +#define GUI_WINDOWS_CHARDELETECONFIRM_H + #include "gui/windows/charselectdialog.h" #include "gui/windows/confirmdialog.h" @@ -58,3 +61,5 @@ class CharDeleteConfirm final : public ConfirmDialog CharSelectDialog *mMaster; int mIndex; }; + +#endif // GUI_WINDOWS_CHARDELETECONFIRM_H diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp index 66460f4e7..74a135bab 100644 --- a/src/gui/windows/charselectdialog.cpp +++ b/src/gui/windows/charselectdialog.cpp @@ -48,8 +48,6 @@ #include "net/loginhandler.h" #include "net/net.h" -#include "utils/gettext.h" - #include "debug.h" // Character slots per row in the dialog diff --git a/src/gui/windows/debugwindow.cpp b/src/gui/windows/debugwindow.cpp index 8dc915604..bcf51d023 100644 --- a/src/gui/windows/debugwindow.cpp +++ b/src/gui/windows/debugwindow.cpp @@ -147,4 +147,3 @@ void DebugWindow::logicChildren() BLOCK_END("DebugWindow::logicChildren") } #endif - diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index c2b00e87e..4d49eedd9 100644 --- a/src/gui/windows/itemamountwindow.cpp +++ b/src/gui/windows/itemamountwindow.cpp @@ -49,7 +49,6 @@ #include "gui/widgets/slider.h" #include "utils/delete2.h" -#include "utils/gettext.h" #include <cmath> diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp index 01d1bcd61..99354f4fb 100644 --- a/src/gui/windows/logindialog.cpp +++ b/src/gui/windows/logindialog.cpp @@ -44,11 +44,9 @@ #include "gui/widgets/layoutcell.h" #include "net/charserverhandler.h" -#include "net/logindata.h" #include "net/loginhandler.h" #include "net/net.h" -#include "utils/gettext.h" #include "utils/paths.h" #include "debug.h" diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp index 2ecf5fc87..61b7e0dac 100644 --- a/src/gui/windows/registerdialog.cpp +++ b/src/gui/windows/registerdialog.cpp @@ -253,11 +253,11 @@ void RegisterDialog::action(const ActionEvent &event) mLoginData->username = mUserField->getText(); mLoginData->password = mPasswordField->getText(); if (mFemaleButton && mFemaleButton->isSelected()) - mLoginData->gender = GENDER_FEMALE; + mLoginData->gender = Gender::FEMALE; else if (mOtherButton && mOtherButton->isSelected()) - mLoginData->gender = GENDER_OTHER; + mLoginData->gender = Gender::OTHER; else - mLoginData->gender = GENDER_MALE; + mLoginData->gender = Gender::MALE; if (mEmailField) mLoginData->email = mEmailField->getText(); diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp index 04e2f1511..903a21a57 100644 --- a/src/gui/windows/shopwindow.cpp +++ b/src/gui/windows/shopwindow.cpp @@ -49,7 +49,6 @@ #include "inventory.h" #include "item.h" #include "shopitem.h" -#include "soundconsts.h" #include "soundmanager.h" #include "being/attributes.h" diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp index 2a858d964..7b0aa849a 100644 --- a/src/gui/windows/socialwindow.cpp +++ b/src/gui/windows/socialwindow.cpp @@ -50,13 +50,6 @@ #include "gui/popups/createpartypopup.h" -#include "net/net.h" -#include "net/guildhandler.h" -#include "net/partyhandler.h" - -#include "utils/delete2.h" -#include "utils/gettext.h" - #include "debug.h" extern unsigned int tmwServerVersion; diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp index 7ae87c470..797ba68fe 100644 --- a/src/gui/windows/whoisonline.cpp +++ b/src/gui/windows/whoisonline.cpp @@ -22,6 +22,9 @@ #include "gui/windows/whoisonline.h" +#include "actormanager.h" +#include "client.h" +#include "configuration.h" #include "guild.h" #include "party.h" @@ -35,11 +38,6 @@ #include "gui/widgets/browserbox.h" #include "gui/widgets/scrollarea.h" -#include "actormanager.h" -#include "client.h" -#include "configuration.h" -#include "main.h" - #include "being/beingflag.h" #include "being/localplayer.h" #include "being/playerrelations.h" @@ -440,7 +438,7 @@ void WhoIsOnline::loadWebList() OnlinePlayer *const player = new OnlinePlayer(nick, static_cast<unsigned char>(255), level, - GENDER_UNSPECIFIED, -1); + Gender::UNSPECIFIED, -1); mOnlinePlayers.insert(player); mOnlineNicks.insert(nick); @@ -829,9 +827,9 @@ void OnlinePlayer::setText(std::string color) if (mLevel > 0) mText.append(strprintf("%d", mLevel)); - if (mGender == GENDER_FEMALE) + if (mGender == Gender::FEMALE) mText.append("\u2640"); - else if (mGender == GENDER_MALE) + else if (mGender == Gender::MALE) mText.append("\u2642"); if (mStatus > 0 && mStatus != 255) |