summaryrefslogtreecommitdiff
path: root/src/gui/guildwindow.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-04-18 15:23:49 +0000
committerDavid Athay <ko2fan@gmail.com>2008-04-18 15:23:49 +0000
commit4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76 (patch)
tree831d9d2e909dabab0ee2c6ed640e290ee28ad294 /src/gui/guildwindow.cpp
parent0b567928c0a24c7346451b59285ce8144ae0bf2e (diff)
downloadmana-client-4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76.tar.gz
mana-client-4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76.tar.bz2
mana-client-4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76.tar.xz
mana-client-4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76.zip
Fixed numerous crashes with chat and guild windows using new tabbed area.
Diffstat (limited to 'src/gui/guildwindow.cpp')
-rw-r--r--src/gui/guildwindow.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/gui/guildwindow.cpp b/src/gui/guildwindow.cpp
index 2a4de773..e982487c 100644
--- a/src/gui/guildwindow.cpp
+++ b/src/gui/guildwindow.cpp
@@ -86,7 +86,7 @@ void GuildWindow::update()
{
updateTab();
- if (mGuildButton[2]->isEnabled()&& mGuildTabs->getNumberOfTabs() <= 0)
+ if (mGuildButton[2]->isEnabled() && mGuildTabs->getNumberOfTabs() <= 0)
{
mGuildButton[2]->setEnabled(false);
mGuildButton[1]->setEnabled(false);
@@ -107,14 +107,6 @@ void GuildWindow::action(const gcn::ActionEvent &event)
// Stats Part
if (eventId == "CREATE_GUILD")
{
- if (mGuildTabs->getNumberOfTabs() > 1)
- {
- // This is just to limit the number of guild tabs that are created
- // TODO: Either limit this server side, or fix the interface issue
- chatWindow->chatLog("Current maximum number of guilds ownable is 2", BY_SERVER);
- return;
- }
-
// Set focus so that guild name to be created can be typed.
mFocus = true;
guildDialog = new TextDialog("Guild Name", "Choose your guild's name", this);
@@ -123,7 +115,7 @@ void GuildWindow::action(const gcn::ActionEvent &event)
}
else if (eventId == "INVITE_USER")
{
- // TODO - Process Invite User button clicked
+ // TODO - Give feedback on whether the invite succeeded
mFocus = true;
inviteDialog = new TextDialog("Member Invite", "Who would you like to invite?", this);
inviteDialog->setOKButtonActionId("INVITE_USER_OK");
@@ -261,7 +253,10 @@ void GuildWindow::removeTab(int guildId)
if (guild)
{
gcn::Tab *tab = mGuildTabs->getTab(guild->getName());
- mGuildTabs->removeTab(tab);
+ if (tab)
+ {
+ mGuildTabs->removeTab(tab);
+ }
updateTab();
}
mGuildTabs->logic();