summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-19 01:18:16 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-20 00:49:07 +0300
commit26f9aad24bc50d4e9fd161d185df049c9e7a62cf (patch)
treed8fd87aef6395b5a4704e9570fcbcddcc8ccca83 /src/gui/windows
parent50b5afdb7e68cdec8f77020b578dc3f6874933bb (diff)
downloadmanaverse-26f9aad24bc50d4e9fd161d185df049c9e7a62cf.tar.gz
manaverse-26f9aad24bc50d4e9fd161d185df049c9e7a62cf.tar.bz2
manaverse-26f9aad24bc50d4e9fd161d185df049c9e7a62cf.tar.xz
manaverse-26f9aad24bc50d4e9fd161d185df049c9e7a62cf.zip
improve includes.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/buydialog.h1
-rw-r--r--src/gui/windows/charcreatedialog.cpp1
-rw-r--r--src/gui/windows/charcreatedialog.h4
-rw-r--r--src/gui/windows/charselectdialog.cpp1
-rw-r--r--src/gui/windows/charselectdialog.h1
-rw-r--r--src/gui/windows/chatwindow.cpp3
-rw-r--r--src/gui/windows/didyouknowwindow.cpp5
-rw-r--r--src/gui/windows/helpwindow.cpp5
-rw-r--r--src/gui/windows/inventorywindow.cpp3
-rw-r--r--src/gui/windows/inventorywindow.h1
-rw-r--r--src/gui/windows/itemamountwindow.cpp2
-rw-r--r--src/gui/windows/npcdialog.h1
-rw-r--r--src/gui/windows/questswindow.cpp3
-rw-r--r--src/gui/windows/serverdialog.cpp4
-rw-r--r--src/gui/windows/serverdialog.h2
-rw-r--r--src/gui/windows/setupwindow.cpp1
-rw-r--r--src/gui/windows/textcommandeditor.cpp2
-rw-r--r--src/gui/windows/tradewindow.cpp1
18 files changed, 27 insertions, 14 deletions
diff --git a/src/gui/windows/buydialog.h b/src/gui/windows/buydialog.h
index 500f378ef..aa163d5d0 100644
--- a/src/gui/windows/buydialog.h
+++ b/src/gui/windows/buydialog.h
@@ -35,7 +35,6 @@ class ShopListBox;
class SortListModelBuy;
class IntTextField;
class Label;
-class ListBox;
class ScrollArea;
class Slider;
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index d6b572d40..fb407b9cc 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -31,6 +31,7 @@
#include "gui/windows/okdialog.h"
#include "gui/widgets/button.h"
+#include "gui/windows/charselectdialog.h"
#include "gui/widgets/label.h"
#include "gui/widgets/playerbox.h"
#include "gui/widgets/radiobutton.h"
diff --git a/src/gui/windows/charcreatedialog.h b/src/gui/windows/charcreatedialog.h
index 123d826f2..12ddf7970 100644
--- a/src/gui/windows/charcreatedialog.h
+++ b/src/gui/windows/charcreatedialog.h
@@ -25,11 +25,13 @@
#include "being/being.h"
-#include "gui/windows/charselectdialog.h"
+#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
#include "listeners/keylistener.h"
+class Button;
+class CharSelectDialog;
class Label;
class PlayerBox;
class RadioButton;
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 7c6e387a4..12a78ce10 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -44,6 +44,7 @@
#include "net/logindata.h"
#include "net/loginhandler.h"
+#include "net/net.h"
#include "utils/gettext.h"
diff --git a/src/gui/windows/charselectdialog.h b/src/gui/windows/charselectdialog.h
index 348811ee3..38c307f30 100644
--- a/src/gui/windows/charselectdialog.h
+++ b/src/gui/windows/charselectdialog.h
@@ -35,7 +35,6 @@
class Button;
class CharacterDisplay;
class CharacterViewBase;
-class Label;
class LoginData;
class TextDialog;
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 45a76495b..565d3644a 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -40,8 +40,7 @@
#include "input/inputmanager.h"
#include "gui/focushandler.h"
-#include "gui/font.h"
-#include "gui/sdlinput.h"
+#include "gui/gui.h"
#include "gui/viewport.h"
#include "gui/windows/emotewindow.h"
diff --git a/src/gui/windows/didyouknowwindow.cpp b/src/gui/windows/didyouknowwindow.cpp
index 95d657772..79ad4c208 100644
--- a/src/gui/windows/didyouknowwindow.cpp
+++ b/src/gui/windows/didyouknowwindow.cpp
@@ -24,7 +24,7 @@
#include "configuration.h"
-#include "gui/font.h"
+#include "gui/gui.h"
#include "gui/windows/setupwindow.h"
@@ -78,7 +78,8 @@ DidYouKnowWindow::DidYouKnowWindow() :
Button *const okButton = new Button(this, _("Close"), "close", this);
mBrowserBox->setLinkHandler(this);
- mBrowserBox->setFont(gui->getHelpFont());
+ if (gui)
+ mBrowserBox->setFont(gui->getHelpFont());
mBrowserBox->setProcessVersion(true);
mBrowserBox->setEnableImages(true);
mBrowserBox->setEnableKeys(true);
diff --git a/src/gui/windows/helpwindow.cpp b/src/gui/windows/helpwindow.cpp
index 7457c7b1e..fa9963217 100644
--- a/src/gui/windows/helpwindow.cpp
+++ b/src/gui/windows/helpwindow.cpp
@@ -24,7 +24,7 @@
#include "configuration.h"
-#include "gui/font.h"
+#include "gui/gui.h"
#include "gui/windows/didyouknowwindow.h"
#include "gui/windows/setupwindow.h"
@@ -73,7 +73,8 @@ HelpWindow::HelpWindow() :
mBrowserBox->setOpaque(false);
mBrowserBox->setLinkHandler(this);
- mBrowserBox->setFont(gui->getHelpFont());
+ if (gui)
+ mBrowserBox->setFont(gui->getHelpFont());
mBrowserBox->setProcessVersion(true);
mBrowserBox->setEnableImages(true);
mBrowserBox->setEnableKeys(true);
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index bc66f588c..603b1b26d 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -33,8 +33,11 @@
#include "input/inputmanager.h"
#include "gui/font.h"
+#include "gui/gui.h"
#include "gui/viewport.h"
+#include "gui/base/listmodel.hpp"
+
#include "gui/popups/textpopup.h"
#include "gui/windows/equipmentwindow.h"
diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h
index 6a6999034..c81e83d77 100644
--- a/src/gui/windows/inventorywindow.h
+++ b/src/gui/windows/inventorywindow.h
@@ -37,7 +37,6 @@ class Button;
class DropDown;
class Item;
class ItemContainer;
-class Label;
class LayoutCell;
class ProgressBar;
class SortListModelInv;
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index 8e981ae96..c63157e27 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -33,6 +33,8 @@
#include "net/net.h"
#include "gui/viewport.h"
+#include "gui/base/listmodel.hpp"
+
#include "gui/popups/itempopup.h"
#include "gui/windows/shopwindow.h"
diff --git a/src/gui/windows/npcdialog.h b/src/gui/windows/npcdialog.h
index b7b036659..b9fa1aab8 100644
--- a/src/gui/windows/npcdialog.h
+++ b/src/gui/windows/npcdialog.h
@@ -45,7 +45,6 @@ class ItemContainer;
class NpcDialog;
class PlayerBox;
class ScrollArea;
-class TextBox;
class TextField;
typedef std::map<int, NpcDialog*> NpcDialogs;
diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp
index 1a8749899..d62ca36ad 100644
--- a/src/gui/windows/questswindow.cpp
+++ b/src/gui/windows/questswindow.cpp
@@ -27,6 +27,7 @@
#include "being/localplayer.h"
#include "gui/font.h"
+#include "gui/gui.h"
#include "gui/widgets/browserbox.h"
#include "gui/widgets/button.h"
@@ -166,7 +167,7 @@ QuestsWindow::QuestsWindow() :
mText->setLinkHandler(mItemLinkHandler);
mTextScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mQuestsListBox->setWidth(500);
- if (gui->getNpcFont()->getHeight() < 20)
+ if (gui && gui->getNpcFont()->getHeight() < 20)
mQuestsListBox->setRowHeight(20);
else
mQuestsListBox->setRowHeight(gui->getNpcFont()->getHeight());
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index 6823c2649..a06257b10 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -32,7 +32,9 @@
#include "input/keydata.h"
#include "gui/font.h"
+#include "gui/gui.h"
+#include "gui/widgets/checkbox.h"
#include "gui/windows/editserverdialog.h"
#include "gui/windows/logindialog.h"
@@ -132,7 +134,7 @@ void ServersListModel::setVersionString(const int index,
if (index < 0 || index >= static_cast<int>(mVersionStrings.size()))
return;
- if (version.empty())
+ if (version.empty() || !gui)
{
mVersionStrings[index] = VersionString(0, "");
}
diff --git a/src/gui/windows/serverdialog.h b/src/gui/windows/serverdialog.h
index 112c8001d..3f63562f7 100644
--- a/src/gui/windows/serverdialog.h
+++ b/src/gui/windows/serverdialog.h
@@ -24,7 +24,6 @@
#define GUI_WINDOWS_SERVERDIALOG_H
#include "gui/widgets/window.h"
-#include "gui/widgets/checkbox.h"
#include "net/download.h"
#include "net/serverinfo.h"
@@ -41,6 +40,7 @@
#include <vector>
class Button;
+class CheckBox;
class Label;
class ListBox;
class ServerDialog;
diff --git a/src/gui/windows/setupwindow.cpp b/src/gui/windows/setupwindow.cpp
index a996d776b..9878807d9 100644
--- a/src/gui/windows/setupwindow.cpp
+++ b/src/gui/windows/setupwindow.cpp
@@ -44,6 +44,7 @@
#include "gui/widgets/tabs/setup_video.h"
#include "gui/widgets/tabs/setup_visual.h"
+#include "gui/widgets/button.h"
#include "gui/widgets/label.h"
#include "gui/widgets/tabbedarea.h"
diff --git a/src/gui/windows/textcommandeditor.cpp b/src/gui/windows/textcommandeditor.cpp
index 98b9cae60..82d1c9ef6 100644
--- a/src/gui/windows/textcommandeditor.cpp
+++ b/src/gui/windows/textcommandeditor.cpp
@@ -27,6 +27,8 @@
#include "input/keyboardconfig.h"
+#include "gui/base/listmodel.hpp"
+
#include "gui/widgets/button.h"
#include "gui/widgets/dropdown.h"
#include "gui/widgets/inttextfield.h"
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 25d077d5d..7fe1a1e36 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -32,6 +32,7 @@
#include "being/playerrelations.h"
#include "gui/font.h"
+#include "gui/gui.h"
#include "gui/windows/inventorywindow.h"
#include "gui/windows/itemamountwindow.h"