summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-08-30 16:38:36 +0200
committerPhilipp Sehmisch <crush@themanaworld.org>2009-08-30 16:38:36 +0200
commitab0d3af8a9ff299ed766f17eef2e662de41c4d69 (patch)
tree07c52f86428792351af86df80565ddf3219fc277 /src
parentc9181484b53f5b1a05a8a952f88416fd7d095d67 (diff)
parent03e5eaec783ed1519a7552cc69a0a2d3cf5ccf0c (diff)
downloadmana-client-ab0d3af8a9ff299ed766f17eef2e662de41c4d69.tar.gz
mana-client-ab0d3af8a9ff299ed766f17eef2e662de41c4d69.tar.bz2
mana-client-ab0d3af8a9ff299ed766f17eef2e662de41c4d69.tar.xz
mana-client-ab0d3af8a9ff299ed766f17eef2e662de41c4d69.zip
Merge branch 'master' of git@gitorious.org:tmw/mainline
Diffstat (limited to 'src')
-rw-r--r--src/gui/chat.cpp2
-rw-r--r--src/gui/widgets/tabbedarea.cpp14
-rw-r--r--src/gui/widgets/tabbedarea.h3
-rw-r--r--src/main.cpp3
-rw-r--r--src/net/ea/beinghandler.cpp3
5 files changed, 17 insertions, 8 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index f1814d93..c0597a64 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -453,7 +453,7 @@ void ChatWindow::whisper(const std::string &nick,
if (i != mWhispers.end())
tab = i->second;
- else if (config.getValue("whispertab", false))
+ else if (config.getValue("whispertab", true))
tab = addWhisperTab(nick);
if (tab)
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 13bb884b..dd2e62dd 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -28,6 +28,8 @@ TabbedArea::TabbedArea() : gcn::TabbedArea()
{
mWidgetContainer->setOpaque(false);
addWidgetListener(this);
+
+ widgetResized(NULL);
}
int TabbedArea::getNumberOfTabs() const
@@ -161,14 +163,20 @@ void TabbedArea::setSelectedTab(gcn::Tab *tab)
if (newTab)
newTab->setCurrent();
+
+ widgetResized(NULL);
}
void TabbedArea::widgetResized(const gcn::Event &event)
{
- int width = getWidth() - 2 * getFrameSize();
- int height = getHeight() - 2 * getFrameSize() - mTabContainer->getHeight();
+ int width = getWidth() - 2 * getFrameSize()
+ - 2 * mWidgetContainer->getFrameSize();
+ int height = getHeight() - 2 * getFrameSize() - mWidgetContainer->getY()
+ - 2 * mWidgetContainer->getFrameSize();
mWidgetContainer->setSize(width, height);
+
gcn::Widget *w = getCurrentWidget();
if (w)
- w->setSize(width, height);
+ w->setSize(width,
+ height);
}
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index a64d855f..7944b5d5 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -101,8 +101,7 @@ class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener
int getContainerHeight() const
{ return mWidgetContainer->getHeight(); }
- void setSelectedTab(unsigned int index)
- { gcn::TabbedArea::setSelectedTab(index); }
+ using gcn::TabbedArea::setSelectedTab;
void setSelectedTab(gcn::Tab *tab);
diff --git a/src/main.cpp b/src/main.cpp
index 10145dfc..63ba2241 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1575,6 +1575,9 @@ int main(int argc, char *argv[])
}
delete guiPalette;
+#ifdef EATHENA_SUPPORT
+ delete network;
+#endif
logger->log("Quitting");
exitEngine();
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index 29c10900..80e9b350 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -543,8 +543,7 @@ void BeingHandler::handleMessage(MessageIn &msg)
gmstatus = msg.readInt16();
if (gmstatus & 0x80)
- if (Player *player = dynamic_cast<Player*>(dstBeing))
- player->setGM(true);
+ player->setGM(true);
if (msg.getId() == SMSG_PLAYER_UPDATE_1)
{