summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-08 13:47:32 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-08 14:39:55 +0300
commit0975dc4cd9012b098061f0201028896d578649f8 (patch)
treeccb3991a51ef9de47877a7d2549664d0f0ae4f79 /src/gui/windows
parent4a823c0ba94c620bd0e51fc61f22c068661946cf (diff)
downloadmv-0975dc4cd9012b098061f0201028896d578649f8.tar.gz
mv-0975dc4cd9012b098061f0201028896d578649f8.tar.bz2
mv-0975dc4cd9012b098061f0201028896d578649f8.tar.xz
mv-0975dc4cd9012b098061f0201028896d578649f8.zip
Remove duplicate variables from some classes.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/editdialog.cpp4
-rw-r--r--src/gui/windows/editdialog.h1
-rw-r--r--src/gui/windows/skilldialog.cpp6
3 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/windows/editdialog.cpp b/src/gui/windows/editdialog.cpp
index 502b71ecb..5c002212f 100644
--- a/src/gui/windows/editdialog.cpp
+++ b/src/gui/windows/editdialog.cpp
@@ -35,9 +35,9 @@ EditDialog::EditDialog(const std::string &restrict title,
Window(title, modal, parent, "edit.xml"),
gcn::ActionListener(),
mEventOk(eventOk),
- mTextField(new TextField(this)),
- mDefaultWidth(width)
+ mTextField(new TextField(this))
{
+ mDefaultWidth = width;
mTextField->setText(msg);
}
diff --git a/src/gui/windows/editdialog.h b/src/gui/windows/editdialog.h
index 74242ed52..fa4a02bf7 100644
--- a/src/gui/windows/editdialog.h
+++ b/src/gui/windows/editdialog.h
@@ -66,7 +66,6 @@ class EditDialog final : public Window, public gcn::ActionListener
private:
std::string mEventOk;
TextField *mTextField;
- int mDefaultWidth;
};
#endif // GUI_WINDOWS_EDITDIALOG_H
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 844bca4ec..ce7c1027a 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -64,14 +64,14 @@ class SkillListBox final : public ListBox
ListBox(widget, model, "skilllistbox.xml"),
mModel(model),
mPopup(new TextPopup),
- mHighlightColor(getThemeColor(Theme::HIGHLIGHT)),
mTextColor(getThemeColor(Theme::TEXT)),
mTextColor2(getThemeColor(Theme::TEXT_OUTLINE)),
mTextPadding(mSkin ? mSkin->getOption("textPadding", 34) : 34),
mSpacing(mSkin ? mSkin->getOption("spacing", 0) : 0),
- mRowHeight(getFont()->getHeight() * 2 + mSpacing + 2 * mPadding),
mSkillClicked(false)
{
+ mRowHeight = getFont()->getHeight() * 2 + mSpacing + 2 * mPadding;
+ mHighlightColor = getThemeColor(Theme::HIGHLIGHT);
mPopup->postInit();
if (mRowHeight < 34)
@@ -233,12 +233,10 @@ class SkillListBox final : public ListBox
private:
SkillModel *mModel;
TextPopup *mPopup;
- gcn::Color mHighlightColor;
gcn::Color mTextColor;
gcn::Color mTextColor2;
int mTextPadding;
int mSpacing;
- int mRowHeight;
bool mSkillClicked;
};