summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-29 01:08:33 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-29 12:56:42 +0300
commit5f048b85f826a85278545ac363d7058793fb3ece (patch)
tree08065744c9dbe0bcc428955c5187df17b88a70e2 /src/gui
parent7c74dc533ce120a27ac4b68acb1c5b2f6c5cc680 (diff)
downloadplus-5f048b85f826a85278545ac363d7058793fb3ece.tar.gz
plus-5f048b85f826a85278545ac363d7058793fb3ece.tar.bz2
plus-5f048b85f826a85278545ac363d7058793fb3ece.tar.xz
plus-5f048b85f826a85278545ac363d7058793fb3ece.zip
Move variables definition into each file with class definition.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/userpalette.cpp2
-rw-r--r--src/gui/viewport.cpp2
-rw-r--r--src/gui/widgets/tabs/battletab.cpp2
-rw-r--r--src/gui/widgets/tabs/chattab.cpp3
-rw-r--r--src/gui/widgets/tabs/gmtab.cpp2
-rw-r--r--src/gui/widgets/tabs/langtab.cpp2
-rw-r--r--src/gui/widgets/tabs/tradetab.cpp2
-rw-r--r--src/gui/windowmenu.cpp2
-rw-r--r--src/gui/windows/botcheckerwindow.cpp2
-rw-r--r--src/gui/windows/chatwindow.cpp2
-rw-r--r--src/gui/windows/debugwindow.cpp2
-rw-r--r--src/gui/windows/didyouknowwindow.cpp2
-rw-r--r--src/gui/windows/emotewindow.cpp1
-rw-r--r--src/gui/windows/equipmentwindow.cpp2
-rw-r--r--src/gui/windows/helpwindow.cpp2
-rw-r--r--src/gui/windows/inventorywindow.cpp1
-rw-r--r--src/gui/windows/killstats.cpp2
-rw-r--r--src/gui/windows/minimap.cpp1
-rw-r--r--src/gui/windows/ministatuswindow.cpp1
-rw-r--r--src/gui/windows/okdialog.cpp3
-rw-r--r--src/gui/windows/outfitwindow.cpp2
-rw-r--r--src/gui/windows/questswindow.cpp2
-rw-r--r--src/gui/windows/shopwindow.cpp1
-rw-r--r--src/gui/windows/shortcutwindow.cpp4
-rw-r--r--src/gui/windows/shortcutwindow.h5
-rw-r--r--src/gui/windows/skilldialog.cpp2
-rw-r--r--src/gui/windows/socialwindow.cpp1
-rw-r--r--src/gui/windows/statuswindow.cpp2
-rw-r--r--src/gui/windows/tradewindow.cpp2
-rw-r--r--src/gui/windows/whoisonline.cpp2
30 files changed, 59 insertions, 2 deletions
diff --git a/src/gui/userpalette.cpp b/src/gui/userpalette.cpp
index a1211477a..04b1c15d4 100644
--- a/src/gui/userpalette.cpp
+++ b/src/gui/userpalette.cpp
@@ -29,6 +29,8 @@
#include "debug.h"
+UserPalette *userPalette = nullptr;
+
const std::string ColorTypeNames[] =
{
"ColorBeing",
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index fbe056d2a..af199c42e 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -54,6 +54,8 @@
#include "debug.h"
+Viewport *viewport = nullptr;
+
extern volatile int tick_time;
extern MiniStatusWindow *miniStatusWindow;
diff --git a/src/gui/widgets/tabs/battletab.cpp b/src/gui/widgets/tabs/battletab.cpp
index 9d29c198e..176a24151 100644
--- a/src/gui/widgets/tabs/battletab.cpp
+++ b/src/gui/widgets/tabs/battletab.cpp
@@ -29,6 +29,8 @@
#include "debug.h"
+BattleTab *battleChatTab = nullptr;
+
BattleTab::BattleTab(const Widget2 *const widget) :
// TRANSLATORS: battle chat tab name
ChatTab(widget, _("Battle"), "")
diff --git a/src/gui/widgets/tabs/chattab.cpp b/src/gui/widgets/tabs/chattab.cpp
index 4f81d2aa7..893149a98 100644
--- a/src/gui/widgets/tabs/chattab.cpp
+++ b/src/gui/widgets/tabs/chattab.cpp
@@ -55,6 +55,9 @@
#include "debug.h"
+ChatTab *localChatTab = nullptr;
+ChatTab *debugChatTab = nullptr;
+
static const unsigned int MAX_WORD_SIZE = 50;
ChatTab::ChatTab(const Widget2 *const widget,
diff --git a/src/gui/widgets/tabs/gmtab.cpp b/src/gui/widgets/tabs/gmtab.cpp
index 7b6e1e07c..a4a4a9022 100644
--- a/src/gui/widgets/tabs/gmtab.cpp
+++ b/src/gui/widgets/tabs/gmtab.cpp
@@ -26,6 +26,8 @@
#include "debug.h"
+GmTab *gmChatTab = nullptr;
+
GmTab::GmTab(const Widget2 *const widget) :
// TRANSLATORS: gb tab name
ChatTab(widget, _("GM"), "")
diff --git a/src/gui/widgets/tabs/langtab.cpp b/src/gui/widgets/tabs/langtab.cpp
index f5064be8c..1dc5cea09 100644
--- a/src/gui/widgets/tabs/langtab.cpp
+++ b/src/gui/widgets/tabs/langtab.cpp
@@ -26,6 +26,8 @@
#include "debug.h"
+LangTab *langChatTab = nullptr;
+
LangTab::LangTab(const Widget2 *const widget,
const std::string &lang) :
// TRANSLATORS: lang chat tab name
diff --git a/src/gui/widgets/tabs/tradetab.cpp b/src/gui/widgets/tabs/tradetab.cpp
index 12fa0d3a5..1642f8804 100644
--- a/src/gui/widgets/tabs/tradetab.cpp
+++ b/src/gui/widgets/tabs/tradetab.cpp
@@ -30,6 +30,8 @@
#include "debug.h"
+TradeTab *tradeChatTab = nullptr;
+
TradeTab::TradeTab(const Widget2 *const widget) :
// TRANSLATORS: trade chat tab name
ChatTab(widget, _("Trade"), TRADE_CHANNEL)
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index a4908d2a6..35bd23ec7 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -45,6 +45,8 @@
#include "debug.h"
+WindowMenu *windowMenu = nullptr;
+
WindowMenu::WindowMenu(const Widget2 *const widget) :
Container(widget),
ActionListener(),
diff --git a/src/gui/windows/botcheckerwindow.cpp b/src/gui/windows/botcheckerwindow.cpp
index 292d18891..7f8ffe14c 100644
--- a/src/gui/windows/botcheckerwindow.cpp
+++ b/src/gui/windows/botcheckerwindow.cpp
@@ -36,6 +36,8 @@
#include "debug.h"
+BotCheckerWindow *botCheckerWindow = nullptr;
+
BotCheckerWindow::BotCheckerWindow() :
// TRANSLATORS: bot checker window header
Window(_("Bot Checker"), false, nullptr, "botchecker.xml"),
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 921d32fff..d92473977 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -85,6 +85,8 @@
#include "debug.h"
+ChatWindow *chatWindow = nullptr;
+
static const char *const ACTION_COLOR_PICKER = "color picker";
ChatWindow::ChatWindow() :
diff --git a/src/gui/windows/debugwindow.cpp b/src/gui/windows/debugwindow.cpp
index bcf51d023..c12fb962b 100644
--- a/src/gui/windows/debugwindow.cpp
+++ b/src/gui/windows/debugwindow.cpp
@@ -35,6 +35,8 @@
#include "debug.h"
+DebugWindow *debugWindow = nullptr;
+
DebugWindow::DebugWindow() :
// TRANSLATORS: debug window name
Window(_("Debug"), false, nullptr, "debug.xml"),
diff --git a/src/gui/windows/didyouknowwindow.cpp b/src/gui/windows/didyouknowwindow.cpp
index 09051e9c0..fc7294999 100644
--- a/src/gui/windows/didyouknowwindow.cpp
+++ b/src/gui/windows/didyouknowwindow.cpp
@@ -43,6 +43,8 @@
#include "debug.h"
+DidYouKnowWindow *didYouKnowWindow = nullptr;
+
static const int minTip = 1;
static const int maxTip = 18;
diff --git a/src/gui/windows/emotewindow.cpp b/src/gui/windows/emotewindow.cpp
index 713a6e567..d9e303012 100644
--- a/src/gui/windows/emotewindow.cpp
+++ b/src/gui/windows/emotewindow.cpp
@@ -36,6 +36,7 @@
#include "debug.h"
+EmoteWindow *emoteWindow = nullptr;
static const int fontSizeListSize = 2;
static const char *const fontSizeList[] =
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index 3cd1cd92e..22d7a8567 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -53,6 +53,8 @@
#include "debug.h"
+EquipmentWindow *equipmentWindow = nullptr;
+EquipmentWindow *beingEquipmentWindow = nullptr;
static const int BOX_COUNT = 13;
EquipmentWindow::EquipmentWindow(Equipment *const equipment,
diff --git a/src/gui/windows/helpwindow.cpp b/src/gui/windows/helpwindow.cpp
index e10900908..5e6b5ced2 100644
--- a/src/gui/windows/helpwindow.cpp
+++ b/src/gui/windows/helpwindow.cpp
@@ -47,6 +47,8 @@
#include "debug.h"
+HelpWindow *helpWindow = nullptr;
+
HelpWindow::HelpWindow() :
// TRANSLATORS: help window name
Window(_("Help"), false, nullptr, "help.xml"),
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 43e5112a0..a16543099 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -68,6 +68,7 @@
#include "debug.h"
+InventoryWindow *inventoryWindow = nullptr;
InventoryWindow::WindowList InventoryWindow::invInstances;
InventoryWindow::InventoryWindow(Inventory *const inventory) :
diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp
index 7bb0b7397..c266683f3 100644
--- a/src/gui/windows/killstats.cpp
+++ b/src/gui/windows/killstats.cpp
@@ -40,6 +40,8 @@
#include "debug.h"
+KillStats *killStats = nullptr;
+
KillStats::KillStats() :
// TRANSLATORS: kill stats window name
Window(_("Kill stats"), false, nullptr, "killstats.xml"),
diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp
index 5df1b60ce..928098fea 100644
--- a/src/gui/windows/minimap.cpp
+++ b/src/gui/windows/minimap.cpp
@@ -49,6 +49,7 @@
#include "debug.h"
+Minimap *minimap = nullptr;
bool Minimap::mShow = true;
Minimap::Minimap() :
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index 4417ff2fc..7196a8df7 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -51,6 +51,7 @@
#include "debug.h"
+MiniStatusWindow *miniStatusWindow = nullptr;
extern volatile int tick_time;
typedef std::vector <ProgressBar*>::const_iterator ProgressBarVectorCIter;
diff --git a/src/gui/windows/okdialog.cpp b/src/gui/windows/okdialog.cpp
index bf8a64026..bdb41e6a1 100644
--- a/src/gui/windows/okdialog.cpp
+++ b/src/gui/windows/okdialog.cpp
@@ -34,6 +34,9 @@
#include "debug.h"
+OkDialog *weightNotice = nullptr;
+OkDialog *deathNotice = nullptr;
+
OkDialog::OkDialog(const std::string &restrict title,
const std::string &restrict msg,
const int soundEvent, const bool modal,
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index 60030fbd3..b2b62192a 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -49,6 +49,8 @@
#include "debug.h"
+OutfitWindow *outfitWindow = nullptr;
+
OutfitWindow::OutfitWindow() :
// TRANSLATORS: outfits window name
Window(_("Outfits"), false, nullptr, "outfits.xml"),
diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp
index 2e4ce2693..3985c3129 100644
--- a/src/gui/windows/questswindow.cpp
+++ b/src/gui/windows/questswindow.cpp
@@ -56,6 +56,8 @@
#include "debug.h"
+QuestsWindow *questsWindow = nullptr;
+
QuestsWindow::QuestsWindow() :
// TRANSLATORS: quests window name
Window(_("Quests"), false, nullptr, "quests.xml"),
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 51d102972..84af6355c 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -72,6 +72,7 @@
#include "debug.h"
+ShopWindow *shopWindow = nullptr;
extern std::string tradePartnerName;
ShopWindow::DialogList ShopWindow::instances;
diff --git a/src/gui/windows/shortcutwindow.cpp b/src/gui/windows/shortcutwindow.cpp
index 20fcdd0a0..26bd4b89e 100644
--- a/src/gui/windows/shortcutwindow.cpp
+++ b/src/gui/windows/shortcutwindow.cpp
@@ -36,6 +36,10 @@
#include "debug.h"
+ShortcutWindow *dropShortcutWindow = nullptr;
+ShortcutWindow *emoteShortcutWindow = nullptr;
+ShortcutWindow *itemShortcutWindow = nullptr;
+ShortcutWindow *spellShortcutWindow = nullptr;
static const int SCROLL_PADDING = 0;
int ShortcutWindow::mBoxesWidth = 0;
diff --git a/src/gui/windows/shortcutwindow.h b/src/gui/windows/shortcutwindow.h
index 9a447d05c..6a585745a 100644
--- a/src/gui/windows/shortcutwindow.h
+++ b/src/gui/windows/shortcutwindow.h
@@ -87,8 +87,9 @@ class ShortcutWindow final : public Window
static int mBoxesWidth;
};
-extern ShortcutWindow *itemShortcutWindow;
-extern ShortcutWindow *emoteShortcutWindow;
extern ShortcutWindow *dropShortcutWindow;
+extern ShortcutWindow *emoteShortcutWindow;
+extern ShortcutWindow *itemShortcutWindow;
+extern ShortcutWindow *spellShortcutWindow;
#endif // GUI_WINDOWS_SHORTCUTWINDOW_H
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 64bcdf137..fa71386a6 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -54,6 +54,8 @@
#include "debug.h"
+SkillDialog *skillDialog = nullptr;
+
SkillDialog::SkillDialog() :
// TRANSLATORS: skills dialog name
Window(_("Skills"), false, nullptr, "skills.xml"),
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index 7b0aa849a..d5ef89d0c 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -52,6 +52,7 @@
#include "debug.h"
+SocialWindow *socialWindow = nullptr;
extern unsigned int tmwServerVersion;
SocialWindow::SocialWindow() :
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 00c5c5c2f..4a4c82cf6 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -60,6 +60,8 @@
#include "debug.h"
+StatusWindow *statusWindow = nullptr;
+
StatusWindow::StatusWindow() :
Window(player_node ? player_node->getName() :
"?", false, nullptr, "status.xml"),
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index eaef2026b..1fccb0c0b 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -58,6 +58,8 @@
#include "debug.h"
+TradeWindow *tradeWindow = nullptr;
+
// TRANSLATORS: trade window button
#define CAPTION_PROPOSE _("Propose trade")
// TRANSLATORS: trade window button
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index 9d0f64b5a..0cb2fd5d5 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -67,6 +67,8 @@
#undef malloc
#endif
+WhoIsOnline *whoIsOnline = nullptr;
+
namespace
{
class NameFunctuator final