From c1dc5cd3ee07f3a7045f849d8e3557a3dbf16e64 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 18 Aug 2016 17:21:20 +0300 Subject: Remove invite and leave buttons from social window. --- src/gui/windows/socialwindow.cpp | 16 ++++------------ src/gui/windows/socialwindow.h | 2 -- 2 files changed, 4 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp index 63a88c06f..647fceb23 100644 --- a/src/gui/windows/socialwindow.cpp +++ b/src/gui/windows/socialwindow.cpp @@ -75,10 +75,6 @@ SocialWindow::SocialWindow() : mCreatePopup(CREATEWIDGETR0(CreatePartyPopup)), // TRANSLATORS: social window button mCreateButton(new Button(this, _("Create"), "create", this)), - // TRANSLATORS: social window button - mInviteButton(new Button(this, _("Invite"), "invite", this)), - // TRANSLATORS: social window button - mLeaveButton(new Button(this, _("Leave"), "leave", this)), mCountLabel(new Label(this, "1000 / 1000")), mTabs(CREATEWIDGETR(TabbedArea, this)), mMap(nullptr), @@ -107,10 +103,8 @@ void SocialWindow::postInit() setupWindow->registerWindowForReset(this); place(0, 0, mCreateButton); - place(1, 0, mInviteButton); - place(2, 0, mLeaveButton); place(0, 1, mCountLabel); - place(0, 2, mTabs, 4, 4); + place(0, 2, mTabs, 2, 4); widgetResized(Event(nullptr)); @@ -583,12 +577,10 @@ void SocialWindow::resetDamage(const std::string &name) void SocialWindow::updateButtons() { - if (!mTabs) - return; +// if (!mTabs) +// return; - const bool hasTabs = mTabs->getNumberOfTabs() > 0; - mInviteButton->setEnabled(hasTabs); - mLeaveButton->setEnabled(hasTabs); +// const bool hasTabs = mTabs->getNumberOfTabs() > 0; } void SocialWindow::updatePortals() diff --git a/src/gui/windows/socialwindow.h b/src/gui/windows/socialwindow.h index b65ad02df..676ede11d 100644 --- a/src/gui/windows/socialwindow.h +++ b/src/gui/windows/socialwindow.h @@ -160,8 +160,6 @@ class SocialWindow final : public Window, CreatePartyPopup *mCreatePopup A_NONNULLPOINTER; Button *mCreateButton A_NONNULLPOINTER; - Button *mInviteButton A_NONNULLPOINTER; - Button *mLeaveButton A_NONNULLPOINTER; Label *mCountLabel A_NONNULLPOINTER; TabbedArea *mTabs A_NONNULLPOINTER; Map *mMap; -- cgit v1.2.3-70-g09d2