summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-18 01:12:45 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-18 22:05:06 +0300
commitf24b4360e73d45bc0830d2964c06e295890e5f18 (patch)
tree6ce4f8440b22ec665aa94403643c6cb0df1b47f0 /src/gui/widgets/tabs
parent14a0a04b2bb3928f7429fd748dd40e1843fca571 (diff)
downloadmv-f24b4360e73d45bc0830d2964c06e295890e5f18.tar.gz
mv-f24b4360e73d45bc0830d2964c06e295890e5f18.tar.bz2
mv-f24b4360e73d45bc0830d2964c06e295890e5f18.tar.xz
mv-f24b4360e73d45bc0830d2964c06e295890e5f18.zip
derive Widget from Widget2.
Diffstat (limited to 'src/gui/widgets/tabs')
-rw-r--r--src/gui/widgets/tabs/chattab.cpp5
-rw-r--r--src/gui/widgets/tabs/chattab.h3
-rw-r--r--src/gui/widgets/tabs/guildchattab.h3
-rw-r--r--src/gui/widgets/tabs/langtab.cpp3
-rw-r--r--src/gui/widgets/tabs/langtab.h3
-rw-r--r--src/gui/widgets/tabs/setup_colors.cpp5
-rw-r--r--src/gui/widgets/tabs/setup_input.cpp3
-rw-r--r--src/gui/widgets/tabs/setup_relations.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_video.h3
-rw-r--r--src/gui/widgets/tabs/setuptabscroll.cpp2
-rw-r--r--src/gui/widgets/tabs/tab.cpp3
-rw-r--r--src/gui/widgets/tabs/tab.h1
-rw-r--r--src/gui/widgets/tabs/whispertab.cpp3
-rw-r--r--src/gui/widgets/tabs/whispertab.h3
15 files changed, 26 insertions, 18 deletions
diff --git a/src/gui/widgets/tabs/chattab.cpp b/src/gui/widgets/tabs/chattab.cpp
index 331101209..283f1927e 100644
--- a/src/gui/widgets/tabs/chattab.cpp
+++ b/src/gui/widgets/tabs/chattab.cpp
@@ -50,12 +50,13 @@
static const unsigned int MAX_WORD_SIZE = 50;
-ChatTab::ChatTab(const Widget2 *const widget, const std::string &name,
+ChatTab::ChatTab(const Widget2 *const widget,
+ const std::string &name,
const std::string &channel) :
Tab(widget),
mTextOutput(new BrowserBox(this, BrowserBox::AUTO_WRAP, true,
"browserbox.xml")),
- mScrollArea(new ScrollArea(mTextOutput, false)),
+ mScrollArea(new ScrollArea(this, mTextOutput, false)),
mChannelName(channel),
mAllowHightlight(true),
mRemoveNames(false),
diff --git a/src/gui/widgets/tabs/chattab.h b/src/gui/widgets/tabs/chattab.h
index 651e69d6b..a46279483 100644
--- a/src/gui/widgets/tabs/chattab.h
+++ b/src/gui/widgets/tabs/chattab.h
@@ -58,7 +58,8 @@ class ChatTab : public Tab
/**
* Constructor.
*/
- ChatTab(const Widget2 *const widget, const std::string &name,
+ ChatTab(const Widget2 *const widget,
+ const std::string &name,
const std::string &channel);
A_DELETE_COPY(ChatTab)
diff --git a/src/gui/widgets/tabs/guildchattab.h b/src/gui/widgets/tabs/guildchattab.h
index fbfd3a032..cfcf901ca 100644
--- a/src/gui/widgets/tabs/guildchattab.h
+++ b/src/gui/widgets/tabs/guildchattab.h
@@ -28,7 +28,8 @@
/**
* A tab for a guild chat channel.
*/
-class GuildChatTab final : public ChatTab, public ConfigListener
+class GuildChatTab final : public ChatTab,
+ public ConfigListener
{
public:
explicit GuildChatTab(const Widget2 *const widget);
diff --git a/src/gui/widgets/tabs/langtab.cpp b/src/gui/widgets/tabs/langtab.cpp
index fb6a5e12b..f5064be8c 100644
--- a/src/gui/widgets/tabs/langtab.cpp
+++ b/src/gui/widgets/tabs/langtab.cpp
@@ -26,7 +26,8 @@
#include "debug.h"
-LangTab::LangTab(const Widget2 *const widget, const std::string &lang) :
+LangTab::LangTab(const Widget2 *const widget,
+ const std::string &lang) :
// TRANSLATORS: lang chat tab name
ChatTab(widget, _("Lang"), lang + " ")
{
diff --git a/src/gui/widgets/tabs/langtab.h b/src/gui/widgets/tabs/langtab.h
index 275b69399..e036e4dd8 100644
--- a/src/gui/widgets/tabs/langtab.h
+++ b/src/gui/widgets/tabs/langtab.h
@@ -26,7 +26,8 @@
class LangTab final : public ChatTab
{
public:
- LangTab(const Widget2 *const widget, const std::string &lang);
+ LangTab(const Widget2 *const widget,
+ const std::string &lang);
A_DELETE_COPY(LangTab)
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp
index 8ea9d5fbb..2aaad6301 100644
--- a/src/gui/widgets/tabs/setup_colors.cpp
+++ b/src/gui/widgets/tabs/setup_colors.cpp
@@ -49,11 +49,12 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) :
SetupTab(widget),
SelectionListener(),
mColorBox(new ListBox(this, userPalette, "")),
- mScroll(new ScrollArea(mColorBox, true, "setup_colors_background.xml")),
+ mScroll(new ScrollArea(this, mColorBox,
+ true, "setup_colors_background.xml")),
mPreview(new BrowserBox(this, BrowserBox::AUTO_WRAP, true,
"browserbox.xml")),
mTextPreview(new TextPreview(this, gettext(rawmsg))),
- mPreviewBox(new ScrollArea(mPreview, true,
+ mPreviewBox(new ScrollArea(this, mPreview, true,
"setup_colors_preview_background.xml")),
mSelected(-1),
// TRANSLATORS: colors tab. label.
diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp
index 22bea9a75..72d05d966 100644
--- a/src/gui/widgets/tabs/setup_input.cpp
+++ b/src/gui/widgets/tabs/setup_input.cpp
@@ -103,7 +103,8 @@ Setup_Input::Setup_Input(const Widget2 *const widget) :
// TRANSLATORS: button in input settings tab
mResetKeysButton(new Button(this, _("Reset all keys"), "resetkeys", this)),
mTabs(new TabStrip(this, config.getIntValue("fontSize") + 10)),
- mScrollArea(new ScrollArea(mKeyList, true, "setup_input_background.xml")),
+ mScrollArea(new ScrollArea(this, mKeyList,
+ true, "setup_input_background.xml")),
mKeySetting(false),
mActionDataSize(new int [9])
{
diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp
index d23ac565c..35bd2094a 100644
--- a/src/gui/widgets/tabs/setup_relations.cpp
+++ b/src/gui/widgets/tabs/setup_relations.cpp
@@ -249,7 +249,7 @@ Setup_Relations::Setup_Relations(const Widget2 *const widget) :
mPlayerTableModel(new PlayerTableModel(this)),
mPlayerTable(new GuiTable(this, mPlayerTableModel)),
mPlayerTitleTable(new GuiTable(this, mPlayerTableTitleModel)),
- mPlayerScrollArea(new ScrollArea(mPlayerTable)),
+ mPlayerScrollArea(new ScrollArea(this, mPlayerTable)),
// TRANSLATORS: relation dialog button
mDefaultTrading(new CheckBox(this, _("Allow trading"),
player_relations.getDefault() & PlayerRelation::TRADE)),
diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp
index be00937f2..d2ef01378 100644
--- a/src/gui/widgets/tabs/setup_video.cpp
+++ b/src/gui/widgets/tabs/setup_video.cpp
@@ -224,7 +224,7 @@ Setup_Video::Setup_Video(const Widget2 *const widget) :
// TRANSLATORS: video settings tab name
setName(_("Video"));
- ScrollArea *const scrollArea = new ScrollArea(mModeList,
+ ScrollArea *const scrollArea = new ScrollArea(this, mModeList,
true, "setup_video_background.xml");
scrollArea->setWidth(150);
scrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
diff --git a/src/gui/widgets/tabs/setup_video.h b/src/gui/widgets/tabs/setup_video.h
index b385d0358..250fac0e0 100644
--- a/src/gui/widgets/tabs/setup_video.h
+++ b/src/gui/widgets/tabs/setup_video.h
@@ -37,7 +37,8 @@ class OpenGLListModel;
class Slider;
class TextDialog;
-class Setup_Video final : public SetupTab, public KeyListener
+class Setup_Video final : public SetupTab,
+ public KeyListener
{
public:
explicit Setup_Video(const Widget2 *const widget);
diff --git a/src/gui/widgets/tabs/setuptabscroll.cpp b/src/gui/widgets/tabs/setuptabscroll.cpp
index 9a37ced42..9c185b2bb 100644
--- a/src/gui/widgets/tabs/setuptabscroll.cpp
+++ b/src/gui/widgets/tabs/setuptabscroll.cpp
@@ -29,7 +29,7 @@
SetupTabScroll::SetupTabScroll(const Widget2 *const widget) :
SetupTab(widget),
mContainer(new VertContainer(this, 25, false, 8)),
- mScroll(new ScrollArea(mContainer, false)),
+ mScroll(new ScrollArea(this, mContainer, false)),
mItems(),
mAllItems(),
mPreferredFirstItemSize(200)
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index 87bd8bde2..c1650e8a8 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -87,8 +87,7 @@ static std::string const data[Tab::TAB_COUNT] =
Skin *Tab::tabImg[Tab::TAB_COUNT];
Tab::Tab(const Widget2 *const widget) :
- gcn::BasicContainer(),
- Widget2(widget),
+ gcn::BasicContainer(widget),
MouseListener(),
WidgetListener(),
mLabel(new Label(this)),
diff --git a/src/gui/widgets/tabs/tab.h b/src/gui/widgets/tabs/tab.h
index c186a0b4e..878663e36 100644
--- a/src/gui/widgets/tabs/tab.h
+++ b/src/gui/widgets/tabs/tab.h
@@ -84,7 +84,6 @@ class TabbedArea;
* A tab, the same as the Guichan tab in 0.8, but extended
*/
class Tab : public gcn::BasicContainer,
- public Widget2,
public MouseListener,
public WidgetListener
{
diff --git a/src/gui/widgets/tabs/whispertab.cpp b/src/gui/widgets/tabs/whispertab.cpp
index ec02bb70f..023d94110 100644
--- a/src/gui/widgets/tabs/whispertab.cpp
+++ b/src/gui/widgets/tabs/whispertab.cpp
@@ -34,7 +34,8 @@
#include "debug.h"
-WhisperTab::WhisperTab(const Widget2 *const widget, const std::string &nick) :
+WhisperTab::WhisperTab(const Widget2 *const widget,
+ const std::string &nick) :
ChatTab(widget, nick, ""),
mNick(nick)
{
diff --git a/src/gui/widgets/tabs/whispertab.h b/src/gui/widgets/tabs/whispertab.h
index 5dbb05a4e..84b55ae58 100644
--- a/src/gui/widgets/tabs/whispertab.h
+++ b/src/gui/widgets/tabs/whispertab.h
@@ -57,7 +57,8 @@ class WhisperTab final : public ChatTab
*
* @param nick the name of the player this tab is whispering to
*/
- WhisperTab(const Widget2 *const widget, const std::string &nick);
+ WhisperTab(const Widget2 *const widget,
+ const std::string &nick);
~WhisperTab();