From ee8cf11ee976b74167549b3e74c1c092e1623c49 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 16 May 2014 22:46:32 +0300 Subject: Move socialtab into separate file. --- src/gui/windows/socialwindow.cpp | 83 +--------------------------------------- 1 file changed, 1 insertion(+), 82 deletions(-) (limited to 'src/gui/windows/socialwindow.cpp') diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp index 711f5b8bc..eb16cddf8 100644 --- a/src/gui/windows/socialwindow.cpp +++ b/src/gui/windows/socialwindow.cpp @@ -55,6 +55,7 @@ #include "gui/widgets/tabbedarea.h" #include "gui/widgets/tabs/chattab.h" +#include "gui/widgets/tabs/socialtab.h" #include "net/net.h" #include "net/guildhandler.h" @@ -94,88 +95,6 @@ namespace } friendSorter; } // namespace -class SocialTab : public Tab -{ -public: - A_DELETE_COPY(SocialTab) - - virtual void invite() - { - } - - virtual void leave() - { - } - - virtual void updateList() - { - } - - virtual void updateAvatar(const std::string &name A_UNUSED) - { - } - - virtual void resetDamage(const std::string &name A_UNUSED) - { - } - - virtual void selectIndex(const unsigned num A_UNUSED) - { } - - virtual void buildCounter(const int online A_UNUSED = 0, - const int total A_UNUSED = 0) - { - } - -protected: - friend class SocialWindow; - - explicit SocialTab(const Widget2 *const widget): - Tab(widget), - mInviteDialog(nullptr), - mConfirmDialog(nullptr), - mScroll(nullptr), - mList(nullptr), - mCounterString() - { - } - - virtual ~SocialTab() - { - // Cleanup dialogs - if (mInviteDialog) - { - mInviteDialog->close(); - mInviteDialog->scheduleDelete(); - mInviteDialog = nullptr; - } - - if (mConfirmDialog) - { - mConfirmDialog->close(); - mConfirmDialog->scheduleDelete(); - mConfirmDialog = nullptr; - } - } - - void setCurrent() override final - { - updateCounter(); - } - - void updateCounter() const - { - if (socialWindow) - socialWindow->setCounter(this, mCounterString); - } - - TextDialog *mInviteDialog; - ConfirmDialog *mConfirmDialog; - ScrollArea *mScroll; - AvatarListBox *mList; - std::string mCounterString; -}; - class SocialGuildTab final : public SocialTab, public ActionListener { public: -- cgit v1.2.3-70-g09d2