diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-09-09 23:11:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-09-09 23:11:23 +0300 |
commit | e3dabb7f0a22c6442dde5f261d3414f9e7369592 (patch) | |
tree | 494dbbaeb834f8278f840a996fe9d3dd53f96e1f /src/gui | |
parent | 703a3c4df3732e3e88559147001260f3355d42d6 (diff) | |
download | mv-e3dabb7f0a22c6442dde5f261d3414f9e7369592.tar.gz mv-e3dabb7f0a22c6442dde5f261d3414f9e7369592.tar.bz2 mv-e3dabb7f0a22c6442dde5f261d3414f9e7369592.tar.xz mv-e3dabb7f0a22c6442dde5f261d3414f9e7369592.zip |
Last fix part of shadow variables/methods errors.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/buydialog.cpp | 24 | ||||
-rw-r--r-- | src/gui/charselectdialog.cpp | 34 | ||||
-rw-r--r-- | src/gui/itemamountwindow.cpp | 36 | ||||
-rw-r--r-- | src/gui/quitdialog.cpp | 20 | ||||
-rw-r--r-- | src/gui/quitdialog.h | 2 | ||||
-rw-r--r-- | src/gui/register.cpp | 30 | ||||
-rw-r--r-- | src/gui/selldialog.cpp | 24 | ||||
-rw-r--r-- | src/gui/setup_video.cpp | 14 | ||||
-rw-r--r-- | src/gui/shopwindow.cpp | 34 | ||||
-rw-r--r-- | src/gui/textcommandeditor.cpp | 56 | ||||
-rw-r--r-- | src/gui/tradewindow.cpp | 16 | ||||
-rw-r--r-- | src/gui/updaterwindow.cpp | 16 |
12 files changed, 153 insertions, 153 deletions
diff --git a/src/gui/buydialog.cpp b/src/gui/buydialog.cpp index 4a03370a8..94c2b88ff 100644 --- a/src/gui/buydialog.cpp +++ b/src/gui/buydialog.cpp @@ -111,18 +111,18 @@ void BuyDialog::init() mSlider->addActionListener(this); mShopItemList->addSelectionListener(this); - ContainerPlacer place; - place = getPlacer(0, 0); - - place(0, 0, mScrollArea, 8, 5).setPadding(3); - place(0, 5, mDecreaseButton); - place(1, 5, mSlider, 3); - place(4, 5, mIncreaseButton); - place(5, 5, mQuantityLabel, 2); - place(7, 5, mAddMaxButton); - place(0, 6, mMoneyLabel, 8); - place(6, 7, mBuyButton); - place(7, 7, mQuitButton); + ContainerPlacer placer; + placer = getPlacer(0, 0); + + placer(0, 0, mScrollArea, 8, 5).setPadding(3); + placer(0, 5, mDecreaseButton); + placer(1, 5, mSlider, 3); + placer(4, 5, mIncreaseButton); + placer(5, 5, mQuantityLabel, 2); + placer(7, 5, mAddMaxButton); + placer(0, 6, mMoneyLabel, 8); + placer(6, 7, mBuyButton); + placer(7, 7, mQuitButton); Layout &layout = getLayout(); layout.setRowHeight(0, Layout::AUTO_SET); diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp index f926a90aa..e39b5ecfc 100644 --- a/src/gui/charselectdialog.cpp +++ b/src/gui/charselectdialog.cpp @@ -141,34 +141,34 @@ CharSelectDialog::CharSelectDialog(LoginData *data): int optionalActions = Net::getLoginHandler()->supportedOptionalActions(); - ContainerPlacer place; - place = getPlacer(0, 0); + ContainerPlacer placer; + placer = getPlacer(0, 0); - place(0, 0, mAccountNameLabel, 2); - place(0, 1, mSwitchLoginButton); + placer(0, 0, mAccountNameLabel, 2); + placer(0, 1, mSwitchLoginButton); if (optionalActions & Net::LoginHandler::Unregister) { mUnregisterButton = new Button(_("Unregister"), "unregister", this); - place(3, 1, mUnregisterButton); + placer(3, 1, mUnregisterButton); } - place(0, 2, mChangePasswordButton); + placer(0, 2, mChangePasswordButton); if (optionalActions & Net::LoginHandler::ChangeEmail) { mChangeEmailButton = new Button(_("Change Email"), "change_email", this); - place(3, 2, mChangeEmailButton); + placer(3, 2, mChangeEmailButton); } - place = getPlacer(0, 1); + placer = getPlacer(0, 1); for (int i = 0; i < static_cast<int>(mLoginData->characterSlots); i++) { mCharacterEntries.push_back(new CharacterDisplay(this)); - place(i % SLOTS_PER_ROW, static_cast<int>(i) / SLOTS_PER_ROW, + placer(i % SLOTS_PER_ROW, static_cast<int>(i) / SLOTS_PER_ROW, mCharacterEntries[i]); } @@ -410,14 +410,14 @@ CharacterDisplay::CharacterDisplay(CharSelectDialog *charSelectDialog): mDelete = new Button(_("Delete"), "delete", charSelectDialog); LayoutHelper h(this); - ContainerPlacer place = h.getPlacer(0, 0); - - place(0, 0, mPlayerBox, 3, 5); - place(0, 5, mName, 3); - place(0, 6, mLevel, 3); - place(0, 7, mMoney, 3); - place(0, 8, mButton, 3); - place(0, 9, mDelete, 3); + ContainerPlacer placer = h.getPlacer(0, 0); + + placer(0, 0, mPlayerBox, 3, 5); + placer(0, 5, mName, 3); + placer(0, 6, mLevel, 3); + placer(0, 7, mMoney, 3); + placer(0, 8, mButton, 3); + placer(0, 9, mDelete, 3); update(); diff --git a/src/gui/itemamountwindow.cpp b/src/gui/itemamountwindow.cpp index 9bd3f3ab3..d85b38ccb 100644 --- a/src/gui/itemamountwindow.cpp +++ b/src/gui/itemamountwindow.cpp @@ -213,21 +213,21 @@ ItemAmountWindow::ItemAmountWindow(Usage usage, Window *parent, Item *item, minusAmountButton->setWidth(plusAmountButton->getWidth()); // Set positions - ContainerPlacer place; - place = getPlacer(0, 0); + ContainerPlacer placer; + placer = getPlacer(0, 0); int n = 0; if (mUsage == ShopBuyAdd) { - place(0, n, mItemDropDown, 8); + placer(0, n, mItemDropDown, 8); n++; } - place(1, n, minusAmountButton); - place(2, n, mItemAmountTextField, 3); - place(5, n, plusAmountButton); - place(6, n, addAllButton); + placer(1, n, minusAmountButton); + placer(2, n, mItemAmountTextField, 3); + placer(5, n, plusAmountButton); + placer(6, n, addAllButton); - place(0, n, mItemIcon, 1, 3); - place(1, n + 1, mItemAmountSlide, 7); + placer(0, n, mItemIcon, 1, 3); + placer(1, n + 1, mItemAmountSlide, 7); if (mUsage == ShopBuyAdd || mUsage == ShopSellAdd) { @@ -236,19 +236,19 @@ ItemAmountWindow::ItemAmountWindow(Usage usage, Window *parent, Item *item, minusPriceButton->adjustSize(); minusPriceButton->setWidth(plusPriceButton->getWidth()); - place(1, n + 2, minusPriceButton); - place(2, n + 2, mItemPriceTextField, 3); - place(5, n + 2, plusPriceButton); - place(6, n + 2, mGPLabel); + placer(1, n + 2, minusPriceButton); + placer(2, n + 2, mItemPriceTextField, 3); + placer(5, n + 2, plusPriceButton); + placer(6, n + 2, mGPLabel); - place(1, n + 3, mItemPriceSlide, 7); - place(4, n + 5, cancelButton); - place(5, n + 5, okButton); + placer(1, n + 3, mItemPriceSlide, 7); + placer(4, n + 5, cancelButton); + placer(5, n + 5, okButton); } else { - place(4, n + 2, cancelButton); - place(5, n + 2, okButton); + placer(4, n + 2, cancelButton); + placer(5, n + 2, okButton); } reflowLayout(225, 0); diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp index 96848f645..e71e291d1 100644 --- a/src/gui/quitdialog.cpp +++ b/src/gui/quitdialog.cpp @@ -55,7 +55,7 @@ QuitDialog::QuitDialog(QuitDialog** pointerToMe): addKeyListener(this); - ContainerPlacer place = getPlacer(0, 0); + ContainerPlacer placer = getPlacer(0, 0); const State state = Client::getState(); @@ -67,25 +67,25 @@ QuitDialog::QuitDialog(QuitDialog** pointerToMe): state == STATE_UPDATE || state == STATE_LOAD_DATA) { - placeOption(place, mForceQuit); + placeOption(placer, mForceQuit); } else { // Only added if we are connected to an accountserver or gameserver - placeOption(place, mLogoutQuit); - placeOption(place, mSwitchAccountServer); + placeOption(placer, mLogoutQuit); + placeOption(placer, mSwitchAccountServer); // Only added if we are connected to a gameserver if (state == STATE_GAME) - placeOption(place, mSwitchCharacter); + placeOption(placer, mSwitchCharacter); } mOptions[0]->setSelected(true); - place = getPlacer(0, 1); + placer = getPlacer(0, 1); - place(1, 0, mOkButton, 1); - place(2, 0, mCancelButton, 1); + placer(1, 0, mOkButton, 1); + placer(2, 0, mCancelButton, 1); reflowLayout(200, 0); setLocationRelativeTo(getParent()); @@ -109,9 +109,9 @@ QuitDialog::~QuitDialog() mSwitchCharacter = 0; } -void QuitDialog::placeOption(ContainerPlacer &place, gcn::RadioButton *option) +void QuitDialog::placeOption(ContainerPlacer &placer, gcn::RadioButton *option) { - place(0, static_cast<int>(mOptions.size()), option, 3); + placer(0, static_cast<int>(mOptions.size()), option, 3); mOptions.push_back(option); } diff --git a/src/gui/quitdialog.h b/src/gui/quitdialog.h index 380a85528..5456be26b 100644 --- a/src/gui/quitdialog.h +++ b/src/gui/quitdialog.h @@ -61,7 +61,7 @@ class QuitDialog : public Window, public gcn::ActionListener, void keyPressed(gcn::KeyEvent &keyEvent); private: - void placeOption(ContainerPlacer &place, gcn::RadioButton *option); + void placeOption(ContainerPlacer &placer, gcn::RadioButton *option); std::vector<gcn::RadioButton*> mOptions; gcn::RadioButton *mLogoutQuit; diff --git a/src/gui/register.cpp b/src/gui/register.cpp index e2c718359..603810a0b 100644 --- a/src/gui/register.cpp +++ b/src/gui/register.cpp @@ -81,15 +81,15 @@ RegisterDialog::RegisterDialog(LoginData *data): mRegisterButton = new Button(_("Register"), "register", this); mCancelButton = new Button(_("Cancel"), "cancel", this); - ContainerPlacer place; - place = getPlacer(0, 0); - place(0, 0, userLabel); - place(0, 1, passwordLabel); - place(0, 2, confirmLabel); + ContainerPlacer placer; + placer = getPlacer(0, 0); + placer(0, 0, userLabel); + placer(0, 1, passwordLabel); + placer(0, 2, confirmLabel); - place(1, 0, mUserField, 3).setPadding(2); - place(1, 1, mPasswordField, 3).setPadding(2); - place(1, 2, mConfirmField, 3).setPadding(2); + placer(1, 0, mUserField, 3).setPadding(2); + placer(1, 1, mPasswordField, 3).setPadding(2); + placer(1, 2, mConfirmField, 3).setPadding(2); int row = 3; @@ -97,8 +97,8 @@ RegisterDialog::RegisterDialog(LoginData *data): { mMaleButton = new RadioButton(_("Male"), "sex", true); mFemaleButton = new RadioButton(_("Female"), "sex", false); - place(1, row, mMaleButton); - place(2, row, mFemaleButton); + placer(1, row, mMaleButton); + placer(2, row, mFemaleButton); row++; } @@ -107,15 +107,15 @@ RegisterDialog::RegisterDialog(LoginData *data): { gcn::Label *emailLabel = new Label(_("Email:")); mEmailField = new TextField; - place(0, row, emailLabel); - place(1, row, mEmailField, 3).setPadding(2); + placer(0, row, emailLabel); + placer(1, row, mEmailField, 3).setPadding(2); row++; } - place = getPlacer(0, 2); - place(1, 0, mRegisterButton); - place(2, 0, mCancelButton); + placer = getPlacer(0, 2); + placer(1, 0, mRegisterButton); + placer(2, 0, mCancelButton); reflowLayout(250, 0); mUserField->addKeyListener(this); diff --git a/src/gui/selldialog.cpp b/src/gui/selldialog.cpp index 5cbb4167e..82b4a1829 100644 --- a/src/gui/selldialog.cpp +++ b/src/gui/selldialog.cpp @@ -107,18 +107,18 @@ void SellDialog::init() mSlider->setActionEventId("slider"); mSlider->addActionListener(this); - ContainerPlacer place; - place = getPlacer(0, 0); - - place(0, 0, mScrollArea, 8, 5).setPadding(3); - place(0, 5, mDecreaseButton); - place(1, 5, mSlider, 3); - place(4, 5, mIncreaseButton); - place(5, 5, mQuantityLabel, 2); - place(7, 5, mAddMaxButton); - place(0, 6, mMoneyLabel, 8); - place(6, 7, mSellButton); - place(7, 7, mQuitButton); + ContainerPlacer placer; + placer = getPlacer(0, 0); + + placer(0, 0, mScrollArea, 8, 5).setPadding(3); + placer(0, 5, mDecreaseButton); + placer(1, 5, mSlider, 3); + placer(4, 5, mIncreaseButton); + placer(5, 5, mQuantityLabel, 2); + placer(7, 5, mAddMaxButton); + placer(0, 6, mMoneyLabel, 8); + placer(6, 7, mSellButton); + placer(7, 7, mQuitButton); Layout &layout = getLayout(); layout.setRowHeight(0, Layout::AUTO_SET); diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index bc210075a..e0f03ec60 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -687,12 +687,12 @@ void Setup_Video::action(const gcn::ActionEvent &event) } else if (id == "fpslimitcheckbox" || id == "fpslimitslider") { - int fps = static_cast<int>(mFpsSlider->getValue()); + int tempFps = static_cast<int>(mFpsSlider->getValue()); if (id == "fpslimitcheckbox" && !mFpsSlider->isEnabled()) - fps = 60; + tempFps = 60; else - fps = fps > 0 ? fps : 60; - mFps = mFpsCheckBox->isSelected() ? fps : 0; + tempFps = tempFps > 0 ? tempFps : 60; + mFps = mFpsCheckBox->isSelected() ? tempFps : 0; const std::string text = mFps > 0 ? toString(mFps) : _("None"); mFpsLabel->setCaption(text); @@ -701,9 +701,9 @@ void Setup_Video::action(const gcn::ActionEvent &event) } else if (id == "altfpslimitslider") { - int fps = static_cast<int>(mAltFpsSlider->getValue()); - fps = fps > 0 ? fps : static_cast<int>(mAltFpsSlider->getScaleStart()); - mAltFps = fps; + int tempFps = static_cast<int>(mAltFpsSlider->getValue()); + tempFps = tempFps > 0 ? tempFps : static_cast<int>(mAltFpsSlider->getScaleStart()); + mAltFps = tempFps; const std::string text = mAltFps > 0 ? toString(mAltFps) : _("None"); mAltFpsLabel->setCaption(_("Alt FPS limit: ") + text); diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp index c62c3254c..ccfed3efc 100644 --- a/src/gui/shopwindow.cpp +++ b/src/gui/shopwindow.cpp @@ -127,28 +127,28 @@ ShopWindow::ShopWindow(): mAnnounceLinks = new CheckBox(_("Show links in announce"), false, this, "link announce"); - ContainerPlacer place; - place = getPlacer(0, 0); - - place(0, 0, mBuyLabel, 8).setPadding(3); - place(8, 0, mSellLabel, 8).setPadding(3); - place(0, 1, mBuyScrollArea, 8, 5).setPadding(3); - place(8, 1, mSellScrollArea, 8, 5).setPadding(3); - place(0, 6, mBuyAddButton); - place(1, 6, mBuyDeleteButton); - place(3, 6, mBuyAnnounceButton); - place(8, 6, mSellAddButton); - place(9, 6, mSellDeleteButton); - place(11, 6, mSellAnnounceButton); - place(0, 7, mAnnounceLinks, 8); - place(15, 7, mCloseButton); + ContainerPlacer placer; + placer = getPlacer(0, 0); + + placer(0, 0, mBuyLabel, 8).setPadding(3); + placer(8, 0, mSellLabel, 8).setPadding(3); + placer(0, 1, mBuyScrollArea, 8, 5).setPadding(3); + placer(8, 1, mSellScrollArea, 8, 5).setPadding(3); + placer(0, 6, mBuyAddButton); + placer(1, 6, mBuyDeleteButton); + placer(3, 6, mBuyAnnounceButton); + placer(8, 6, mSellAddButton); + placer(9, 6, mSellDeleteButton); + placer(11, 6, mSellAnnounceButton); + placer(0, 7, mAnnounceLinks, 8); + placer(15, 7, mCloseButton); if (auctionManager && auctionManager->getEnableAuctionBot()) { mBuyAuctionButton = new Button(_("Auction"), "auction buy", this); mSellAuctionButton = new Button(_("Auction"), "auction sell", this); - place(4, 6, mBuyAuctionButton); - place(12, 6, mSellAuctionButton); + placer(4, 6, mBuyAuctionButton); + placer(12, 6, mSellAuctionButton); } else { diff --git a/src/gui/textcommandeditor.cpp b/src/gui/textcommandeditor.cpp index 1e18da57a..214cbff76 100644 --- a/src/gui/textcommandeditor.cpp +++ b/src/gui/textcommandeditor.cpp @@ -254,34 +254,34 @@ TextCommandEditor::TextCommandEditor(TextCommand *command): mSchoolDropDown->setSelected(command->getSchool() - MAGIC_START_ID); mSchoolLvlField->setValue(command->getSchoolLvl()); - ContainerPlacer place; - place = getPlacer(0, 0); - - place(0, 0, mIsMagic, 1); - place(2, 0, mIsOther, 1); - place(0, 1, mSymbolLabel, 2).setPadding(3); - place(2, 1, mSymbolTextField, 3).setPadding(3); - place(0, 2, mCommandLabel, 2).setPadding(3); - place(2, 2, mCommandTextField, 4).setPadding(3); - place(0, 3, mTypeLabel, 2).setPadding(3); - place(2, 3, mTypeDropDown, 3).setPadding(3); - - place(0, 4, mIconLabel, 2).setPadding(3); - place(2, 4, mIconDropDown, 3).setPadding(3); - - place(0, 5, mManaLabel, 2).setPadding(3); - place(2, 5, mManaField, 3).setPadding(3); - place(0, 6, mMagicLvlLabel, 2).setPadding(3); - place(2, 6, mMagicLvlField, 3).setPadding(3); - - place(0, 7, mSchoolLabel, 2).setPadding(3); - place(2, 7, mSchoolDropDown, 3).setPadding(3); - place(0, 8, mSchoolLvlLabel, 2).setPadding(3); - place(2, 8, mSchoolLvlField, 3).setPadding(3); - - place(0, 9, mSaveButton, 2).setPadding(3); - place(2, 9, mCancelButton, 2).setPadding(3); - place(4, 9, mDeleteButton, 2).setPadding(3); + ContainerPlacer placer; + placer = getPlacer(0, 0); + + placer(0, 0, mIsMagic, 1); + placer(2, 0, mIsOther, 1); + placer(0, 1, mSymbolLabel, 2).setPadding(3); + placer(2, 1, mSymbolTextField, 3).setPadding(3); + placer(0, 2, mCommandLabel, 2).setPadding(3); + placer(2, 2, mCommandTextField, 4).setPadding(3); + placer(0, 3, mTypeLabel, 2).setPadding(3); + placer(2, 3, mTypeDropDown, 3).setPadding(3); + + placer(0, 4, mIconLabel, 2).setPadding(3); + placer(2, 4, mIconDropDown, 3).setPadding(3); + + placer(0, 5, mManaLabel, 2).setPadding(3); + placer(2, 5, mManaField, 3).setPadding(3); + placer(0, 6, mMagicLvlLabel, 2).setPadding(3); + placer(2, 6, mMagicLvlField, 3).setPadding(3); + + placer(0, 7, mSchoolLabel, 2).setPadding(3); + placer(2, 7, mSchoolDropDown, 3).setPadding(3); + placer(0, 8, mSchoolLvlLabel, 2).setPadding(3); + placer(2, 8, mSchoolLvlField, 3).setPadding(3); + + placer(0, 9, mSaveButton, 2).setPadding(3); + placer(2, 9, mCancelButton, 2).setPadding(3); + placer(4, 9, mDeleteButton, 2).setPadding(3); setWidth(w); setHeight(h); diff --git a/src/gui/tradewindow.cpp b/src/gui/tradewindow.cpp index d0ae67746..3874a8301 100644 --- a/src/gui/tradewindow.cpp +++ b/src/gui/tradewindow.cpp @@ -118,14 +118,14 @@ TradeWindow::TradeWindow(): place(1, 0, mMoneyLabel); place(0, 1, myScroll).setPadding(3); place(1, 1, partnerScroll).setPadding(3); - ContainerPlacer place; - place = getPlacer(0, 0); - place(0, 0, mMoneyLabel2); - place(1, 0, mMoneyField, 2); - place(3, 0, mMoneyChangeButton).setHAlign(LayoutCell::LEFT); - place = getPlacer(0, 2); - place(0, 0, mAddButton); - place(1, 0, mOkButton); + ContainerPlacer placer; + placer = getPlacer(0, 0); + placer(0, 0, mMoneyLabel2); + placer(1, 0, mMoneyField, 2); + placer(3, 0, mMoneyChangeButton).setHAlign(LayoutCell::LEFT); + placer = getPlacer(0, 2); + placer(0, 0, mAddButton); + placer(1, 0, mOkButton); Layout &layout = getLayout(); layout.extend(0, 2, 2, 1); layout.setRowHeight(1, Layout::AUTO_SET); diff --git a/src/gui/updaterwindow.cpp b/src/gui/updaterwindow.cpp index 4ba1c9179..d6c74cc79 100644 --- a/src/gui/updaterwindow.cpp +++ b/src/gui/updaterwindow.cpp @@ -165,14 +165,14 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost, mBrowserBox->setOpaque(false); mPlayButton->setEnabled(false); - ContainerPlacer place; - place = getPlacer(0, 0); - - place(0, 0, mScrollArea, 5, 3).setPadding(3); - place(0, 3, mLabel, 5); - place(0, 4, mProgressBar, 5); - place(3, 5, mCancelButton); - place(4, 5, mPlayButton); + ContainerPlacer placer; + placer = getPlacer(0, 0); + + placer(0, 0, mScrollArea, 5, 3).setPadding(3); + placer(0, 3, mLabel, 5); + placer(0, 4, mProgressBar, 5); + placer(3, 5, mCancelButton); + placer(4, 5, mPlayButton); reflowLayout(450, 400); |