From 215ce3e68738159ec98056874a4ad86e451418d0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 18 Aug 2016 19:34:39 +0300 Subject: Remove unuse event handlers in socialwindow. --- src/gui/windows/socialwindow.cpp | 64 ---------------------------------------- src/gui/windows/socialwindow.h | 1 - 2 files changed, 65 deletions(-) (limited to 'src/gui') diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp index f9e13ca98..2d53536bd 100644 --- a/src/gui/windows/socialwindow.cpp +++ b/src/gui/windows/socialwindow.cpp @@ -59,7 +59,6 @@ SocialWindow::SocialWindow() : mGuilds(), mParties(), mPartyAcceptDialog(nullptr), - mPartyCreateDialog(nullptr), mAttackFilter(nullptr), mPickupFilter(nullptr), // TRANSLATORS: here P is title for visible players tab in social window @@ -323,69 +322,6 @@ void SocialWindow::action(const ActionEvent &event) mGuildInvited = 0; mGuildAcceptDialog = nullptr; } - else if (eventId == "invite" && mTabs->getSelectedTabIndex() > -1) - { - if (mTabs->getSelectedTab()) - static_cast(mTabs->getSelectedTab())->invite(); - } - else if (eventId == "leave" && mTabs->getSelectedTabIndex() > -1) - { - if (mTabs->getSelectedTab()) - static_cast(mTabs->getSelectedTab())->leave(); - } - else if (eventId == "create guild") - { - if (!serverFeatures->haveNativeGuilds()) - return; - - if (!mGuildCreateDialog) - return; - - std::string name = mGuildCreateDialog->getText(); - - if (name.size() > 16) - return; - - guildHandler->create(name); - if (localChatTab) - { - // TRANSLATORS: chat message - localChatTab->chatLog(strprintf(_("Creating guild called %s."), - name.c_str()), - ChatMsgType::BY_SERVER); - } - - mGuildCreateDialog = nullptr; - } - else if (eventId == "~create guild") - { - mGuildCreateDialog = nullptr; - } - else if (eventId == "create party") - { - if (!mPartyCreateDialog) - return; - - std::string name = mPartyCreateDialog->getText(); - - if (name.size() > 24) - return; - - partyHandler->create(name); - if (localChatTab) - { - // TRANSLATORS: chat message - localChatTab->chatLog(strprintf(_("Creating party called %s."), - name.c_str()), - ChatMsgType::BY_SERVER); - } - - mPartyCreateDialog = nullptr; - } - else if (eventId == "~create party") - { - mPartyCreateDialog = nullptr; - } } void SocialWindow::showGuildInvite(const std::string &restrict guildName, diff --git a/src/gui/windows/socialwindow.h b/src/gui/windows/socialwindow.h index 19932219e..b2bd1409f 100644 --- a/src/gui/windows/socialwindow.h +++ b/src/gui/windows/socialwindow.h @@ -144,7 +144,6 @@ class SocialWindow final : public Window, PartyMap mParties; ConfirmDialog *mPartyAcceptDialog; - TextDialog *mPartyCreateDialog; SocialTab *mAttackFilter; SocialTab *mPickupFilter; -- cgit v1.2.3-60-g2f50