diff options
author | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-08-25 20:38:06 +0200 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-08-25 12:59:25 -0600 |
commit | 627e1271f0ac2e7bd95a83f521ecbcf1b554ba80 (patch) | |
tree | 5071591268bdfa40add8a07b859fb1bf4d123db4 /src/gui/socialwindow.cpp | |
parent | 38474d0c3c14cf595aed61ee1e4a69d48abbcf92 (diff) | |
download | mana-627e1271f0ac2e7bd95a83f521ecbcf1b554ba80.tar.gz mana-627e1271f0ac2e7bd95a83f521ecbcf1b554ba80.tar.bz2 mana-627e1271f0ac2e7bd95a83f521ecbcf1b554ba80.tar.xz mana-627e1271f0ac2e7bd95a83f521ecbcf1b554ba80.zip |
Adding autoComplete for invite
Signed-off-by: Jared Adams <jaxad0127@gmail.com>
Diffstat (limited to 'src/gui/socialwindow.cpp')
-rw-r--r-- | src/gui/socialwindow.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index 7a13f96b..3d8afa44 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -121,12 +121,16 @@ public: if (event.getId() == "do invite") { std::string name = mInviteDialog->getText(); - Net::getGuildHandler()->invite(mGuild->getId(), name); - localChatTab->chatLog(strprintf(_("Invited user %s to guild %s."), + if (!name.empty()) + { + Net::getGuildHandler()->invite(mGuild->getId(), name); + localChatTab->chatLog(strprintf(_("Invited user %s to guild %s."), name.c_str(), mGuild->getName().c_str()), BY_SERVER); + } + mInviteDialog = NULL; } else if (event.getId() == "~do invite") @@ -153,7 +157,7 @@ protected: mInviteDialog = new TextDialog(_("Member Invite to Guild"), strprintf(_("Who would you like to invite to guild %s?"), mGuild->getName().c_str()), - socialWindow); + socialWindow, true); mInviteDialog->setActionEventId("do invite"); mInviteDialog->addActionListener(this); } @@ -202,7 +206,10 @@ public: if (event.getId() == "do invite") { std::string name = mInviteDialog->getText(); - Net::getPartyHandler()->invite(name); + + if (!name.empty()) + Net::getPartyHandler()->invite(name); + mInviteDialog = NULL; } else if (event.getId() == "~do invite") @@ -229,7 +236,7 @@ protected: mInviteDialog = new TextDialog(_("Member Invite to Party"), strprintf(_("Who would you like to invite to party %s?"), mParty->getName().c_str()), - socialWindow); + socialWindow, true); mInviteDialog->setActionEventId("do invite"); mInviteDialog->addActionListener(this); } |