diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-20 17:42:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-20 18:56:15 +0300 |
commit | d9994f114b1febf4c075d77c0fb3e7a44e510e20 (patch) | |
tree | 00eeae0b23ab620363dedcce448af25325b1381f | |
parent | d65f51b41a9d84c501bb25bc3849ffd8446fb2e6 (diff) | |
download | ManaVerse-d9994f114b1febf4c075d77c0fb3e7a44e510e20.tar.gz ManaVerse-d9994f114b1febf4c075d77c0fb3e7a44e510e20.tar.bz2 ManaVerse-d9994f114b1febf4c075d77c0fb3e7a44e510e20.tar.xz ManaVerse-d9994f114b1febf4c075d77c0fb3e7a44e510e20.zip |
Fix code style and some minor issues.
100 files changed, 54 insertions, 217 deletions
diff --git a/src/client.cpp b/src/client.cpp index c4284a195..7168f0cec 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1011,12 +1011,12 @@ int Client::gameExec() mPerfomanceButton->setPosition(x, 3); top->add(mPerfomanceButton); - mVideoButton = new Button(mDesktop,_("Video"), "Video", this); + mVideoButton = new Button(mDesktop, _("Video"), "Video", this); x -= mVideoButton->getWidth() + 6; mVideoButton->setPosition(x, 3); top->add(mVideoButton); - mThemesButton = new Button(mDesktop,_("Themes"), "Themes", this); + mThemesButton = new Button(mDesktop, _("Themes"), "Themes", this); x -= mThemesButton->getWidth() + 6; mThemesButton->setPosition(x, 3); top->add(mThemesButton); diff --git a/src/gui/beingpopup.cpp b/src/gui/beingpopup.cpp index 5ab7a8c89..aca7afe0b 100644 --- a/src/gui/beingpopup.cpp +++ b/src/gui/beingpopup.cpp @@ -22,14 +22,11 @@ #include "gui/beingpopup.h" #include "being.h" -#include "graphics.h" #include "playerrelations.h" #include "units.h" #include "gui/gui.h" -#include "gui/palette.h" #include "gui/sdlfont.h" -#include "gui/theme.h" #include "gui/widgets/label.h" diff --git a/src/gui/buydialog.cpp b/src/gui/buydialog.cpp index ed152cc82..e6894bb65 100644 --- a/src/gui/buydialog.cpp +++ b/src/gui/buydialog.cpp @@ -22,7 +22,6 @@ #include "gui/buydialog.h" -#include "logger.h" #include "shopitem.h" #include "units.h" @@ -86,9 +85,11 @@ void BuyDialog::init() mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); mSlider = new Slider(1.0); - mQuantityLabel = new Label(this, strprintf("%d / %d", mAmountItems, mMaxItems)); + mQuantityLabel = new Label(this, strprintf( + "%d / %d", mAmountItems, mMaxItems)); mQuantityLabel->setAlignment(gcn::Graphics::CENTER); - mMoneyLabel = new Label(this, strprintf(_("Price: %s / Total: %s"), "", "")); + mMoneyLabel = new Label(this, strprintf( + _("Price: %s / Total: %s"), "", "")); mAmountField = new IntTextField(this, 1, 1, 123); mAmountField->setActionEventId("amount"); diff --git a/src/gui/changeemaildialog.cpp b/src/gui/changeemaildialog.cpp index bbd2aa6c3..df1c0051a 100644 --- a/src/gui/changeemaildialog.cpp +++ b/src/gui/changeemaildialog.cpp @@ -23,7 +23,6 @@ #include "gui/changeemaildialog.h" #include "client.h" -#include "logger.h" #include "gui/registerdialog.h" #include "gui/okdialog.h" diff --git a/src/gui/changepassworddialog.cpp b/src/gui/changepassworddialog.cpp index 7da2bdf8d..768c48966 100644 --- a/src/gui/changepassworddialog.cpp +++ b/src/gui/changepassworddialog.cpp @@ -23,7 +23,6 @@ #include "gui/changepassworddialog.h" #include "client.h" -#include "logger.h" #include "gui/registerdialog.h" #include "gui/okdialog.h" diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp index 2959b27fd..47f6be680 100644 --- a/src/gui/chatwindow.cpp +++ b/src/gui/chatwindow.cpp @@ -40,7 +40,6 @@ #include "gui/setup.h" #include "gui/sdlfont.h" #include "gui/sdlinput.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "gui/widgets/battletab.h" diff --git a/src/gui/connectiondialog.cpp b/src/gui/connectiondialog.cpp index 00c5a58f2..770507c38 100644 --- a/src/gui/connectiondialog.cpp +++ b/src/gui/connectiondialog.cpp @@ -22,8 +22,6 @@ #include "gui/connectiondialog.h" -#include "logger.h" - #include "gui/widgets/button.h" #include "gui/widgets/label.h" #include "gui/widgets/layout.h" diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp index c78d3e12d..08ea48dd3 100644 --- a/src/gui/debugwindow.cpp +++ b/src/gui/debugwindow.cpp @@ -139,7 +139,8 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) : mMusicFileLabel(new Label(this, strprintf(_("Music:")))), mMapLabel(new Label(this, strprintf(_("Map:")))), mMinimapLabel(new Label(this, strprintf(_("Minimap:")))), - mTileMouseLabel(new Label(this, strprintf("%s (%d, %d)", _("Cursor:"), 0, 0))), + mTileMouseLabel(new Label(this, strprintf("%s (%d, %d)", + _("Cursor:"), 0, 0))), mParticleCountLabel(new Label(this, strprintf("%s %d", _("Particle count:"), 88888))), mMapActorCountLabel(new Label(this, strprintf("%s %d", @@ -182,7 +183,8 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) : place(0, 8, mMapActorCountLabel, 2); #ifdef USE_OPENGL #ifdef DEBUG_OPENGL_LEAKS - mTexturesLabel = new Label(this, strprintf("%s %s", _("Textures count:"), "?")); + mTexturesLabel = new Label(this, strprintf("%s %s", + _("Textures count:"), "?")); place(0, 9, mTexturesLabel, 2); #endif #endif diff --git a/src/gui/didyouknowwindow.cpp b/src/gui/didyouknowwindow.cpp index 1ca184b78..485cf1be7 100644 --- a/src/gui/didyouknowwindow.cpp +++ b/src/gui/didyouknowwindow.cpp @@ -23,7 +23,6 @@ #include "gui/didyouknowwindow.h" #include "configuration.h" -#include "logger.h" #include "gui/gui.h" #include "gui/sdlfont.h" diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp index 415117b23..17c243734 100644 --- a/src/gui/equipmentwindow.cpp +++ b/src/gui/equipmentwindow.cpp @@ -28,7 +28,6 @@ #include "localplayer.h" #include "gui/itempopup.h" -#include "gui/theme.h" #include "gui/setup.h" #include "gui/viewport.h" diff --git a/src/gui/helpwindow.cpp b/src/gui/helpwindow.cpp index 9e9958220..9555871bb 100644 --- a/src/gui/helpwindow.cpp +++ b/src/gui/helpwindow.cpp @@ -23,7 +23,6 @@ #include "gui/helpwindow.h" #include "configuration.h" -#include "logger.h" #include "gui/gui.h" #include "gui/sdlfont.h" diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index 19aa95e58..3bc8c4222 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -34,7 +34,6 @@ #include "gui/outfitwindow.h" #include "gui/setup.h" #include "gui/shopwindow.h" -#include "gui/theme.h" #include "gui/tradewindow.h" #include "gui/viewport.h" diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp index bf861f9d5..ba78adcfd 100644 --- a/src/gui/itempopup.cpp +++ b/src/gui/itempopup.cpp @@ -24,13 +24,11 @@ #include "gui/itempopup.h" #include "client.h" -#include "graphics.h" #include "item.h" #include "units.h" #include "gui/gui.h" #include "gui/sdlfont.h" -#include "gui/theme.h" #include "gui/widgets/icon.h" #include "gui/widgets/label.h" diff --git a/src/gui/killstats.cpp b/src/gui/killstats.cpp index 47409fe03..b591e6c51 100644 --- a/src/gui/killstats.cpp +++ b/src/gui/killstats.cpp @@ -48,22 +48,26 @@ KillStats::KillStats(): mKillTimer(0), mResetButton(new Button(this, _("Reset stats"), "reset", this)), mTimerButton(new Button(this, _("Reset timer"), "timer", this)), - mLine4(new Label(this, strprintf(_("Kills: %s, total exp: %s"), "?", "?"))), + mLine4(new Label(this, strprintf(_("Kills: %s, total exp: %s"), + "?", "?"))), mLine5(new Label(this, strprintf(_("Avg Exp: %s"), "?"))), - mLine6(new Label(this, strprintf(_("No. of avg mob to next level: %s"), "?"))), - mLine7(new Label(this, strprintf(_("Kills/Min: %s, Exp/Min: %s"), "?", "?"))), - mExpSpeed1Label(new Label(this, strprintf(ngettext("Exp speed per %d min: %s", - "Exp speed per %d min: %s", 1), 1, "?"))), + mLine6(new Label(this, strprintf(_("No. of avg mob to next level: %s"), + "?"))), + mLine7(new Label(this, strprintf(_("Kills/Min: %s, Exp/Min: %s"), + "?", "?"))), + mExpSpeed1Label(new Label(this, strprintf(ngettext( + "Exp speed per %d min: %s", "Exp speed per %d min: %s", 1), 1, "?"))), mExpTime1Label(new Label(this, strprintf(ngettext( "Time for next level per %d min: %s", "Time for next level per %d min: %s", 1), 1, "?"))), - mExpSpeed5Label(new Label(this, strprintf(ngettext("Exp speed per %d min: %s", - "Exp speed per %d min: %s", 5), 5, "?"))), + mExpSpeed5Label(new Label(this, strprintf(ngettext( + "Exp speed per %d min: %s", "Exp speed per %d min: %s", 5), 5, "?"))), mExpTime5Label(new Label(this, strprintf(ngettext( "Time for next level per %d min: %s", "Time for next level per %d min: %s", 5), 5, "?"))), - mExpSpeed15Label(new Label(this, strprintf(ngettext("Exp speed per %d min: %s", - "Exp speed per %d min: %s", 15), 15, "?"))), + mExpSpeed15Label(new Label(this, strprintf(ngettext( + "Exp speed per %d min: %s", "Exp speed per %d min: %s", 15), + 15, "?"))), mExpTime15Label(new Label(this, strprintf(ngettext( "Time for next level per %d min: %s", "Time for next level per %d min: %s", 15), 15, "?"))), diff --git a/src/gui/ministatuswindow.cpp b/src/gui/ministatuswindow.cpp index 99bbcaa1c..eb0471aeb 100644 --- a/src/gui/ministatuswindow.cpp +++ b/src/gui/ministatuswindow.cpp @@ -23,7 +23,6 @@ #include "gui/ministatuswindow.h" #include "animatedsprite.h" -#include "graphics.h" #include "localplayer.h" #include "playerinfo.h" @@ -32,7 +31,6 @@ #include "gui/statuswindow.h" #include "gui/statuspopup.h" #include "gui/textpopup.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "gui/widgets/chattab.h" diff --git a/src/gui/okdialog.cpp b/src/gui/okdialog.cpp index 1eda1d8c9..0a0c32baa 100644 --- a/src/gui/okdialog.cpp +++ b/src/gui/okdialog.cpp @@ -49,9 +49,6 @@ OkDialog::OkDialog(const std::string &title, const std::string &msg, Button *const okButton = new Button(this, _("OK"), "ok", this); - const int numRows = mTextBox->getNumberOfRows(); - const int fontHeight = getFont()->getHeight(); - const int height = numRows * fontHeight; int width = getFont()->getWidth(title); if (width < mTextBox->getMinWidth()) diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp index 2c1800c82..b5e5757ca 100644 --- a/src/gui/outfitwindow.cpp +++ b/src/gui/outfitwindow.cpp @@ -35,7 +35,6 @@ #include "gui/chatwindow.h" #include "gui/inventorywindow.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "gui/widgets/button.h" diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 49790982e..50b2f5639 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -27,7 +27,6 @@ #include "game.h" #include "guild.h" #include "guildmanager.h" -#include "graphics.h" #include "item.h" #include "itemshortcut.h" #include "localplayer.h" diff --git a/src/gui/questswindow.cpp b/src/gui/questswindow.cpp index 3844001a3..914dab466 100644 --- a/src/gui/questswindow.cpp +++ b/src/gui/questswindow.cpp @@ -21,12 +21,10 @@ #include "gui/questswindow.h" #include "configuration.h" -#include "logger.h" #include "sound.h" #include "gui/gui.h" #include "gui/sdlfont.h" -#include "gui/theme.h" #include "gui/widgets/browserbox.h" #include "gui/widgets/button.h" diff --git a/src/gui/registerdialog.cpp b/src/gui/registerdialog.cpp index 4f865daad..2c9ed0740 100644 --- a/src/gui/registerdialog.cpp +++ b/src/gui/registerdialog.cpp @@ -24,7 +24,6 @@ #include "client.h" #include "configuration.h" -#include "logger.h" #include "gui/logindialog.h" #include "gui/okdialog.h" diff --git a/src/gui/selldialog.cpp b/src/gui/selldialog.cpp index 3e8c89d86..0c38d48cc 100644 --- a/src/gui/selldialog.cpp +++ b/src/gui/selldialog.cpp @@ -86,7 +86,8 @@ void SellDialog::init() mSlider = new Slider(1.0); - mQuantityLabel = new Label(this, strprintf("%d / %d", mAmountItems, mMaxItems)); + mQuantityLabel = new Label(this, strprintf( + "%d / %d", mAmountItems, mMaxItems)); mQuantityLabel->setAlignment(gcn::Graphics::CENTER); mMoneyLabel = new Label(this, strprintf(_("Price: %s / Total: %s"), "", "")); diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp index b3fb9df5c..306c0534f 100644 --- a/src/gui/serverdialog.cpp +++ b/src/gui/serverdialog.cpp @@ -35,7 +35,6 @@ #include "gui/okdialog.h" #include "gui/sdlfont.h" #include "gui/sdlinput.h" -#include "gui/theme.h" #include "gui/widgets/button.h" #include "gui/widgets/dropdown.h" diff --git a/src/gui/setup_audio.cpp b/src/gui/setup_audio.cpp index ed2a57397..9ee897cd4 100644 --- a/src/gui/setup_audio.cpp +++ b/src/gui/setup_audio.cpp @@ -27,7 +27,6 @@ #include "configuration.h" #include "sound.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "gui/widgets/layouthelper.h" diff --git a/src/gui/setup_colors.cpp b/src/gui/setup_colors.cpp index 34a46eb16..cf6452b5e 100644 --- a/src/gui/setup_colors.cpp +++ b/src/gui/setup_colors.cpp @@ -25,7 +25,6 @@ #include "gui/gui.h" #include "gui/sdlfont.h" -#include "gui/theme.h" #include "gui/userpalette.h" #include "gui/widgets/browserbox.h" diff --git a/src/gui/setup_input.cpp b/src/gui/setup_input.cpp index 26ff60c1a..3b3abe6c7 100644 --- a/src/gui/setup_input.cpp +++ b/src/gui/setup_input.cpp @@ -26,7 +26,6 @@ #include "configuration.h" #include "inputmanager.h" #include "keyboardconfig.h" -#include "logger.h" #include "gui/okdialog.h" #include "gui/setupactiondata.h" diff --git a/src/gui/setup_joystick.cpp b/src/gui/setup_joystick.cpp index 1c38008a5..073667d57 100644 --- a/src/gui/setup_joystick.cpp +++ b/src/gui/setup_joystick.cpp @@ -24,7 +24,6 @@ #include "configuration.h" #include "joystick.h" -#include "logger.h" #include "gui/widgets/button.h" #include "gui/widgets/checkbox.h" diff --git a/src/gui/setup_other.cpp b/src/gui/setup_other.cpp index 45927bd7d..ff0e584fc 100644 --- a/src/gui/setup_other.cpp +++ b/src/gui/setup_other.cpp @@ -26,7 +26,6 @@ #include "gui/widgets/scrollarea.h" #include "configuration.h" -#include "logger.h" #include "utils/gettext.h" diff --git a/src/gui/setup_relations.cpp b/src/gui/setup_relations.cpp index 2e1ba95bb..ffdec3e4b 100644 --- a/src/gui/setup_relations.cpp +++ b/src/gui/setup_relations.cpp @@ -262,7 +262,10 @@ Setup_Relations::Setup_Relations(const Widget2 *const widget) : mIgnoreActionChoicesBox = new DropDown(widget, mIgnoreActionChoicesModel); for (int i = 0; i < COLUMNS_NR; i++) - mPlayerTableTitleModel->set(0, i, new Label(this, gettext(table_titles[i]))); + { + mPlayerTableTitleModel->set(0, i, new Label( + this, gettext(table_titles[i]))); + } mPlayerTitleTable->setLinewiseSelection(true); diff --git a/src/gui/setup_theme.cpp b/src/gui/setup_theme.cpp index c3b38dd23..531616e8b 100644 --- a/src/gui/setup_theme.cpp +++ b/src/gui/setup_theme.cpp @@ -25,7 +25,6 @@ #include "gui/gui.h" #include "gui/editdialog.h" #include "gui/okdialog.h" -#include "gui/theme.h" #include "gui/widgets/button.h" #include "gui/widgets/checkbox.h" diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index 2c33ba91e..f722dbae8 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -25,7 +25,6 @@ #include "client.h" #include "configuration.h" #include "game.h" -#include "graphics.h" #include "graphicsmanager.h" @@ -234,9 +233,10 @@ Setup_Video::Setup_Video(const Widget2 *const widget) : mFsCheckBox(new CheckBox(this, _("Full screen"), mFullScreenEnabled)), mCustomCursorCheckBox(new CheckBox(this, _("Custom cursor"), mCustomCursorEnabled)), - mEnableResizeCheckBox(new CheckBox(this,_("Enable resize"), mEnableResize)), - mNoFrameCheckBox(new CheckBox(this,_("No frame"), mNoFrame)), - mFpsCheckBox(new CheckBox(this,_("FPS limit:"))), + mEnableResizeCheckBox(new CheckBox(this, _("Enable resize"), + mEnableResize)), + mNoFrameCheckBox(new CheckBox(this, _("No frame"), mNoFrame)), + mFpsCheckBox(new CheckBox(this, _("FPS limit:"))), mFpsSlider(new Slider(2, 160)), mFpsLabel(new Label(this)), mAltFpsSlider(new Slider(2, 160)), diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp index 87d2e8f25..acc3f3948 100644 --- a/src/gui/shopwindow.cpp +++ b/src/gui/shopwindow.cpp @@ -92,10 +92,11 @@ ShopWindow::ShopWindow(): mBuyAuctionButton(nullptr), mSellAddButton(new Button(this, _("Add"), "add sell", this)), mSellDeleteButton(new Button(this, _("Delete"), "delete sell", this)), - mSellAnnounceButton(new Button(this, _("Announce"), "announce sell", this)), + mSellAnnounceButton(new Button(this, _("Announce"), + "announce sell", this)), mSellAuctionButton(nullptr), mAnnounceLinks(new CheckBox(this, _("Show links in announce"), false, - this, "link announce")), + this, "link announce")), mSelectedItem(-1), mAnnonceTime(0), mLastRequestTimeList(0), diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp index 3003392ca..e4e946931 100644 --- a/src/gui/shortcutwindow.cpp +++ b/src/gui/shortcutwindow.cpp @@ -23,10 +23,8 @@ #include "gui/shortcutwindow.h" #include "configuration.h" -#include "logger.h" #include "gui/setup.h" -#include "gui/theme.h" #include "gui/widgets/layout.h" #include "gui/widgets/scrollarea.h" diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp index 9cc365c4b..d7b3153dd 100644 --- a/src/gui/skilldialog.cpp +++ b/src/gui/skilldialog.cpp @@ -30,7 +30,6 @@ #include "gui/setup.h" #include "gui/shortcutwindow.h" #include "gui/textpopup.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "gui/widgets/label.h" diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index 29520b5f7..0fc926009 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -37,7 +37,6 @@ #include "gui/outfitwindow.h" #include "gui/setup.h" #include "gui/textdialog.h" -#include "gui/theme.h" #include "gui/widgets/browserbox.h" #include "gui/widgets/chattab.h" diff --git a/src/gui/specialswindow.cpp b/src/gui/specialswindow.cpp index 1aaeba685..7e6477938 100644 --- a/src/gui/specialswindow.cpp +++ b/src/gui/specialswindow.cpp @@ -21,10 +21,7 @@ #include "gui/specialswindow.h" -#include "logger.h" - #include "gui/setup.h" -#include "gui/theme.h" #include "gui/widgets/container.h" #include "gui/widgets/icon.h" diff --git a/src/gui/spellpopup.cpp b/src/gui/spellpopup.cpp index f9ba2c9e7..e3fddc18a 100644 --- a/src/gui/spellpopup.cpp +++ b/src/gui/spellpopup.cpp @@ -24,9 +24,7 @@ #include "gui/spellpopup.h" #include "gui/gui.h" -#include "gui/palette.h" #include "gui/sdlfont.h" -#include "gui/theme.h" #include "gui/widgets/label.h" diff --git a/src/gui/statuspopup.cpp b/src/gui/statuspopup.cpp index a0cd790c1..c99ab9964 100644 --- a/src/gui/statuspopup.cpp +++ b/src/gui/statuspopup.cpp @@ -24,8 +24,6 @@ #include "gui/statuspopup.h" #include "gui/gui.h" -#include "gui/palette.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "gui/widgets/label.h" diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp index 1fb6d7836..691333703 100644 --- a/src/gui/statuswindow.cpp +++ b/src/gui/statuswindow.cpp @@ -33,7 +33,6 @@ #include "gui/equipmentwindow.h" #include "gui/setup.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "gui/widgets/label.h" @@ -142,7 +141,7 @@ StatusWindow::StatusWindow() : mJobLvlLabel(nullptr), mJobLabel(nullptr), mJobBar(nullptr), - mAttrCont(new VertContainer(this,32)), + mAttrCont(new VertContainer(this, 32)), mAttrScroll(new ScrollArea(mAttrCont, false)), mDAttrCont(new VertContainer(this, 32)), mDAttrScroll(new ScrollArea(mDAttrCont, false)), @@ -786,10 +785,9 @@ std::string AttrDisplay::update() } DerDisplay::DerDisplay(const Widget2 *const widget, - const int id, const std::string &name) : + const int id, const std::string &name) : AttrDisplay(widget, id, name) { -// LayoutHelper h(this); ContainerPlacer place = mLayout->getPlacer(0, 0); place(0, 0, mLabel, 3); diff --git a/src/gui/textpopup.cpp b/src/gui/textpopup.cpp index 876c85b78..b1c2676a1 100644 --- a/src/gui/textpopup.cpp +++ b/src/gui/textpopup.cpp @@ -24,8 +24,6 @@ #include "gui/textpopup.h" #include "gui/gui.h" -#include "gui/palette.h" -#include "gui/theme.h" #include "gui/widgets/label.h" #include "gui/widgets/layouthelper.h" diff --git a/src/gui/theme.h b/src/gui/theme.h index e26fee332..42f3495c8 100644 --- a/src/gui/theme.h +++ b/src/gui/theme.h @@ -293,7 +293,7 @@ class Theme final : public Palette, public ConfigListener { return mInstance->getColor(type, alpha); } static const gcn::Color &getThemeCharColor(const signed char c, - bool &valid) + bool &valid) { return mInstance->getCharColor(c, valid); } static int getThemeIdByChar(const signed char c, bool &valid) diff --git a/src/gui/tradewindow.cpp b/src/gui/tradewindow.cpp index 46a9179b5..4adb718c4 100644 --- a/src/gui/tradewindow.cpp +++ b/src/gui/tradewindow.cpp @@ -35,7 +35,6 @@ #include "gui/itemamountwindow.h" #include "gui/sdlfont.h" #include "gui/setup.h" -#include "gui/theme.h" #include "gui/widgets/chattab.h" #include "gui/widgets/itemcontainer.h" diff --git a/src/gui/unregisterdialog.cpp b/src/gui/unregisterdialog.cpp index 69c06da09..cec2a8561 100644 --- a/src/gui/unregisterdialog.cpp +++ b/src/gui/unregisterdialog.cpp @@ -23,7 +23,6 @@ #include "gui/unregisterdialog.h" #include "client.h" -#include "logger.h" #include "gui/okdialog.h" #include "gui/registerdialog.h" diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 7c423d1f0..42e6473ee 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -26,7 +26,6 @@ #include "client.h" #include "configuration.h" #include "game.h" -#include "graphics.h" #include "itemshortcut.h" #include "inputmanager.h" #include "keyboardconfig.h" diff --git a/src/gui/whoisonline.h b/src/gui/whoisonline.h index 677f6a156..2b26ad393 100644 --- a/src/gui/whoisonline.h +++ b/src/gui/whoisonline.h @@ -28,8 +28,6 @@ #include "gui/widgets/linkhandler.h" #include "gui/widgets/window.h" -#include "utils/stringvector.h" - #include "utils/mutex.h" #include <set> diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp index 5dd7277df..1f5556a5d 100644 --- a/src/gui/widgets/avatarlistbox.cpp +++ b/src/gui/widgets/avatarlistbox.cpp @@ -23,7 +23,6 @@ #include "actorspritemanager.h" #include "configuration.h" -#include "graphics.h" #include "guild.h" #include "localplayer.h" #include "maplayer.h" @@ -31,7 +30,6 @@ #include "gui/chatwindow.h" #include "gui/gui.h" #include "gui/sdlfont.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "resources/image.h" diff --git a/src/gui/widgets/battletab.cpp b/src/gui/widgets/battletab.cpp index 2e060dca1..f448dd057 100644 --- a/src/gui/widgets/battletab.cpp +++ b/src/gui/widgets/battletab.cpp @@ -27,8 +27,6 @@ #include "localplayer.h" #include "main.h" -#include "gui/theme.h" - #include "net/net.h" #include "resources/iteminfo.h" diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index 23fe456ed..4d0e5e32c 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -24,13 +24,9 @@ #include "gui/widgets/browserbox.h" #include "client.h" -#include "graphics.h" -#include "logger.h" #include "gui/gui.h" -#include "gui/palette.h" #include "gui/sdlfont.h" -#include "gui/theme.h" #include "gui/widgets/linkhandler.h" diff --git a/src/gui/widgets/browserbox_unittest.cc b/src/gui/widgets/browserbox_unittest.cc index 88e8143c3..358f816c7 100644 --- a/src/gui/widgets/browserbox_unittest.cc +++ b/src/gui/widgets/browserbox_unittest.cc @@ -39,7 +39,7 @@ TEST(browserbox, test1) PHYSFS_init("manaplus"); logger = new Logger(); Theme *theme = Theme::instance(); - BrowserBox *box = new BrowserBox(BrowserBox::AUTO_WRAP); + BrowserBox *box = new BrowserBox(nullptr, BrowserBox::AUTO_WRAP); box->setWidth(100); std::string row = "test"; box->addRow(row); diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index f157f1096..31bde646f 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -24,14 +24,9 @@ #include "client.h" #include "configuration.h" -#include "graphics.h" #include "graphicsvertexes.h" #include "keydata.h" #include "keyevent.h" -#include "logger.h" - -#include "gui/palette.h" -#include "gui/theme.h" #include "resources/imageset.h" diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp index 7377a5325..0c2b7ca14 100644 --- a/src/gui/widgets/checkbox.cpp +++ b/src/gui/widgets/checkbox.cpp @@ -24,13 +24,9 @@ #include "client.h" #include "configuration.h" -#include "graphics.h" #include "keydata.h" #include "keyevent.h" -#include "gui/palette.h" -#include "gui/theme.h" - #include "resources/image.h" #include <guichan/actionlistener.hpp> diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp index 65c7eda77..0a6657d3e 100644 --- a/src/gui/widgets/desktop.cpp +++ b/src/gui/widgets/desktop.cpp @@ -22,13 +22,8 @@ #include "gui/widgets/desktop.h" #include "configuration.h" -#include "graphics.h" -#include "logger.h" #include "main.h" -#include "gui/palette.h" -#include "gui/theme.h" - #include "gui/widgets/label.h" #include "resources/image.h" diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index 5c4c02259..a896b4698 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -24,13 +24,10 @@ #include "client.h" #include "configuration.h" -#include "graphics.h" #include "keydata.h" #include "keyevent.h" -#include "gui/palette.h" #include "gui/sdlinput.h" -#include "gui/theme.h" #include "gui/widgets/listbox.h" #include "gui/widgets/scrollarea.h" diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp index 732b94454..95a09533e 100644 --- a/src/gui/widgets/dropshortcutcontainer.cpp +++ b/src/gui/widgets/dropshortcutcontainer.cpp @@ -24,8 +24,6 @@ #include "gui/inventorywindow.h" #include "gui/itempopup.h" -#include "gui/palette.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "client.h" diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp index 87719b775..79abadf9c 100644 --- a/src/gui/widgets/emoteshortcutcontainer.cpp +++ b/src/gui/widgets/emoteshortcutcontainer.cpp @@ -25,7 +25,6 @@ #include "client.h" #include "configuration.h" #include "emoteshortcut.h" -#include "graphics.h" #include "inputmanager.h" #include "inventory.h" #include "item.h" @@ -34,7 +33,6 @@ #include "localplayer.h" #include "gui/textpopup.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "resources/image.h" diff --git a/src/gui/widgets/extendedlistbox.cpp b/src/gui/widgets/extendedlistbox.cpp index 1091c957f..f1b41c03f 100644 --- a/src/gui/widgets/extendedlistbox.cpp +++ b/src/gui/widgets/extendedlistbox.cpp @@ -24,9 +24,7 @@ #include "configuration.h" #include "keyevent.h" -#include "gui/palette.h" #include "gui/sdlinput.h" -#include "gui/theme.h" #include "gui/widgets/extendedlistmodel.h" diff --git a/src/gui/widgets/extendednamesmodel.cpp b/src/gui/widgets/extendednamesmodel.cpp index 0a01df626..60a814de7 100644 --- a/src/gui/widgets/extendednamesmodel.cpp +++ b/src/gui/widgets/extendednamesmodel.cpp @@ -20,8 +20,6 @@ #include "gui/widgets/extendednamesmodel.h" -#include "logger.h" - #include "utils/gettext.h" #include <guichan/font.hpp> diff --git a/src/gui/widgets/guildchattab.cpp b/src/gui/widgets/guildchattab.cpp index 1b80801cb..7b1ca5bd3 100644 --- a/src/gui/widgets/guildchattab.cpp +++ b/src/gui/widgets/guildchattab.cpp @@ -29,8 +29,6 @@ #include "localplayer.h" #include "sound.h" -#include "gui/theme.h" - #include "resources/iteminfo.h" #include "resources/itemdb.h" diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp index d661e23df..4e966599e 100644 --- a/src/gui/widgets/guitable.cpp +++ b/src/gui/widgets/guitable.cpp @@ -27,7 +27,6 @@ #include "keyevent.h" #include "gui/sdlinput.h" -#include "gui/theme.h" #include "utils/dtor.h" diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp index 9781e978f..e152d3c4b 100644 --- a/src/gui/widgets/icon.cpp +++ b/src/gui/widgets/icon.cpp @@ -22,8 +22,6 @@ #include "gui/widgets/icon.h" -#include "graphics.h" - #include "resources/image.h" #include "resources/resourcemanager.h" diff --git a/src/gui/widgets/inttextfield.cpp b/src/gui/widgets/inttextfield.cpp index eb04a65aa..e1b8df730 100644 --- a/src/gui/widgets/inttextfield.cpp +++ b/src/gui/widgets/inttextfield.cpp @@ -27,7 +27,7 @@ #include "gui/sdlinput.h" -#include "utils/stringutils.h" +//#include "utils/stringutils.h" #include "debug.h" diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 159a06d19..7e71287fe 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -22,7 +22,6 @@ #include "gui/widgets/itemcontainer.h" -#include "graphics.h" #include "inventory.h" #include "item.h" #include "itemshortcut.h" @@ -32,11 +31,9 @@ #include "gui/gui.h" #include "gui/itempopup.h" #include "gui/outfitwindow.h" -#include "gui/palette.h" #include "gui/shopwindow.h" #include "gui/shortcutwindow.h" #include "gui/sdlinput.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "net/net.h" diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp index 041a9e8dc..ccc8cb4c3 100644 --- a/src/gui/widgets/itemshortcutcontainer.cpp +++ b/src/gui/widgets/itemshortcutcontainer.cpp @@ -24,7 +24,6 @@ #include "client.h" #include "configuration.h" -#include "graphics.h" #include "inventory.h" #include "inputmanager.h" #include "item.h" @@ -38,7 +37,6 @@ #include "gui/itempopup.h" #include "gui/skilldialog.h" #include "gui/spellpopup.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "resources/image.h" diff --git a/src/gui/widgets/label.cpp b/src/gui/widgets/label.cpp index e7481e992..0286caa7f 100644 --- a/src/gui/widgets/label.cpp +++ b/src/gui/widgets/label.cpp @@ -21,8 +21,6 @@ #include "gui/widgets/label.h" -#include "gui/theme.h" - #include <guichan/font.hpp> #include "debug.h" diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp index a323d154c..b90522229 100644 --- a/src/gui/widgets/listbox.cpp +++ b/src/gui/widgets/listbox.cpp @@ -27,9 +27,7 @@ #include "keyevent.h" #include "gui/gui.h" -#include "gui/palette.h" #include "gui/sdlinput.h" -#include "gui/theme.h" #include <guichan/focushandler.hpp> #include <guichan/font.hpp> diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp index 697174fa2..4511a8544 100644 --- a/src/gui/widgets/playerbox.cpp +++ b/src/gui/widgets/playerbox.cpp @@ -27,8 +27,6 @@ #include "client.h" #include "configuration.h" -#include "gui/theme.h" - #include "resources/image.h" #include "utils/dtor.h" diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h index bc93b2e3f..90ef929af 100644 --- a/src/gui/widgets/playerbox.h +++ b/src/gui/widgets/playerbox.h @@ -27,8 +27,6 @@ #include <guichan/widgets/scrollarea.hpp> -#include "graphics.h" - #include "localconsts.h" class Being; diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp index 9763541a5..b870d2eb1 100644 --- a/src/gui/widgets/popup.cpp +++ b/src/gui/widgets/popup.cpp @@ -23,11 +23,8 @@ #include "gui/widgets/popup.h" -#include "graphics.h" #include "graphicsvertexes.h" -#include "logger.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "gui/widgets/window.h" diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index 75aa3063c..590447b89 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -24,7 +24,6 @@ #include "client.h" #include "configuration.h" -#include "graphics.h" #include "graphicsvertexes.h" #include "textrenderer.h" diff --git a/src/gui/widgets/progressindicator.cpp b/src/gui/widgets/progressindicator.cpp index 8ddd755ff..936e357ab 100644 --- a/src/gui/widgets/progressindicator.cpp +++ b/src/gui/widgets/progressindicator.cpp @@ -21,11 +21,8 @@ #include "gui/widgets/progressindicator.h" -#include "graphics.h" #include "simpleanimation.h" -#include "gui/theme.h" - #include "resources/animation.h" #include "resources/imageset.h" #include "resources/resourcemanager.h" diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp index 062c426d3..98e1182e1 100644 --- a/src/gui/widgets/radiobutton.cpp +++ b/src/gui/widgets/radiobutton.cpp @@ -24,12 +24,9 @@ #include "client.h" #include "configuration.h" -#include "graphics.h" #include "keydata.h" #include "keyevent.h" -#include "gui/theme.h" - #include "resources/image.h" #include <guichan/font.hpp> diff --git a/src/gui/widgets/radiogroup.cpp b/src/gui/widgets/radiogroup.cpp index 3d20b7248..f0009a202 100644 --- a/src/gui/widgets/radiogroup.cpp +++ b/src/gui/widgets/radiogroup.cpp @@ -22,8 +22,6 @@ #include "gui/widgets/radiobutton.h" -#include "logger.h" - #include "debug.h" RadioGroup::RadioGroup(const Widget2 *const widget, diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index d7042579f..0b7b73e6e 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -24,11 +24,7 @@ #include "client.h" #include "configuration.h" -#include "graphics.h" #include "graphicsvertexes.h" -#include "logger.h" - -#include "gui/theme.h" #include "utils/dtor.h" diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp index 27ec95b7a..437290bbf 100644 --- a/src/gui/widgets/setupitem.cpp +++ b/src/gui/widgets/setupitem.cpp @@ -22,7 +22,6 @@ #include "configuration.h" #include "main.h" -#include "logger.h" #include "sound.h" #include "gui/editdialog.h" diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp index 13a2eb822..b9d7e18f4 100644 --- a/src/gui/widgets/shoplistbox.cpp +++ b/src/gui/widgets/shoplistbox.cpp @@ -24,11 +24,9 @@ #include "client.h" #include "configuration.h" -#include "graphics.h" #include "shopitem.h" #include "gui/itempopup.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "gui/widgets/shopitems.h" diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h index ac80bf1b1..f4851cf63 100644 --- a/src/gui/widgets/shortcutcontainer.h +++ b/src/gui/widgets/shortcutcontainer.h @@ -24,7 +24,6 @@ #define SHORTCUTCONTAINER_H #include "gui/widgets/tab.h" -#include "gui/widgets/widget2.h" #include <guichan/mouselistener.hpp> #include <guichan/widget.hpp> diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp index 380ece104..4ba57b257 100644 --- a/src/gui/widgets/slider.cpp +++ b/src/gui/widgets/slider.cpp @@ -24,11 +24,8 @@ #include "client.h" #include "configuration.h" -#include "graphics.h" #include "keyevent.h" -#include "gui/theme.h" - #include "resources/image.h" #include "debug.h" diff --git a/src/gui/widgets/sliderlist.cpp b/src/gui/widgets/sliderlist.cpp index 0df055d7f..c108930d1 100644 --- a/src/gui/widgets/sliderlist.cpp +++ b/src/gui/widgets/sliderlist.cpp @@ -21,7 +21,6 @@ #include "gui/widgets/sliderlist.h" #include "client.h" -#include "logger.h" #include "gui/gui.h" #include "gui/sdlfont.h" diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp index 061e12b73..cfc3863eb 100644 --- a/src/gui/widgets/spellshortcutcontainer.cpp +++ b/src/gui/widgets/spellshortcutcontainer.cpp @@ -24,12 +24,10 @@ #include "gui/inventorywindow.h" #include "gui/okdialog.h" -#include "gui/palette.h" #include "gui/shortcutwindow.h" #include "gui/spellpopup.h" #include "gui/viewport.h" #include "gui/textcommandeditor.h" -#include "gui/theme.h" #include "client.h" #include "spellshortcut.h" diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index 18a4489bd..aea8efb37 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -24,12 +24,7 @@ #include "client.h" #include "configuration.h" -#include "graphics.h" #include "graphicsvertexes.h" -#include "logger.h" - -#include "gui/palette.h" -#include "gui/theme.h" #include "gui/widgets/label.h" #include "gui/widgets/tabbedarea.h" diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index d6c73b642..869956744 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -28,8 +28,6 @@ #include "gui/widgets/scrollarea.h" #include "gui/widgets/tab.h" -#include "logger.h" - #include <guichan/widgets/container.hpp> #include "debug.h" diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h index 81d19777e..e25183885 100644 --- a/src/gui/widgets/tabbedarea.h +++ b/src/gui/widgets/tabbedarea.h @@ -32,8 +32,6 @@ #include "gui/widgets/button.h" -#include "utils/stringvector.h" - class Tab; /** diff --git a/src/gui/widgets/tabstrip.cpp b/src/gui/widgets/tabstrip.cpp index aa8f3d91f..5e8baf3f5 100644 --- a/src/gui/widgets/tabstrip.cpp +++ b/src/gui/widgets/tabstrip.cpp @@ -23,8 +23,6 @@ #include "gui/widgets/button.h" #include "gui/widgets/tab.h" -#include "logger.h" - #include "debug.h" TabStrip::TabStrip(const Widget2 *const widget, diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp index 4f90a6841..51933708b 100644 --- a/src/gui/widgets/textbox.cpp +++ b/src/gui/widgets/textbox.cpp @@ -25,8 +25,6 @@ #include "keydata.h" #include "keyevent.h" -#include "gui/theme.h" - #include <guichan/font.hpp> #include <sstream> diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index e8a57067b..d9e585d3c 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -24,13 +24,9 @@ #include "client.h" #include "configuration.h" -#include "graphics.h" #include "keyevent.h" -#include "logger.h" -#include "gui/palette.h" #include "gui/sdlinput.h" -#include "gui/theme.h" #include "resources/image.h" diff --git a/src/gui/widgets/tradetab.cpp b/src/gui/widgets/tradetab.cpp index 8ead199a3..78d076e12 100644 --- a/src/gui/widgets/tradetab.cpp +++ b/src/gui/widgets/tradetab.cpp @@ -26,8 +26,6 @@ #include "commandhandler.h" #include "localplayer.h" -#include "gui/theme.h" - #include "net/net.h" #include "resources/iteminfo.h" diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp index 0e5d3bfcd..6079b668c 100644 --- a/src/gui/widgets/whispertab.cpp +++ b/src/gui/widgets/whispertab.cpp @@ -26,8 +26,6 @@ #include "commandhandler.h" #include "localplayer.h" -#include "gui/theme.h" - #include "net/chathandler.h" #include "net/net.h" diff --git a/src/gui/widgets/widgetgroup.cpp b/src/gui/widgets/widgetgroup.cpp index 2861fa6fc..85d28dc1b 100644 --- a/src/gui/widgets/widgetgroup.cpp +++ b/src/gui/widgets/widgetgroup.cpp @@ -20,8 +20,6 @@ #include "gui/widgets/widgetgroup.h" -#include "logger.h" - #include "debug.h" WidgetGroup::WidgetGroup(const Widget2 *const widget, diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 5495cd310..3f54ce3cc 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -25,12 +25,9 @@ #include "client.h" #include "configuration.h" #include "graphicsvertexes.h" -#include "logger.h" #include "sound.h" #include "gui/gui.h" -#include "gui/palette.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "gui/widgets/layout.h" diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp index e4cbbd75b..7841cd7a1 100644 --- a/src/gui/windowmenu.cpp +++ b/src/gui/windowmenu.cpp @@ -23,7 +23,6 @@ #include "gui/windowmenu.h" #include "emoteshortcut.h" -#include "graphics.h" #include "inputmanager.h" #include "keyboardconfig.h" @@ -225,10 +224,6 @@ void WindowMenu::action(const gcn::ActionEvent &event) } } -//void WindowMenu::valueChanged(const gcn::SelectionEvent &event) -//{ -//} - void WindowMenu::addButton(const char *const text, const std::string &description, int &x, int &h, const int key, const bool visible) diff --git a/src/guild.cpp b/src/guild.cpp index a589f866f..0c9930f85 100644 --- a/src/guild.cpp +++ b/src/guild.cpp @@ -24,8 +24,6 @@ #include "actorspritemanager.h" -#include "utils/stringutils.h" - #include "debug.h" class SortGuildFunctor final diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 3f08ef643..ede9f412c 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -49,7 +49,6 @@ #include "gui/sdlfont.h" #include "gui/skilldialog.h" #include "gui/socialwindow.h" -#include "gui/theme.h" #include "gui/viewport.h" #include "gui/widgets/whispertab.h" @@ -1903,7 +1902,7 @@ void LocalPlayer::invertDirection() &LocalPlayer::getInvertDirectionString, 0, false); } -static const char *invertDirectionStrings[] = +static const char *const invertDirectionStrings[] = { N_("(D) default moves"), N_("(I) invert moves"), @@ -1953,7 +1952,7 @@ void LocalPlayer::changeMoveToTargetType() &LocalPlayer::getMoveToTargetTypeString); } -static const char *moveToTargetTypeStrings[] = +static const char *const moveToTargetTypeStrings[] = { N_("(0) default moves to target"), N_("(1) moves to target in distance 1"), @@ -1981,7 +1980,7 @@ void LocalPlayer::changeFollowMode() &LocalPlayer::getFollowModeString); } -static const char *followModeStrings[] = +static const char *const followModeStrings[] = { N_("(D) default follow"), N_("(R) relative follow"), @@ -2027,7 +2026,7 @@ void LocalPlayer::changeAttackType() &LocalPlayer::getAttackTypeString); } -static const char *attackTypeStrings[] = +static const char *const attackTypeStrings[] = { N_("(D) default attack"), N_("(G) go and attack"), @@ -2082,7 +2081,7 @@ void LocalPlayer::changePickUpType() &LocalPlayer::getPickUpTypeString); } -static const char *pickUpTypeStrings[] = +static const char *const pickUpTypeStrings[] = { N_("(S) small pick up 1x1 cells"), N_("(D) default pick up 2x1 cells"), @@ -2102,7 +2101,7 @@ std::string LocalPlayer::getPickUpTypeString() const unsigned debugPathSize = 5; -static const char *debugPathStrings[] = +static const char *const debugPathStrings[] = { N_("(N) normal map view"), N_("(D) debug map view"), @@ -2126,7 +2125,7 @@ void LocalPlayer::switchMagicAttack() &LocalPlayer::getMagicAttackString); } -static const char *magicAttackStrings[] = +static const char *const magicAttackStrings[] = { N_("(f) use #flar for magic attack"), N_("(c) use #chiza for magic attack"), @@ -2150,7 +2149,7 @@ void LocalPlayer::switchPvpAttack() &LocalPlayer::getPvpAttackString); } -static const char *pvpAttackStrings[] = +static const char *const pvpAttackStrings[] = { N_("(a) attack all players"), N_("(f) attack all except friends"), @@ -2173,7 +2172,7 @@ void LocalPlayer::changeImitationMode() &LocalPlayer::getImitationModeString); } -static const char *imitationModeStrings[] = +static const char *const imitationModeStrings[] = { N_("(D) default imitation"), N_("(O) outfits imitation"), @@ -2264,7 +2263,7 @@ void LocalPlayer::switchGameModifiers() debugMsg(str.substr(4)); } -static const char *gameModifiersStrings[] = +static const char *const gameModifiersStrings[] = { _("Game modifiers are enabled"), _("Game modifiers are disabled"), diff --git a/src/localplayer.h b/src/localplayer.h index 6134620bb..c5767aa76 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -539,7 +539,8 @@ class LocalPlayer final : public Being, void tryMagic(const std::string &spell, const int baseMagic, const int schoolMagic, const int mana) const; - const char *getVarItem(const char *const *const arr, const unsigned index, + const char *getVarItem(const char *const *const arr, + const unsigned index, const unsigned sz) const; void changeMode(unsigned *const var, const unsigned limit, diff --git a/src/net/ea/gui/guildtab.cpp b/src/net/ea/gui/guildtab.cpp index 6ec3d7167..210db0235 100644 --- a/src/net/ea/gui/guildtab.cpp +++ b/src/net/ea/gui/guildtab.cpp @@ -28,8 +28,6 @@ #include "localplayer.h" #include "sound.h" -#include "gui/theme.h" - #include "net/net.h" #include "net/ea/guildhandler.h" diff --git a/src/net/ea/gui/partytab.cpp b/src/net/ea/gui/partytab.cpp index 2c97c8cc4..4b9cd0488 100644 --- a/src/net/ea/gui/partytab.cpp +++ b/src/net/ea/gui/partytab.cpp @@ -28,8 +28,6 @@ #include "party.h" #include "sound.h" -#include "gui/theme.h" - #include "net/net.h" #include "net/partyhandler.h" diff --git a/src/net/eathena/gui/guildtab.cpp b/src/net/eathena/gui/guildtab.cpp index 862b3cd91..fb7cabc77 100644 --- a/src/net/eathena/gui/guildtab.cpp +++ b/src/net/eathena/gui/guildtab.cpp @@ -27,8 +27,6 @@ #include "guild.h" #include "localplayer.h" -#include "gui/theme.h" - #include "net/net.h" #include "net/guildhandler.h" diff --git a/src/net/eathena/gui/partytab.cpp b/src/net/eathena/gui/partytab.cpp index 89682e1eb..da14226fe 100644 --- a/src/net/eathena/gui/partytab.cpp +++ b/src/net/eathena/gui/partytab.cpp @@ -27,8 +27,6 @@ #include "localplayer.h" #include "party.h" -#include "gui/theme.h" - #include "net/net.h" #include "net/partyhandler.h" diff --git a/src/net/tmwa/gui/guildtab.cpp b/src/net/tmwa/gui/guildtab.cpp index 4f6029b9d..ebdaea10f 100644 --- a/src/net/tmwa/gui/guildtab.cpp +++ b/src/net/tmwa/gui/guildtab.cpp @@ -27,8 +27,6 @@ #include "guild.h" #include "localplayer.h" -#include "gui/theme.h" - #include "net/net.h" #include "net/guildhandler.h" diff --git a/src/net/tmwa/gui/partytab.cpp b/src/net/tmwa/gui/partytab.cpp index 1b4bc21de..6b9440642 100644 --- a/src/net/tmwa/gui/partytab.cpp +++ b/src/net/tmwa/gui/partytab.cpp @@ -27,8 +27,6 @@ #include "localplayer.h" #include "party.h" -#include "gui/theme.h" - #include "net/net.h" #include "net/partyhandler.h" diff --git a/src/party.cpp b/src/party.cpp index e32e79aae..d72b06d84 100644 --- a/src/party.cpp +++ b/src/party.cpp @@ -25,8 +25,6 @@ #include "debug.h" -#include "utils/stringutils.h" - class SortPartyFunctor final { public: diff --git a/src/resources/specialdb.h b/src/resources/specialdb.h index f456f6a45..06f150b73 100644 --- a/src/resources/specialdb.h +++ b/src/resources/specialdb.h @@ -41,7 +41,7 @@ struct SpecialInfo final SpecialInfo() : id(0), isActive(false), - TargetMode(TARGET_SELF), + targetMode(TARGET_SELF), hasLevel(false), level(0), hasRechargeBar(false), |