From 0975dc4cd9012b098061f0201028896d578649f8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 8 Jan 2014 13:47:32 +0300 Subject: Remove duplicate variables from some classes. --- src/gui/windows/editdialog.cpp | 4 ++-- src/gui/windows/editdialog.h | 1 - src/gui/windows/skilldialog.cpp | 6 ++---- 3 files changed, 4 insertions(+), 7 deletions(-) (limited to 'src/gui/windows') 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; }; -- cgit v1.2.3-60-g2f50