summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-15 23:14:41 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-15 23:14:41 +0300
commit9502e9c968fac129ab57d7b0496c874086995b04 (patch)
tree3709ed6883222be555d39f7a606b674fb67ebb52
parente3ec854f275cc6f79129bbdd3129be277100908f (diff)
downloadplus-9502e9c968fac129ab57d7b0496c874086995b04.tar.gz
plus-9502e9c968fac129ab57d7b0496c874086995b04.tar.bz2
plus-9502e9c968fac129ab57d7b0496c874086995b04.tar.xz
plus-9502e9c968fac129ab57d7b0496c874086995b04.zip
move actionlistener from base into listeners.
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/Makefile.am2
-rw-r--r--src/being/localplayer.h4
-rw-r--r--src/client.cpp6
-rw-r--r--src/client.h7
-rw-r--r--src/gui/base/widget.cpp2
-rw-r--r--src/gui/base/widget.hpp2
-rw-r--r--src/gui/popups/popupmenu.cpp2
-rw-r--r--src/gui/popups/popupmenu.h6
-rw-r--r--src/gui/widgets/button.cpp8
-rw-r--r--src/gui/widgets/button.h8
-rw-r--r--src/gui/widgets/characterviewbase.h6
-rw-r--r--src/gui/widgets/checkbox.cpp2
-rw-r--r--src/gui/widgets/checkbox.h2
-rw-r--r--src/gui/widgets/dropdown.cpp4
-rw-r--r--src/gui/widgets/dropdown.h7
-rw-r--r--src/gui/widgets/guitable.cpp6
-rw-r--r--src/gui/widgets/itemlinkhandler.cpp4
-rw-r--r--src/gui/widgets/setupitem.cpp4
-rw-r--r--src/gui/widgets/setupitem.h4
-rw-r--r--src/gui/widgets/sliderlist.cpp4
-rw-r--r--src/gui/widgets/sliderlist.h7
-rw-r--r--src/gui/widgets/tabbedarea.cpp2
-rw-r--r--src/gui/widgets/tabbedarea.h5
-rw-r--r--src/gui/widgets/tabs/setuptab.cpp2
-rw-r--r--src/gui/widgets/tabs/setuptab.h4
-rw-r--r--src/gui/widgets/textfield.cpp2
-rw-r--r--src/gui/widgets/textfield.h2
-rw-r--r--src/gui/widgets/widgetgroup.cpp2
-rw-r--r--src/gui/widgets/widgetgroup.h4
-rw-r--r--src/gui/windowmenu.cpp2
-rw-r--r--src/gui/windowmenu.h4
-rw-r--r--src/gui/windows/botcheckerwindow.cpp2
-rw-r--r--src/gui/windows/botcheckerwindow.h4
-rw-r--r--src/gui/windows/buydialog.cpp6
-rw-r--r--src/gui/windows/buydialog.h4
-rw-r--r--src/gui/windows/buyselldialog.cpp4
-rw-r--r--src/gui/windows/buyselldialog.h5
-rw-r--r--src/gui/windows/changeemaildialog.cpp2
-rw-r--r--src/gui/windows/changeemaildialog.h5
-rw-r--r--src/gui/windows/changepassworddialog.cpp2
-rw-r--r--src/gui/windows/changepassworddialog.h5
-rw-r--r--src/gui/windows/charcreatedialog.cpp2
-rw-r--r--src/gui/windows/charcreatedialog.h4
-rw-r--r--src/gui/windows/charselectdialog.cpp2
-rw-r--r--src/gui/windows/charselectdialog.h4
-rw-r--r--src/gui/windows/chatwindow.cpp2
-rw-r--r--src/gui/windows/chatwindow.h4
-rw-r--r--src/gui/windows/confirmdialog.cpp2
-rw-r--r--src/gui/windows/confirmdialog.h5
-rw-r--r--src/gui/windows/connectiondialog.cpp2
-rw-r--r--src/gui/windows/connectiondialog.h5
-rw-r--r--src/gui/windows/didyouknowwindow.cpp2
-rw-r--r--src/gui/windows/didyouknowwindow.h4
-rw-r--r--src/gui/windows/editdialog.cpp2
-rw-r--r--src/gui/windows/editdialog.h5
-rw-r--r--src/gui/windows/editserverdialog.cpp2
-rw-r--r--src/gui/windows/editserverdialog.h5
-rw-r--r--src/gui/windows/emotewindow.cpp2
-rw-r--r--src/gui/windows/emotewindow.h2
-rw-r--r--src/gui/windows/equipmentwindow.cpp2
-rw-r--r--src/gui/windows/equipmentwindow.h5
-rw-r--r--src/gui/windows/helpwindow.cpp2
-rw-r--r--src/gui/windows/helpwindow.h7
-rw-r--r--src/gui/windows/inventorywindow.cpp2
-rw-r--r--src/gui/windows/inventorywindow.h4
-rw-r--r--src/gui/windows/itemamountwindow.cpp2
-rw-r--r--src/gui/windows/itemamountwindow.h4
-rw-r--r--src/gui/windows/killstats.cpp2
-rw-r--r--src/gui/windows/killstats.h5
-rw-r--r--src/gui/windows/logindialog.cpp6
-rw-r--r--src/gui/windows/logindialog.h5
-rw-r--r--src/gui/windows/npcdialog.cpp2
-rw-r--r--src/gui/windows/npcdialog.h4
-rw-r--r--src/gui/windows/npcpostdialog.cpp2
-rw-r--r--src/gui/windows/npcpostdialog.h4
-rw-r--r--src/gui/windows/okdialog.cpp2
-rw-r--r--src/gui/windows/okdialog.h4
-rw-r--r--src/gui/windows/outfitwindow.cpp2
-rw-r--r--src/gui/windows/outfitwindow.h4
-rw-r--r--src/gui/windows/questswindow.cpp2
-rw-r--r--src/gui/windows/questswindow.h4
-rw-r--r--src/gui/windows/quitdialog.cpp2
-rw-r--r--src/gui/windows/quitdialog.h5
-rw-r--r--src/gui/windows/registerdialog.cpp4
-rw-r--r--src/gui/windows/registerdialog.h6
-rw-r--r--src/gui/windows/selldialog.cpp4
-rw-r--r--src/gui/windows/selldialog.h4
-rw-r--r--src/gui/windows/serverdialog.cpp2
-rw-r--r--src/gui/windows/serverdialog.h4
-rw-r--r--src/gui/windows/setupwindow.cpp2
-rw-r--r--src/gui/windows/setupwindow.h4
-rw-r--r--src/gui/windows/shopwindow.cpp2
-rw-r--r--src/gui/windows/shopwindow.h4
-rw-r--r--src/gui/windows/skilldialog.cpp2
-rw-r--r--src/gui/windows/skilldialog.h5
-rw-r--r--src/gui/windows/socialwindow.cpp14
-rw-r--r--src/gui/windows/socialwindow.h4
-rw-r--r--src/gui/windows/statuswindow.cpp6
-rw-r--r--src/gui/windows/statuswindow.h4
-rw-r--r--src/gui/windows/textcommandeditor.cpp2
-rw-r--r--src/gui/windows/textcommandeditor.h5
-rw-r--r--src/gui/windows/textdialog.cpp2
-rw-r--r--src/gui/windows/textdialog.h5
-rw-r--r--src/gui/windows/tradewindow.cpp2
-rw-r--r--src/gui/windows/tradewindow.h4
-rw-r--r--src/gui/windows/unregisterdialog.cpp2
-rw-r--r--src/gui/windows/unregisterdialog.h5
-rw-r--r--src/gui/windows/updaterwindow.cpp2
-rw-r--r--src/gui/windows/updaterwindow.h4
-rw-r--r--src/gui/windows/whoisonline.h4
-rw-r--r--src/gui/windows/worldselectdialog.cpp2
-rw-r--r--src/gui/windows/worldselectdialog.h5
-rw-r--r--src/listeners/actionlistener.h (renamed from src/gui/base/actionlistener.hpp)59
-rw-r--r--src/net/ea/playerhandler.cpp4
-rw-r--r--src/net/ea/tradehandler.cpp2
116 files changed, 251 insertions, 235 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 042ed6af6..fccf99fb6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -770,7 +770,7 @@ SET(SRCS
walklayer.cpp
walklayer.h
gui/base/actionevent.hpp
- gui/base/actionlistener.hpp
+ listeners/actionlistener.h
gui/base/basiccontainer.hpp
gui/base/cliprectangle.hpp
gui/base/color.hpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 4aa93893f..422b08586 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -157,7 +157,7 @@ endif
endif
manaplus_SOURCES += gui/base/actionevent.hpp \
- gui/base/actionlistener.hpp \
+ listeners/actionlistener.h \
gui/base/basiccontainer.hpp \
gui/base/cliprectangle.hpp \
gui/base/color.hpp \
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index 16c317bab..f43cfe0bb 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -30,7 +30,7 @@
#include "gui/userpalette.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include <vector>
@@ -41,7 +41,7 @@ class FloorItem;
class Map;
class OkDialog;
-class AwayListener final : public gcn::ActionListener
+class AwayListener final : public ActionListener
{
public:
void action(const gcn::ActionEvent &event) override final;
diff --git a/src/client.cpp b/src/client.cpp
index ab3add135..3812fc9a9 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -193,7 +193,7 @@ int textures_count = 0;
extern "C" char const *_nl_locale_name_default(void);
#endif
-class AccountListener final : public gcn::ActionListener
+class AccountListener final : public ActionListener
{
public:
void action(const gcn::ActionEvent &)
@@ -202,7 +202,7 @@ class AccountListener final : public gcn::ActionListener
}
} accountListener;
-class LoginListener final : public gcn::ActionListener
+class LoginListener final : public ActionListener
{
public:
void action(const gcn::ActionEvent &)
@@ -212,7 +212,7 @@ class LoginListener final : public gcn::ActionListener
} loginListener;
Client::Client(const Options &options) :
- gcn::ActionListener(),
+ ActionListener(),
mOptions(options),
mConfigDir(),
mServerConfigDir(),
diff --git a/src/client.h b/src/client.h
index f020087ea..aedad4569 100644
--- a/src/client.h
+++ b/src/client.h
@@ -27,7 +27,7 @@
#include "net/serverinfo.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include <SDL.h>
@@ -57,7 +57,7 @@ extern unsigned int tmwServerVersion;
extern int start_time;
extern int textures_count;
-class ErrorListener : public gcn::ActionListener
+class ErrorListener : public ActionListener
{
public:
void action(const gcn::ActionEvent &event) override final;
@@ -142,7 +142,8 @@ struct PacketLimit
* The core part of the client. This class initializes all subsystems, runs
* the event loop, and shuts everything down again.
*/
-class Client final : public ConfigListener, public gcn::ActionListener
+class Client final : public ConfigListener,
+ public ActionListener
{
public:
/**
diff --git a/src/gui/base/widget.cpp b/src/gui/base/widget.cpp
index eeb5849c7..c14914cc2 100644
--- a/src/gui/base/widget.cpp
+++ b/src/gui/base/widget.cpp
@@ -68,7 +68,7 @@
#include "gui/base/widget.hpp"
#include "gui/base/actionevent.hpp"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/basiccontainer.hpp"
#include "gui/base/deathlistener.hpp"
#include "gui/base/event.hpp"
diff --git a/src/gui/base/widget.hpp b/src/gui/base/widget.hpp
index b6a81261e..1c05c2d03 100644
--- a/src/gui/base/widget.hpp
+++ b/src/gui/base/widget.hpp
@@ -73,11 +73,11 @@
#include "localconsts.h"
+class ActionListener;
class Graphics;
namespace gcn
{
- class ActionListener;
class BasicContainer;
class DeathListener;
class FocusHandler;
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 4d12e835e..343baba01 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -2838,7 +2838,7 @@ void PopupMenu::showGMPopup()
}
RenameListener::RenameListener() :
- gcn::ActionListener(),
+ ActionListener(),
mMapItemX(0),
mMapItemY(0),
mDialog(nullptr)
diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h
index 498132ded..a79dd3162 100644
--- a/src/gui/popups/popupmenu.h
+++ b/src/gui/popups/popupmenu.h
@@ -28,7 +28,7 @@
#include "being/actorsprite.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/listmodel.hpp"
#include "localconsts.h"
@@ -47,7 +47,7 @@ class TextField;
class ProgressBar;
class Window;
-class RenameListener final : public gcn::ActionListener
+class RenameListener final : public ActionListener
{
public:
RenameListener();
@@ -67,7 +67,7 @@ class RenameListener final : public gcn::ActionListener
TextDialog *mDialog;
};
-class PlayerListener : public gcn::ActionListener
+class PlayerListener : public ActionListener
{
public:
PlayerListener();
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 6d326116d..7cbdff44d 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -81,7 +81,7 @@ Button::Button(const Widget2 *const widget) :
Button::Button(const Widget2 *const widget,
const std::string &restrict caption,
const std::string &restrict actionEventId,
- gcn::ActionListener *const listener) :
+ ActionListener *const listener) :
gcn::Button(caption),
Widget2(widget),
gcn::WidgetListener(),
@@ -121,7 +121,7 @@ Button::Button(const Widget2 *const widget,
const std::string &restrict imageName,
const int imageWidth, const int imageHeight,
const std::string &restrict actionEventId,
- gcn::ActionListener *const listener) :
+ ActionListener *const listener) :
gcn::Button(caption),
Widget2(widget),
gcn::WidgetListener(),
@@ -161,7 +161,7 @@ Button::Button(const Widget2 *const widget,
const std::string &restrict imageName,
const int imageWidth, const int imageHeight,
const std::string &restrict actionEventId,
- gcn::ActionListener *const listener) :
+ ActionListener *const listener) :
gcn::Button(),
Widget2(widget),
gcn::WidgetListener(),
@@ -201,7 +201,7 @@ Button::Button(const Widget2 *const widget,
const std::string &restrict caption,
const std::string &restrict imageName,
const std::string &restrict actionEventId,
- gcn::ActionListener *const listener) :
+ ActionListener *const listener) :
gcn::Button(caption),
Widget2(widget),
gcn::WidgetListener(),
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index 949993a48..e80593f7f 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -59,7 +59,7 @@ class Button final : public gcn::Button,
Button(const Widget2 *const widget,
const std::string &restrict caption,
const std::string &restrict actionEventId,
- gcn::ActionListener *const listener);
+ ActionListener *const listener);
/**
* Constructor, sets the caption of the button to the given string and
@@ -70,7 +70,7 @@ class Button final : public gcn::Button,
const std::string &restrict imageName,
const int imageWidth, const int imageHeight,
const std::string &actionEventId,
- gcn::ActionListener *const listener);
+ ActionListener *const listener);
/**
* Constructor, sets the caption of the button to the given string and
@@ -80,7 +80,7 @@ class Button final : public gcn::Button,
const std::string &restrict imageName,
const int imageWidth, const int imageHeight,
const std::string &restrict actionEventId,
- gcn::ActionListener *const listener);
+ ActionListener *const listener);
/**
* Constructor, sets the caption of the button to the given string and
@@ -90,7 +90,7 @@ class Button final : public gcn::Button,
const std::string &restrict imageName,
const std::string &restrict caption,
const std::string &restrict actionEventId,
- gcn::ActionListener *const listener);
+ ActionListener *const listener);
A_DELETE_COPY(Button)
diff --git a/src/gui/widgets/characterviewbase.h b/src/gui/widgets/characterviewbase.h
index af3722e4b..16b6c3e0d 100644
--- a/src/gui/widgets/characterviewbase.h
+++ b/src/gui/widgets/characterviewbase.h
@@ -25,12 +25,12 @@
#include "gui/widgets/container.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "localconsts.h"
class CharacterViewBase : public Container,
- public gcn::ActionListener
+ public ActionListener
{
public:
A_DELETE_COPY(CharacterViewBase)
@@ -50,7 +50,7 @@ class CharacterViewBase : public Container,
protected:
CharacterViewBase(CharSelectDialog *const widget, const int padding) :
Container(widget),
- gcn::ActionListener(),
+ ActionListener(),
mParent(widget),
mPadding(padding),
mSelected(0)
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index 2f11dc2ce..0721e29f6 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -39,7 +39,7 @@ float CheckBox::mAlpha = 1.0;
CheckBox::CheckBox(const Widget2 *const widget,
const std::string &restrict caption, const bool selected,
- gcn::ActionListener *const listener,
+ ActionListener *const listener,
const std::string &restrict eventId) :
gcn::CheckBox(caption, selected),
Widget2(widget),
diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h
index a49c38d47..8e5958c92 100644
--- a/src/gui/widgets/checkbox.h
+++ b/src/gui/widgets/checkbox.h
@@ -46,7 +46,7 @@ class CheckBox final : public gcn::CheckBox,
CheckBox(const Widget2 *const widget,
const std::string &restrict caption,
const bool selected = false,
- gcn::ActionListener *const listener = nullptr,
+ ActionListener *const listener = nullptr,
const std::string &restrict eventId = "");
A_DELETE_COPY(CheckBox)
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 7aa53e83f..070afdbb5 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -54,9 +54,9 @@ DropDown::DropDown(const Widget2 *const widget,
gcn::ListModel *const listModel,
const bool extended,
const bool modal,
- gcn::ActionListener *const listener,
+ ActionListener *const listener,
const std::string &eventId):
- gcn::ActionListener(),
+ ActionListener(),
gcn::BasicContainer(),
gcn::KeyListener(),
gcn::MouseListener(),
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index af566fb69..0b6ada6dd 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -25,7 +25,6 @@
#include "gui/widgets/widget2.h"
-#include "gui/base/actionlistener.hpp"
#include "gui/base/basiccontainer.hpp"
#include "gui/base/focuslistener.hpp"
#include "gui/base/keylistener.hpp"
@@ -33,6 +32,8 @@
#include "gui/base/mouselistener.hpp"
#include "gui/base/selectionlistener.hpp"
+#include "listeners/actionlistener.h"
+
#include "localconsts.h"
class Image;
@@ -49,7 +50,7 @@ class Skin;
* DropDown you must give DropDown an implemented ListModel which represents
* your list.
*/
-class DropDown final : public gcn::ActionListener,
+class DropDown final : public ActionListener,
public gcn::BasicContainer,
public gcn::KeyListener,
public gcn::MouseListener,
@@ -70,7 +71,7 @@ class DropDown final : public gcn::ActionListener,
gcn::ListModel *const listModel,
const bool extended = false,
const bool modal = false,
- gcn::ActionListener *const listener = nullptr,
+ ActionListener *const listener = nullptr,
const std::string &eventId = "");
A_DELETE_COPY(DropDown)
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index 6928b11d8..e2af7f16d 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -29,7 +29,7 @@
#include "utils/dtor.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/key.hpp"
#include "render/graphics.h"
@@ -38,7 +38,7 @@
float GuiTable::mAlpha = 1.0;
-class GuiTableActionListener final : public gcn::ActionListener
+class GuiTableActionListener final : public ActionListener
{
public:
GuiTableActionListener(GuiTable *restrict _table,
@@ -62,7 +62,7 @@ protected:
GuiTableActionListener::GuiTableActionListener(GuiTable *restrict table,
gcn::Widget *restrict widget,
int row, int column) :
- gcn::ActionListener(),
+ ActionListener(),
mTable(table),
mRow(row),
mColumn(column),
diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp
index c10979bef..96494ed0b 100644
--- a/src/gui/widgets/itemlinkhandler.cpp
+++ b/src/gui/widgets/itemlinkhandler.cpp
@@ -37,14 +37,14 @@
#include <string>
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/mouseinput.hpp"
#include "debug.h"
namespace
{
- struct OpenUrlListener : public gcn::ActionListener
+ struct OpenUrlListener : public ActionListener
{
OpenUrlListener() :
url()
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index 4f0ea025d..8453a9722 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -51,7 +51,7 @@ SetupItem::SetupItem(const std::string &restrict text,
SetupTabScroll *restrict const parent,
const std::string &restrict eventName,
const bool mainConfig) :
- gcn::ActionListener(),
+ ActionListener(),
Widget2(),
mText(text),
mDescription(description),
@@ -75,7 +75,7 @@ SetupItem::SetupItem(const std::string &restrict text,
const std::string &restrict eventName,
const std::string &restrict def,
const bool mainConfig) :
- gcn::ActionListener(),
+ ActionListener(),
Widget2(),
mText(text),
mDescription(description),
diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h
index 027f91824..dd5eda1d9 100644
--- a/src/gui/widgets/setupitem.h
+++ b/src/gui/widgets/setupitem.h
@@ -24,7 +24,7 @@
#include "gui/widgets/button.h"
#include "gui/widgets/tabs/setuptabscroll.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include <list>
#include <vector>
@@ -45,7 +45,7 @@ namespace gcn
class ListModel;
}
-class SetupItem : public gcn::ActionListener,
+class SetupItem : public ActionListener,
public Widget2
{
public:
diff --git a/src/gui/widgets/sliderlist.cpp b/src/gui/widgets/sliderlist.cpp
index b75f65820..0ae0890dc 100644
--- a/src/gui/widgets/sliderlist.cpp
+++ b/src/gui/widgets/sliderlist.cpp
@@ -36,7 +36,7 @@ static const int sliderHeight = 30;
SliderList::SliderList(const Widget2 *const widget,
gcn::ListModel *const listModel) :
Container(widget),
- gcn::ActionListener(),
+ ActionListener(),
gcn::MouseListener(),
mLabel(new Label(this)),
mListModel(listModel),
@@ -48,7 +48,7 @@ SliderList::SliderList(const Widget2 *const widget,
setHeight(sliderHeight);
}
-void SliderList::postInit(gcn::ActionListener *const listener,
+void SliderList::postInit(ActionListener *const listener,
const std::string &eventId)
{
mPrevEventId = eventId + "_prev";
diff --git a/src/gui/widgets/sliderlist.h b/src/gui/widgets/sliderlist.h
index e0f63517b..3d86f8735 100644
--- a/src/gui/widgets/sliderlist.h
+++ b/src/gui/widgets/sliderlist.h
@@ -21,10 +21,11 @@
#ifndef GUI_WIDGETS_SLIDERLIST_H
#define GUI_WIDGETS_SLIDERLIST_H
-#include "gui/base/actionlistener.hpp"
#include "gui/base/listmodel.hpp"
#include "gui/base/mouselistener.hpp"
+#include "listeners/actionlistener.h"
+
#include "gui/widgets/container.h"
#include "localconsts.h"
@@ -33,7 +34,7 @@ class Button;
class Label;
class SliderList final : public Container,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::MouseListener
{
public:
@@ -44,7 +45,7 @@ class SliderList final : public Container,
~SliderList();
- void postInit(gcn::ActionListener *const listener,
+ void postInit(ActionListener *const listener,
const std::string &eventId);
void updateAlpha();
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 2a212ce75..d659cd6b6 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -35,7 +35,7 @@
TabbedArea::TabbedArea(const Widget2 *const widget) :
Widget2(widget),
- gcn::ActionListener(),
+ ActionListener(),
gcn::BasicContainer(),
gcn::KeyListener(),
gcn::MouseListener(),
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index dede91767..af7fe5429 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -25,12 +25,13 @@
#include "gui/widgets/widget2.h"
-#include "gui/base/actionlistener.hpp"
#include "gui/base/keylistener.hpp"
#include "gui/base/mouselistener.hpp"
#include "gui/base/widgetlistener.hpp"
#include "gui/base/widgets/container.hpp"
+#include "listeners/actionlistener.h"
+
class Button;
class Image;
class Tab;
@@ -39,7 +40,7 @@ class Tab;
* A tabbed area, the same as the guichan tabbed area in 0.8, but extended
*/
class TabbedArea final : public Widget2,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::BasicContainer,
public gcn::KeyListener,
public gcn::MouseListener,
diff --git a/src/gui/widgets/tabs/setuptab.cpp b/src/gui/widgets/tabs/setuptab.cpp
index c445e2ad7..efead5a3c 100644
--- a/src/gui/widgets/tabs/setuptab.cpp
+++ b/src/gui/widgets/tabs/setuptab.cpp
@@ -26,7 +26,7 @@
SetupTab::SetupTab(const Widget2 *const widget) :
Container(widget),
- gcn::ActionListener(),
+ ActionListener(),
gcn::WidgetListener(),
mName()
{
diff --git a/src/gui/widgets/tabs/setuptab.h b/src/gui/widgets/tabs/setuptab.h
index d8e76f812..1621b0713 100644
--- a/src/gui/widgets/tabs/setuptab.h
+++ b/src/gui/widgets/tabs/setuptab.h
@@ -25,7 +25,7 @@
#include "gui/widgets/container.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/widgetlistener.hpp"
#include <string>
@@ -36,7 +36,7 @@
* A container for the contents of a tab in the setup window.
*/
class SetupTab : public Container,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::WidgetListener
{
public:
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index fdcd84089..692a5608e 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -53,7 +53,7 @@ ImageRect TextField::skin;
TextField::TextField(const Widget2 *restrict const widget,
const std::string &restrict text,
const bool loseFocusOnTab,
- gcn::ActionListener *restrict const listener,
+ ActionListener *restrict const listener,
const std::string &restrict eventId,
const bool sendAlwaysEvents):
gcn::TextField(text),
diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h
index d3d1ff0eb..80d022bb1 100644
--- a/src/gui/widgets/textfield.h
+++ b/src/gui/widgets/textfield.h
@@ -48,7 +48,7 @@ class TextField : public gcn::TextField,
explicit TextField(const Widget2 *restrict const widget,
const std::string &restrict text = "",
const bool loseFocusOnTab = true,
- gcn::ActionListener *restrict
+ ActionListener *restrict
const listener = nullptr,
const std::string &restrict eventId = "",
const bool sendAlwaysEvents = false);
diff --git a/src/gui/widgets/widgetgroup.cpp b/src/gui/widgets/widgetgroup.cpp
index 34cbeebb5..ee8d6f719 100644
--- a/src/gui/widgets/widgetgroup.cpp
+++ b/src/gui/widgets/widgetgroup.cpp
@@ -27,7 +27,7 @@ WidgetGroup::WidgetGroup(const Widget2 *const widget,
const int spacing) :
Container(widget),
gcn::WidgetListener(),
- gcn::ActionListener(),
+ ActionListener(),
mSpacing(spacing),
mCount(0),
mGroup(group),
diff --git a/src/gui/widgets/widgetgroup.h b/src/gui/widgets/widgetgroup.h
index 897183839..e648a17e5 100644
--- a/src/gui/widgets/widgetgroup.h
+++ b/src/gui/widgets/widgetgroup.h
@@ -23,14 +23,14 @@
#include "gui/widgets/container.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/widgetlistener.hpp"
#include "localconsts.h"
class WidgetGroup : public Container,
public gcn::WidgetListener,
- public gcn::ActionListener
+ public ActionListener
{
public:
A_DELETE_COPY(WidgetGroup)
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index 127d3657d..3ef3e73ce 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -44,7 +44,7 @@
WindowMenu::WindowMenu(const Widget2 *const widget) :
Container(widget),
- gcn::ActionListener(),
+ ActionListener(),
gcn::SelectionListener(),
gcn::MouseListener(),
mSkin(Theme::instance() ? Theme::instance()->load("windowmenu.xml", "")
diff --git a/src/gui/windowmenu.h b/src/gui/windowmenu.h
index f6838115c..d7e16e7fa 100644
--- a/src/gui/windowmenu.h
+++ b/src/gui/windowmenu.h
@@ -28,7 +28,7 @@
#include "gui/widgets/container.h"
#include "gui/widgets/button.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/selectionlistener.hpp"
#include "localconsts.h"
@@ -77,7 +77,7 @@ struct ButtonText final
*/
class WindowMenu final : public Container,
public ConfigListener,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::SelectionListener,
public gcn::MouseListener
{
diff --git a/src/gui/windows/botcheckerwindow.cpp b/src/gui/windows/botcheckerwindow.cpp
index b94093ebb..20ade8ae4 100644
--- a/src/gui/windows/botcheckerwindow.cpp
+++ b/src/gui/windows/botcheckerwindow.cpp
@@ -260,7 +260,7 @@ protected:
BotCheckerWindow::BotCheckerWindow():
// TRANSLATORS: bot checker window header
Window(_("Bot Checker"), false, nullptr, "botchecker.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mTableModel(new UsersTableModel(this)),
mTable(new GuiTable(this, mTableModel)),
playersScrollArea(new ScrollArea(mTable, true,
diff --git a/src/gui/windows/botcheckerwindow.h b/src/gui/windows/botcheckerwindow.h
index 1346862d2..3db396321 100644
--- a/src/gui/windows/botcheckerwindow.h
+++ b/src/gui/windows/botcheckerwindow.h
@@ -27,7 +27,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
struct BOTCHK final
{
@@ -43,7 +43,7 @@ class UsersTableModel;
class StaticTableModel;
class BotCheckerWindow final : public Window,
- public gcn::ActionListener,
+ public ActionListener,
public ConfigListener
{
public:
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index ccddc76cd..2d6d7d9db 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -193,7 +193,7 @@ BuyDialog::DialogList BuyDialog::instances;
BuyDialog::BuyDialog() :
// TRANSLATORS: buy dialog name
Window(_("Create items"), false, nullptr, "buy.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::SelectionListener(),
mNpcId(-2), mMoney(0), mAmountItems(0), mMaxItems(0), mNick(),
mSortModel(nullptr),
@@ -205,7 +205,7 @@ BuyDialog::BuyDialog() :
BuyDialog::BuyDialog(const int npcId) :
// TRANSLATORS: buy dialog name
Window(_("Buy"), false, nullptr, "buy.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::SelectionListener(),
mNpcId(npcId), mMoney(0), mAmountItems(0), mMaxItems(0), mNick(),
mSortModel(nullptr),
@@ -217,7 +217,7 @@ BuyDialog::BuyDialog(const int npcId) :
BuyDialog::BuyDialog(std::string nick) :
// TRANSLATORS: buy dialog name
Window(_("Buy"), false, nullptr, "buy.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::SelectionListener(),
mNpcId(-1), mMoney(0), mAmountItems(0), mMaxItems(0), mNick(nick),
mSortModel(new SortListModelBuy),
diff --git a/src/gui/windows/buydialog.h b/src/gui/windows/buydialog.h
index 594fd0a30..ef51c04b2 100644
--- a/src/gui/windows/buydialog.h
+++ b/src/gui/windows/buydialog.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/selectionlistener.hpp"
class Button;
@@ -45,7 +45,7 @@ class Slider;
* \ingroup Interface
*/
class BuyDialog final : public Window,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::SelectionListener
{
public:
diff --git a/src/gui/windows/buyselldialog.cpp b/src/gui/windows/buyselldialog.cpp
index 22f39f449..5a1914040 100644
--- a/src/gui/windows/buyselldialog.cpp
+++ b/src/gui/windows/buyselldialog.cpp
@@ -37,7 +37,7 @@ BuySellDialog::DialogList BuySellDialog::dialogInstances;
BuySellDialog::BuySellDialog(const int npcId) :
// TRANSLATORS: shop window name
Window(_("Shop"), false, nullptr, "buysell.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mNpcId(npcId),
mNick(""),
mBuyButton(nullptr)
@@ -48,7 +48,7 @@ BuySellDialog::BuySellDialog(const int npcId) :
BuySellDialog::BuySellDialog(const std::string &nick) :
// TRANSLATORS: shop window name
Window(_("Shop"), false, nullptr, "buysell.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mNpcId(-1),
mNick(nick),
mBuyButton(nullptr)
diff --git a/src/gui/windows/buyselldialog.h b/src/gui/windows/buyselldialog.h
index 107730b2d..84bac0cac 100644
--- a/src/gui/windows/buyselldialog.h
+++ b/src/gui/windows/buyselldialog.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
class Button;
@@ -34,7 +34,8 @@ class Button;
*
* \ingroup Interface
*/
-class BuySellDialog final : public Window, public gcn::ActionListener
+class BuySellDialog final : public Window,
+ public ActionListener
{
public:
/**
diff --git a/src/gui/windows/changeemaildialog.cpp b/src/gui/windows/changeemaildialog.cpp
index a9f3b3449..3ed9ff213 100644
--- a/src/gui/windows/changeemaildialog.cpp
+++ b/src/gui/windows/changeemaildialog.cpp
@@ -45,7 +45,7 @@
ChangeEmailDialog::ChangeEmailDialog(LoginData *const data):
// TRANSLATORS: change email dialog header
Window(_("Change Email Address"), true, nullptr, "changeemail.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mFirstEmailField(new TextField(this)),
mSecondEmailField(new TextField(this)),
// TRANSLATORS: button in change email dialog
diff --git a/src/gui/windows/changeemaildialog.h b/src/gui/windows/changeemaildialog.h
index 4a13d5e52..cdbd371d1 100644
--- a/src/gui/windows/changeemaildialog.h
+++ b/src/gui/windows/changeemaildialog.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
class Button;
class LoginData;
@@ -37,7 +37,8 @@ class WrongDataNoticeListener;
*
* \ingroup Interface
*/
-class ChangeEmailDialog final : public Window, public gcn::ActionListener
+class ChangeEmailDialog final : public Window,
+ public ActionListener
{
public:
/**
diff --git a/src/gui/windows/changepassworddialog.cpp b/src/gui/windows/changepassworddialog.cpp
index 4646947fa..24823cddc 100644
--- a/src/gui/windows/changepassworddialog.cpp
+++ b/src/gui/windows/changepassworddialog.cpp
@@ -46,7 +46,7 @@
ChangePasswordDialog::ChangePasswordDialog(LoginData *const data):
// TRANSLATORS: change password window name
Window(_("Change Password"), true, nullptr, "changepassword.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mOldPassField(new PasswordField(this)),
mFirstPassField(new PasswordField(this)),
mSecondPassField(new PasswordField(this)),
diff --git a/src/gui/windows/changepassworddialog.h b/src/gui/windows/changepassworddialog.h
index 011229d15..ac7d35308 100644
--- a/src/gui/windows/changepassworddialog.h
+++ b/src/gui/windows/changepassworddialog.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
class Button;
class LoginData;
@@ -37,7 +37,8 @@ class WrongDataNoticeListener;
*
* \ingroup Interface
*/
-class ChangePasswordDialog final : public Window, public gcn::ActionListener
+class ChangePasswordDialog final : public Window,
+ public ActionListener
{
public:
/**
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index cbce28db7..e581cc2c9 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -63,7 +63,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
const int slot) :
// TRANSLATORS: char create dialog name
Window(_("New Character"), true, parent, "charcreate.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::KeyListener(),
mCharSelectDialog(parent),
mNameField(new TextField(this, "")),
diff --git a/src/gui/windows/charcreatedialog.h b/src/gui/windows/charcreatedialog.h
index c59b631dc..89e3c832a 100644
--- a/src/gui/windows/charcreatedialog.h
+++ b/src/gui/windows/charcreatedialog.h
@@ -27,7 +27,7 @@
#include "gui/windows/charselectdialog.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/keylistener.hpp"
class Label;
@@ -42,7 +42,7 @@ class TextField;
* \ingroup Interface
*/
class CharCreateDialog final : public Window,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::KeyListener
{
public:
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 3f44617f8..37e93938c 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -88,7 +88,7 @@ CharSelectDialog::CharSelectDialog(LoginData *const data):
Window(strprintf(_("Account %s (last login time %s)"),
data->username.c_str(), data->lastLogin.c_str()),
false, nullptr, "char.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::KeyListener(),
mLoginData(data),
// TRANSLATORS: char select dialog. button.
diff --git a/src/gui/windows/charselectdialog.h b/src/gui/windows/charselectdialog.h
index df08c9058..66b2f933e 100644
--- a/src/gui/windows/charselectdialog.h
+++ b/src/gui/windows/charselectdialog.h
@@ -29,7 +29,7 @@
#include "net/charserverhandler.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/keylistener.hpp"
class Button;
@@ -45,7 +45,7 @@ class TextDialog;
* \ingroup Interface
*/
class CharSelectDialog final : public Window,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::KeyListener
{
public:
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 5bff2ee4b..12ef73516 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -202,7 +202,7 @@ static const char *const ACTION_COLOR_PICKER = "color picker";
ChatWindow::ChatWindow():
// TRANSLATORS: chat window name
Window(_("Chat"), false, nullptr, "chat.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::KeyListener(),
mItemLinkHandler(new ItemLinkHandler),
mChatTabs(new TabbedArea(this)),
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index 6678eac28..6e4415728 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -29,7 +29,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/keylistener.hpp"
#include <list>
@@ -83,7 +83,7 @@ struct CHATLOG final
* \ingroup Interface
*/
class ChatWindow final : public Window,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::KeyListener,
public DepricatedListener,
public ConfigListener
diff --git a/src/gui/windows/confirmdialog.cpp b/src/gui/windows/confirmdialog.cpp
index 1ba3ebf65..950c6eada 100644
--- a/src/gui/windows/confirmdialog.cpp
+++ b/src/gui/windows/confirmdialog.cpp
@@ -39,7 +39,7 @@ ConfirmDialog::ConfirmDialog(const std::string &restrict title,
const bool ignore,
const bool modal, Window *const parent):
Window(title, modal, parent, "confirm.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mTextBox(new TextBox(this)),
mIgnore(ignore)
{
diff --git a/src/gui/windows/confirmdialog.h b/src/gui/windows/confirmdialog.h
index 9d5c9f23b..a123dae71 100644
--- a/src/gui/windows/confirmdialog.h
+++ b/src/gui/windows/confirmdialog.h
@@ -29,7 +29,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
class TextBox;
@@ -38,7 +38,8 @@ class TextBox;
*
* \ingroup GUI
*/
-class ConfirmDialog : public Window, public gcn::ActionListener
+class ConfirmDialog : public Window,
+ public ActionListener
{
public:
/**
diff --git a/src/gui/windows/connectiondialog.cpp b/src/gui/windows/connectiondialog.cpp
index b0ffc25cd..a50747958 100644
--- a/src/gui/windows/connectiondialog.cpp
+++ b/src/gui/windows/connectiondialog.cpp
@@ -34,7 +34,7 @@
ConnectionDialog::ConnectionDialog(const std::string &text,
const State cancelState):
Window("", false, nullptr, "connection.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mCancelState(cancelState)
{
setTitleBarHeight(0);
diff --git a/src/gui/windows/connectiondialog.h b/src/gui/windows/connectiondialog.h
index 773522839..b27aa892e 100644
--- a/src/gui/windows/connectiondialog.h
+++ b/src/gui/windows/connectiondialog.h
@@ -27,14 +27,15 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
/**
* The connection dialog.
*
* \ingroup Interface
*/
-class ConnectionDialog final : public Window, private gcn::ActionListener
+class ConnectionDialog final : public Window,
+ private ActionListener
{
public:
/**
diff --git a/src/gui/windows/didyouknowwindow.cpp b/src/gui/windows/didyouknowwindow.cpp
index 93166e6fa..d393a7dd5 100644
--- a/src/gui/windows/didyouknowwindow.cpp
+++ b/src/gui/windows/didyouknowwindow.cpp
@@ -48,7 +48,7 @@ static const int maxTip = 18;
DidYouKnowWindow::DidYouKnowWindow() :
// TRANSLATORS: did you know window name
Window(_("Did You Know?"), false, nullptr, "didyouknow.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mBrowserBox(new BrowserBox(this, BrowserBox::AUTO_SIZE, true,
"browserbox.xml")),
mScrollArea(new ScrollArea(mBrowserBox,
diff --git a/src/gui/windows/didyouknowwindow.h b/src/gui/windows/didyouknowwindow.h
index 85bbe8107..ff4599657 100644
--- a/src/gui/windows/didyouknowwindow.h
+++ b/src/gui/windows/didyouknowwindow.h
@@ -26,7 +26,7 @@
#include "gui/widgets/linkhandler.h"
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
class Button;
class BrowserBox;
@@ -38,7 +38,7 @@ class ScrollArea;
*/
class DidYouKnowWindow final : public Window,
public LinkHandler,
- public gcn::ActionListener
+ public ActionListener
{
public:
/**
diff --git a/src/gui/windows/editdialog.cpp b/src/gui/windows/editdialog.cpp
index 5c002212f..3f087b803 100644
--- a/src/gui/windows/editdialog.cpp
+++ b/src/gui/windows/editdialog.cpp
@@ -33,7 +33,7 @@ EditDialog::EditDialog(const std::string &restrict title,
const std::string &restrict eventOk, const int width,
Window *const parent, const bool modal):
Window(title, modal, parent, "edit.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mEventOk(eventOk),
mTextField(new TextField(this))
{
diff --git a/src/gui/windows/editdialog.h b/src/gui/windows/editdialog.h
index 9c84558a6..f37369a89 100644
--- a/src/gui/windows/editdialog.h
+++ b/src/gui/windows/editdialog.h
@@ -28,7 +28,7 @@
#include "gui/widgets/window.h"
#include "gui/widgets/textfield.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#define ACTION_EDIT_OK "edit ok"
@@ -37,7 +37,8 @@
*
* \ingroup GUI
*/
-class EditDialog final : public Window, public gcn::ActionListener
+class EditDialog final : public Window,
+ public ActionListener
{
public:
/**
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index 900fe840b..0b065bb0c 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -63,7 +63,7 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent,
const int index) :
// TRANSLATORS: edit server dialog name
Window(_("Edit Server"), true, parent),
- gcn::ActionListener(),
+ ActionListener(),
gcn::KeyListener(),
mServerAddressField(new TextField(this, std::string())),
mPortField(new TextField(this, std::string())),
diff --git a/src/gui/windows/editserverdialog.h b/src/gui/windows/editserverdialog.h
index cbb789fbb..5ef780ef0 100644
--- a/src/gui/windows/editserverdialog.h
+++ b/src/gui/windows/editserverdialog.h
@@ -31,8 +31,9 @@ class ServerDialog;
#include "net/serverinfo.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/keylistener.hpp"
+
#include "gui/base/listmodel.hpp"
/**
@@ -75,7 +76,7 @@ class TypeListModel : public gcn::ListModel
* \ingroup Interface
*/
class EditServerDialog final : public Window,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::KeyListener
{
public:
diff --git a/src/gui/windows/emotewindow.cpp b/src/gui/windows/emotewindow.cpp
index 9dd5f648c..2d2fdbd26 100644
--- a/src/gui/windows/emotewindow.cpp
+++ b/src/gui/windows/emotewindow.cpp
@@ -207,7 +207,7 @@ void EmoteWindow::clearFont()
setVisible(false);
}
-void EmoteWindow::addListeners(gcn::ActionListener *const listener)
+void EmoteWindow::addListeners(ActionListener *const listener)
{
mEmotePage->addActionListener(listener);
mColorPage->addActionListener(listener);
diff --git a/src/gui/windows/emotewindow.h b/src/gui/windows/emotewindow.h
index 0f15b7bc6..2ddc64886 100644
--- a/src/gui/windows/emotewindow.h
+++ b/src/gui/windows/emotewindow.h
@@ -59,7 +59,7 @@ class EmoteWindow final : public Window
void clearFont();
- void addListeners(gcn::ActionListener *const listener);
+ void addListeners(ActionListener *const listener);
void widgetResized(const gcn::Event &event) override final;
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index 327cabe6a..3f7f19948 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -57,7 +57,7 @@ EquipmentWindow::EquipmentWindow(Equipment *const equipment,
const bool foring):
// TRANSLATORS: equipment window name
Window(_("Equipment"), false, nullptr, "equipment.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mEquipment(equipment),
mItemPopup(new ItemPopup),
mPlayerBox(new PlayerBox("equipment_playerbox.xml",
diff --git a/src/gui/windows/equipmentwindow.h b/src/gui/windows/equipmentwindow.h
index 1ce8611a7..7ce8e6409 100644
--- a/src/gui/windows/equipmentwindow.h
+++ b/src/gui/windows/equipmentwindow.h
@@ -30,7 +30,7 @@
#include "utils/xml.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include <vector>
@@ -60,7 +60,8 @@ struct EquipmentBox final
*
* \ingroup Interface
*/
-class EquipmentWindow final : public Window, public gcn::ActionListener
+class EquipmentWindow final : public Window,
+ public ActionListener
{
public:
/**
diff --git a/src/gui/windows/helpwindow.cpp b/src/gui/windows/helpwindow.cpp
index eb2300e0e..288c38138 100644
--- a/src/gui/windows/helpwindow.cpp
+++ b/src/gui/windows/helpwindow.cpp
@@ -48,7 +48,7 @@
HelpWindow::HelpWindow() :
// TRANSLATORS: help window name
Window(_("Help"), false, nullptr, "help.xml"),
- gcn::ActionListener(),
+ ActionListener(),
// TRANSLATORS: help window. button.
mDYKButton(new Button(this, _("Did you know..."), "DYK", this)),
mBrowserBox(new BrowserBox(this, BrowserBox::AUTO_SIZE, true,
diff --git a/src/gui/windows/helpwindow.h b/src/gui/windows/helpwindow.h
index a9d1a0279..ae7d68c7c 100644
--- a/src/gui/windows/helpwindow.h
+++ b/src/gui/windows/helpwindow.h
@@ -26,7 +26,7 @@
#include "gui/widgets/linkhandler.h"
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "localconsts.h"
@@ -44,8 +44,9 @@ typedef std::map<std::string, HelpNames> HelpTagsMap;
/**
* The help window.
*/
-class HelpWindow final : public Window, public LinkHandler,
- public gcn::ActionListener
+class HelpWindow final : public Window,
+ public LinkHandler,
+ public ActionListener
{
public:
/**
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 23c1980be..25f1a0110 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -101,7 +101,7 @@ InventoryWindow::WindowList InventoryWindow::invInstances;
InventoryWindow::InventoryWindow(Inventory *const inventory):
Window("Inventory", false, nullptr, "inventory.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::KeyListener(),
gcn::SelectionListener(),
InventoryListener(),
diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h
index c0289e70d..0ff314fb8 100644
--- a/src/gui/windows/inventorywindow.h
+++ b/src/gui/windows/inventorywindow.h
@@ -29,7 +29,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/keylistener.hpp"
#include "gui/base/selectionlistener.hpp"
@@ -51,7 +51,7 @@ class TextPopup;
* \ingroup Interface
*/
class InventoryWindow final : public Window,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::KeyListener,
public gcn::SelectionListener,
public InventoryListener,
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index 975892888..d35854375 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -138,7 +138,7 @@ void ItemAmountWindow::finish(Item *const item, const int amount,
ItemAmountWindow::ItemAmountWindow(const Usage usage, Window *const parent,
Item *const item, const int maxRange) :
Window("", false, parent, "amount.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::KeyListener(),
mItemAmountTextField(new IntTextField(this, 1)),
mItemPriceTextField(nullptr),
diff --git a/src/gui/windows/itemamountwindow.h b/src/gui/windows/itemamountwindow.h
index dd3b498fb..760555c6c 100644
--- a/src/gui/windows/itemamountwindow.h
+++ b/src/gui/windows/itemamountwindow.h
@@ -26,7 +26,7 @@
#include "gui/widgets/window.h"
#include "gui/base/keylistener.hpp"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
class DropDown;
class Icon;
@@ -43,7 +43,7 @@ class Slider;
* \ingroup Interface
*/
class ItemAmountWindow final : public Window,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::KeyListener
{
public:
diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp
index 0adabc3ad..dec951458 100644
--- a/src/gui/windows/killstats.cpp
+++ b/src/gui/windows/killstats.cpp
@@ -40,7 +40,7 @@
KillStats::KillStats() :
// TRANSLATORS: kill stats window name
Window(_("Kill stats"), false, nullptr, "killstats.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mKillCounter(0),
mExpCounter(0),
mKillTCounter(0),
diff --git a/src/gui/windows/killstats.h b/src/gui/windows/killstats.h
index 46dbf842b..2dcc41b97 100644
--- a/src/gui/windows/killstats.h
+++ b/src/gui/windows/killstats.h
@@ -23,8 +23,7 @@
#ifndef GUI_WINDOWS_KILLSTATS_H
#define GUI_WINDOWS_KILLSTATS_H
-#include "gui/base/actionlistener.hpp"
-
+#include "listeners/actionlistener.h"
#include "listeners/depricatedlistener.h"
#include "gui/widgets/window.h"
@@ -33,7 +32,7 @@ class Label;
class Button;
class KillStats final : public Window,
- private gcn::ActionListener,
+ private ActionListener,
public DepricatedListener
{
public:
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp
index 8ec6144a0..cc8d02471 100644
--- a/src/gui/windows/logindialog.cpp
+++ b/src/gui/windows/logindialog.cpp
@@ -53,10 +53,10 @@ std::string LoginDialog::savedPasswordKey("");
namespace
{
- struct OpenUrlListener : public gcn::ActionListener
+ struct OpenUrlListener : public ActionListener
{
OpenUrlListener() :
- gcn::ActionListener(),
+ ActionListener(),
url()
{
}
@@ -143,7 +143,7 @@ LoginDialog::LoginDialog(LoginData *const data, std::string serverName,
std::string *const updateHost):
// TRANSLATORS: login dialog name
Window(_("Login"), false, nullptr, "login.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::KeyListener(),
mLoginData(data),
mUserField(new TextField(this, mLoginData->username)),
diff --git a/src/gui/windows/logindialog.h b/src/gui/windows/logindialog.h
index 5099644ea..77fb75dd5 100644
--- a/src/gui/windows/logindialog.h
+++ b/src/gui/windows/logindialog.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/keylistener.hpp"
#include <string>
@@ -44,7 +44,8 @@ class UpdateTypeModel;
*
* \ingroup Interface
*/
-class LoginDialog final : public Window, public gcn::ActionListener,
+class LoginDialog final : public Window,
+ public ActionListener,
public gcn::KeyListener
{
public:
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 093f17e29..6e33422b2 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -80,7 +80,7 @@ typedef std::vector<Image *>::iterator ImageVectorIter;
NpcDialog::NpcDialog(const int npcId) :
// TRANSLATORS: npc dialog name
Window(_("NPC"), false, nullptr, "npc.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mNpcId(npcId),
mDefaultInt(0),
mDefaultString(),
diff --git a/src/gui/windows/npcdialog.h b/src/gui/windows/npcdialog.h
index 8646e5365..e9ad99242 100644
--- a/src/gui/windows/npcdialog.h
+++ b/src/gui/windows/npcdialog.h
@@ -30,7 +30,7 @@
#include "utils/stringvector.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include <list>
@@ -56,7 +56,7 @@ typedef std::map<int, NpcDialog*> NpcDialogs;
* \ingroup Interface
*/
class NpcDialog final : public Window,
- public gcn::ActionListener,
+ public ActionListener,
public ExtendedListModel,
public ConfigListener
{
diff --git a/src/gui/windows/npcpostdialog.cpp b/src/gui/windows/npcpostdialog.cpp
index 63ae6f53b..1666d1bd6 100644
--- a/src/gui/windows/npcpostdialog.cpp
+++ b/src/gui/windows/npcpostdialog.cpp
@@ -42,7 +42,7 @@ NpcPostDialog::DialogList NpcPostDialog::instances;
NpcPostDialog::NpcPostDialog(const int npcId):
// TRANSLATORS: npc post dialog caption
Window(_("NPC"), false, nullptr, "npcpost.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mNpcId(npcId),
mText(new TextBox(this)),
mSender(new TextField(this))
diff --git a/src/gui/windows/npcpostdialog.h b/src/gui/windows/npcpostdialog.h
index b8237a694..6ce070808 100644
--- a/src/gui/windows/npcpostdialog.h
+++ b/src/gui/windows/npcpostdialog.h
@@ -25,13 +25,13 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
class TextBox;
class TextField;
class NpcPostDialog final : public Window,
- public gcn::ActionListener
+ public ActionListener
{
public:
/**
diff --git a/src/gui/windows/okdialog.cpp b/src/gui/windows/okdialog.cpp
index c1ce6f13f..eb22d6c87 100644
--- a/src/gui/windows/okdialog.cpp
+++ b/src/gui/windows/okdialog.cpp
@@ -40,7 +40,7 @@ OkDialog::OkDialog(const std::string &restrict title,
const bool showCenter, Window *const parent,
const int minWidth) :
Window(title, modal, parent, "ok.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mTextBox(new TextBox(this))
{
mTextBox->setEditable(false);
diff --git a/src/gui/windows/okdialog.h b/src/gui/windows/okdialog.h
index 7e63c9787..6809bee1a 100644
--- a/src/gui/windows/okdialog.h
+++ b/src/gui/windows/okdialog.h
@@ -27,7 +27,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
class TextBox;
@@ -44,7 +44,7 @@ enum
* \ingroup GUI
*/
class OkDialog final : public Window,
- public gcn::ActionListener
+ public ActionListener
{
public:
/**
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index 3729841bc..2d59c6a43 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -51,7 +51,7 @@
OutfitWindow::OutfitWindow():
// TRANSLATORS: outfits window name
Window(_("Outfits"), false, nullptr, "outfits.xml"),
- gcn::ActionListener(),
+ ActionListener(),
// TRANSLATORS: outfits window button
mPreviousButton(new Button(this, _("<"), "previous", this)),
// TRANSLATORS: outfits window button
diff --git a/src/gui/windows/outfitwindow.h b/src/gui/windows/outfitwindow.h
index 01e72aefc..4c3b5951c 100644
--- a/src/gui/windows/outfitwindow.h
+++ b/src/gui/windows/outfitwindow.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
const unsigned int OUTFITS_COUNT = 100;
const unsigned int OUTFIT_ITEM_COUNT = 16;
@@ -35,7 +35,7 @@ class CheckBox;
class Label;
class OutfitWindow final : public Window,
- private gcn::ActionListener
+ private ActionListener
{
public:
/**
diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp
index e5f599f0f..c37bc860c 100644
--- a/src/gui/windows/questswindow.cpp
+++ b/src/gui/windows/questswindow.cpp
@@ -122,7 +122,7 @@ struct QuestEffect final
QuestsWindow::QuestsWindow() :
// TRANSLATORS: quests window name
Window(_("Quests"), false, nullptr, "quests.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mQuestsModel(new QuestsModel),
mQuestsListBox(new ExtendedListBox(this,
mQuestsModel, "extendedlistbox.xml")),
diff --git a/src/gui/windows/questswindow.h b/src/gui/windows/questswindow.h
index edb9d845e..fdb2c98aa 100644
--- a/src/gui/windows/questswindow.h
+++ b/src/gui/windows/questswindow.h
@@ -27,7 +27,7 @@
#include "utils/xml.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include <map>
#include <vector>
@@ -48,7 +48,7 @@ typedef std::map<int, const QuestEffect*> NpcQuestEffectMap;
typedef NpcQuestEffectMap::const_iterator NpcQuestEffectMapCIter;
class QuestsWindow final : public Window,
- public gcn::ActionListener
+ public ActionListener
{
public:
QuestsWindow();
diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp
index ff9f669b7..375ab415e 100644
--- a/src/gui/windows/quitdialog.cpp
+++ b/src/gui/windows/quitdialog.cpp
@@ -49,7 +49,7 @@
QuitDialog::QuitDialog(QuitDialog **const pointerToMe):
// TRANSLATORS: quit dialog name
Window(_("Quit"), true, nullptr, "quit.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::KeyListener(),
mOptions(),
// TRANSLATORS: quit dialog button
diff --git a/src/gui/windows/quitdialog.h b/src/gui/windows/quitdialog.h
index d5d315074..d99ab72d8 100644
--- a/src/gui/windows/quitdialog.h
+++ b/src/gui/windows/quitdialog.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/keylistener.hpp"
#include <vector>
@@ -38,7 +38,8 @@ class RadioButton;
*
* \ingroup Interface
*/
-class QuitDialog final : public Window, public gcn::ActionListener,
+class QuitDialog final : public Window,
+ public ActionListener,
public gcn::KeyListener
{
public:
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index 1867b6b40..66a5ad187 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -44,7 +44,7 @@
#include "debug.h"
WrongDataNoticeListener::WrongDataNoticeListener():
- gcn::ActionListener(),
+ ActionListener(),
mTarget(nullptr)
{
}
@@ -63,7 +63,7 @@ void WrongDataNoticeListener::action(const gcn::ActionEvent &event)
RegisterDialog::RegisterDialog(LoginData *const data) :
// TRANSLATORS: register dialog name
Window(_("Register"), false, nullptr, "register.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::KeyListener(),
mLoginData(data),
mUserField(new TextField(this, mLoginData->username)),
diff --git a/src/gui/windows/registerdialog.h b/src/gui/windows/registerdialog.h
index 1b53581b6..fea74e776 100644
--- a/src/gui/windows/registerdialog.h
+++ b/src/gui/windows/registerdialog.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/keylistener.hpp"
class Button;
@@ -38,7 +38,7 @@ class TextField;
* to the field which contained wrong data when the Ok button was pressed on
* the error notice.
*/
-class WrongDataNoticeListener final : public gcn::ActionListener
+class WrongDataNoticeListener final : public ActionListener
{
public:
WrongDataNoticeListener();
@@ -58,7 +58,7 @@ class WrongDataNoticeListener final : public gcn::ActionListener
* \ingroup Interface
*/
class RegisterDialog final : public Window,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::KeyListener
{
public:
diff --git a/src/gui/windows/selldialog.cpp b/src/gui/windows/selldialog.cpp
index a4ff29f78..888a2432d 100644
--- a/src/gui/windows/selldialog.cpp
+++ b/src/gui/windows/selldialog.cpp
@@ -53,7 +53,7 @@ SellDialog::DialogList SellDialog::instances;
SellDialog::SellDialog(const int npcId) :
// TRANSLATORS: sell dialog name
Window(_("Sell"), false, nullptr, "sell.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::SelectionListener(),
mNpcId(npcId), mMaxItems(0), mAmountItems(0), mNick("")
{
@@ -63,7 +63,7 @@ SellDialog::SellDialog(const int npcId) :
SellDialog::SellDialog(const std::string &nick):
// TRANSLATORS: sell dialog name
Window(_("Sell"), false, nullptr, "sell.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::SelectionListener(),
mNpcId(-1), mMaxItems(0), mAmountItems(0), mNick(nick)
{
diff --git a/src/gui/windows/selldialog.h b/src/gui/windows/selldialog.h
index ca973ea03..c23112f8a 100644
--- a/src/gui/windows/selldialog.h
+++ b/src/gui/windows/selldialog.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/selectionlistener.hpp"
class Button;
@@ -42,7 +42,7 @@ class Slider;
* \ingroup Interface
*/
class SellDialog final : public Window,
- private gcn::ActionListener,
+ private ActionListener,
private gcn::SelectionListener
{
public:
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index b7e21556c..1a02f95c6 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -244,7 +244,7 @@ ServerDialog::ServerDialog(ServerInfo *const serverInfo,
const std::string &dir) :
// TRANSLATORS: servers dialog name
Window(_("Choose Your Server"), false, nullptr, "server.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::KeyListener(),
gcn::SelectionListener(),
mMutex(),
diff --git a/src/gui/windows/serverdialog.h b/src/gui/windows/serverdialog.h
index d17ebcf42..3ea3b23a4 100644
--- a/src/gui/windows/serverdialog.h
+++ b/src/gui/windows/serverdialog.h
@@ -31,7 +31,7 @@
#include "utils/mutex.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/keylistener.hpp"
#include "gui/base/listmodel.hpp"
#include "gui/base/selectionlistener.hpp"
@@ -91,7 +91,7 @@ class ServersListModel final : public gcn::ListModel
* \ingroup Interface
*/
class ServerDialog final : public Window,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::KeyListener,
public gcn::SelectionListener
{
diff --git a/src/gui/windows/setupwindow.cpp b/src/gui/windows/setupwindow.cpp
index 0780865aa..85e4938ef 100644
--- a/src/gui/windows/setupwindow.cpp
+++ b/src/gui/windows/setupwindow.cpp
@@ -58,7 +58,7 @@ SetupWindow *setupWindow = nullptr;
SetupWindow::SetupWindow() :
// TRANSLATORS: setup window name
Window(_("Setup"), false, nullptr, "setup.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mTabs(),
mModsTab(nullptr),
mWindowsToReset(),
diff --git a/src/gui/windows/setupwindow.h b/src/gui/windows/setupwindow.h
index bd67fa860..c65f1cfea 100644
--- a/src/gui/windows/setupwindow.h
+++ b/src/gui/windows/setupwindow.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include <list>
@@ -41,7 +41,7 @@ class TabbedArea;
* \ingroup GUI
*/
class SetupWindow final : public Window,
- public gcn::ActionListener
+ public ActionListener
{
public:
SetupWindow();
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index a940e4cdb..1485f18c9 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -71,7 +71,7 @@ ShopWindow::DialogList ShopWindow::instances;
ShopWindow::ShopWindow():
// TRANSLATORS: shop window name
Window(_("Personal Shop"), false, nullptr, "shop.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::SelectionListener(),
// TRANSLATORS: shop window button
mCloseButton(new Button(this, _("Close"), "close", this)),
diff --git a/src/gui/windows/shopwindow.h b/src/gui/windows/shopwindow.h
index 2430073da..606080986 100644
--- a/src/gui/windows/shopwindow.h
+++ b/src/gui/windows/shopwindow.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/selectionlistener.hpp"
class Button;
@@ -43,7 +43,7 @@ class ShopListBox;
* \ingroup Interface
*/
class ShopWindow final : public Window,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::SelectionListener
{
public:
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 7e823b742..f2af65c3c 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -279,7 +279,7 @@ class SkillTab final : public Tab
SkillDialog::SkillDialog() :
// TRANSLATORS: skills dialog name
Window(_("Skills"), false, nullptr, "skills.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mSkills(),
mTabs(new TabbedArea(this)),
mDeleteTabs(),
diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h
index 0fb6c1100..d58aa5cca 100644
--- a/src/gui/windows/skilldialog.h
+++ b/src/gui/windows/skilldialog.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
const int SKILL_MIN_ID = 200000;
const unsigned int SKILL_VAR_MIN_ID = 1000000;
@@ -43,7 +43,8 @@ struct SkillInfo;
*
* \ingroup Interface
*/
-class SkillDialog final : public Window, public gcn::ActionListener
+class SkillDialog final : public Window,
+ public ActionListener
{
public:
SkillDialog();
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index 2385066be..8b5fdf95c 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -169,13 +169,13 @@ protected:
std::string mCounterString;
};
-class SocialGuildTab final : public SocialTab, public gcn::ActionListener
+class SocialGuildTab final : public SocialTab, public ActionListener
{
public:
SocialGuildTab(const Widget2 *const widget,
Guild *const guild, const bool showBackground) :
SocialTab(widget),
- gcn::ActionListener(),
+ ActionListener(),
mGuild(guild)
{
// TRANSLATORS: tab in social window
@@ -305,13 +305,13 @@ private:
Guild *mGuild;
};
-class SocialGuildTab2 final : public SocialTab, public gcn::ActionListener
+class SocialGuildTab2 final : public SocialTab, public ActionListener
{
public:
SocialGuildTab2(const Widget2 *const widget, Guild *const guild,
const bool showBackground) :
SocialTab(widget),
- gcn::ActionListener()
+ ActionListener()
{
// TRANSLATORS: tab in social window
setCaption(_("Guild"));
@@ -372,13 +372,13 @@ public:
}
};
-class SocialPartyTab final : public SocialTab, public gcn::ActionListener
+class SocialPartyTab final : public SocialTab, public ActionListener
{
public:
SocialPartyTab(const Widget2 *const widget,
Party *const party, const bool showBackground) :
SocialTab(widget),
- gcn::ActionListener(),
+ ActionListener(),
mParty(party)
{
// TRANSLATORS: tab in social window
@@ -1276,7 +1276,7 @@ private:
SocialWindow::SocialWindow() :
// TRANSLATORS: social window name
Window(_("Social"), false, nullptr, "social.xml"),
- gcn::ActionListener(),
+ ActionListener(),
PlayerRelationsListener(),
mGuildInvited(0),
mGuildAcceptDialog(nullptr),
diff --git a/src/gui/windows/socialwindow.h b/src/gui/windows/socialwindow.h
index 283cfde69..84c713787 100644
--- a/src/gui/windows/socialwindow.h
+++ b/src/gui/windows/socialwindow.h
@@ -26,7 +26,7 @@
#include "being/playerrelationslistener.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include <string>
#include <map>
@@ -48,7 +48,7 @@ class TextDialog;
* \ingroup Interface
*/
class SocialWindow final : public Window,
- private gcn::ActionListener,
+ private ActionListener,
public PlayerRelationsListener
{
public:
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 80e86e66f..a95eb807c 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -113,7 +113,7 @@ class DerDisplay final : public AttrDisplay
{ return DERIVED; }
};
-class ChangeDisplay final : public AttrDisplay, gcn::ActionListener
+class ChangeDisplay final : public AttrDisplay, ActionListener
{
public:
ChangeDisplay(const Widget2 *const widget,
@@ -142,7 +142,7 @@ class ChangeDisplay final : public AttrDisplay, gcn::ActionListener
StatusWindow::StatusWindow() :
Window(player_node ? player_node->getName() :
"?", false, nullptr, "status.xml"),
- gcn::ActionListener(),
+ ActionListener(),
// TRANSLATORS: status window label
mLvlLabel(new Label(this, strprintf(_("Level: %d"), 0))),
// TRANSLATORS: status window label
@@ -820,7 +820,7 @@ ChangeDisplay::ChangeDisplay(const Widget2 *const widget,
const int id, const std::string &restrict name,
const std::string &restrict shortName) :
AttrDisplay(widget, id, name, shortName),
- gcn::ActionListener(),
+ ActionListener(),
mNeeded(1),
// TRANSLATORS: status window label
mPoints(new Label(this, _("Max"))),
diff --git a/src/gui/windows/statuswindow.h b/src/gui/windows/statuswindow.h
index c9efe6edd..31e1dda69 100644
--- a/src/gui/windows/statuswindow.h
+++ b/src/gui/windows/statuswindow.h
@@ -27,7 +27,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include <map>
@@ -44,7 +44,7 @@ class VertContainer;
* \ingroup Interface
*/
class StatusWindow final : public Window,
- public gcn::ActionListener,
+ public ActionListener,
public DepricatedListener
{
public:
diff --git a/src/gui/windows/textcommandeditor.cpp b/src/gui/windows/textcommandeditor.cpp
index 4ae098a3c..72796b6b9 100644
--- a/src/gui/windows/textcommandeditor.cpp
+++ b/src/gui/windows/textcommandeditor.cpp
@@ -160,7 +160,7 @@ public:
TextCommandEditor::TextCommandEditor(TextCommand *const command) :
// TRANSLATORS: command editor name
Window(_("Command Editor"), false, nullptr, "commandeditor.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mIsMagicCommand(command->getCommandType() == TEXT_COMMAND_MAGIC),
mCommand(command),
// TRANSLATORS: command editor button
diff --git a/src/gui/windows/textcommandeditor.h b/src/gui/windows/textcommandeditor.h
index 4b63aaf29..7b3921618 100644
--- a/src/gui/windows/textcommandeditor.h
+++ b/src/gui/windows/textcommandeditor.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
class Button;
class DropDown;
@@ -38,7 +38,8 @@ class TargetTypeModel;
class TextCommand;
class TextField;
-class TextCommandEditor final : public Window, public gcn::ActionListener
+class TextCommandEditor final : public Window,
+ public ActionListener
{
public:
/**
diff --git a/src/gui/windows/textdialog.cpp b/src/gui/windows/textdialog.cpp
index c31c099fb..f6f2ce06a 100644
--- a/src/gui/windows/textdialog.cpp
+++ b/src/gui/windows/textdialog.cpp
@@ -41,7 +41,7 @@ TextDialog::TextDialog(const std::string &restrict title,
Window *const parent,
const bool isPassword):
Window(title, true, parent, "textdialog.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mTextField(nullptr),
mPasswordField(nullptr),
// TRANSLATORS: text dialog button
diff --git a/src/gui/windows/textdialog.h b/src/gui/windows/textdialog.h
index 58819de76..d82b15085 100644
--- a/src/gui/windows/textdialog.h
+++ b/src/gui/windows/textdialog.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
class Button;
class PasswordField;
@@ -36,7 +36,8 @@ class TextField;
*
* \ingroup GUI
*/
-class TextDialog final : public Window, public gcn::ActionListener
+class TextDialog final : public Window,
+ public ActionListener
{
public:
/**
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index c3a096161..6a9f9a8af 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -67,7 +67,7 @@
TradeWindow::TradeWindow():
// TRANSLATORS: trade window caption
Window(_("Trade: You"), false, nullptr, "trade.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::SelectionListener(),
mMyInventory(new Inventory(Inventory::TRADE)),
mPartnerInventory(new Inventory(Inventory::TRADE)),
diff --git a/src/gui/windows/tradewindow.h b/src/gui/windows/tradewindow.h
index da5c84df2..69ba64ed7 100644
--- a/src/gui/windows/tradewindow.h
+++ b/src/gui/windows/tradewindow.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/selectionlistener.hpp"
#include <memory>
@@ -43,7 +43,7 @@ class TextField;
* \ingroup Interface
*/
class TradeWindow final : public Window,
- private gcn::ActionListener,
+ private ActionListener,
private gcn::SelectionListener
{
public:
diff --git a/src/gui/windows/unregisterdialog.cpp b/src/gui/windows/unregisterdialog.cpp
index 76afb1539..791a25c05 100644
--- a/src/gui/windows/unregisterdialog.cpp
+++ b/src/gui/windows/unregisterdialog.cpp
@@ -45,7 +45,7 @@
UnRegisterDialog::UnRegisterDialog(LoginData *const data) :
// TRANSLATORS: unregister dialog name
Window(_("Unregister"), true, nullptr, "unregister.xml"),
- gcn::ActionListener(),
+ ActionListener(),
mLoginData(data),
mPasswordField(new PasswordField(this, mLoginData->password)),
// TRANSLATORS: unregister dialog. button.
diff --git a/src/gui/windows/unregisterdialog.h b/src/gui/windows/unregisterdialog.h
index 806822171..b384a7041 100644
--- a/src/gui/windows/unregisterdialog.h
+++ b/src/gui/windows/unregisterdialog.h
@@ -25,7 +25,7 @@
#include "gui/widgets/window.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
class Button;
class LoginData;
@@ -37,7 +37,8 @@ class WrongDataNoticeListener;
*
* \ingroup Interface
*/
-class UnRegisterDialog final : public Window, public gcn::ActionListener
+class UnRegisterDialog final : public Window,
+ public ActionListener
{
public:
/**
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index eab1bea1b..2e3294508 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -156,7 +156,7 @@ UpdaterWindow::UpdaterWindow(const std::string &restrict updateHost,
const int updateType):
// TRANSLATORS: updater window name
Window(_("Updating..."), false, nullptr, "update.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::KeyListener(),
mDownloadStatus(UPDATE_NEWS),
mUpdateHost(updateHost),
diff --git a/src/gui/windows/updaterwindow.h b/src/gui/windows/updaterwindow.h
index 5509168d4..affb7edda 100644
--- a/src/gui/windows/updaterwindow.h
+++ b/src/gui/windows/updaterwindow.h
@@ -30,7 +30,7 @@
#include "utils/mutex.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/keylistener.hpp"
#include <string>
@@ -69,7 +69,7 @@ struct UpdateFile final
* \ingroup GUI
*/
class UpdaterWindow final : public Window,
- public gcn::ActionListener,
+ public ActionListener,
public LinkHandler,
public gcn::KeyListener
{
diff --git a/src/gui/windows/whoisonline.h b/src/gui/windows/whoisonline.h
index d60805983..8c6235130 100644
--- a/src/gui/windows/whoisonline.h
+++ b/src/gui/windows/whoisonline.h
@@ -30,7 +30,7 @@
#include <set>
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
class BrowserBox;
class Button;
@@ -102,7 +102,7 @@ class OnlinePlayer final
*/
class WhoIsOnline final : public Window,
public LinkHandler,
- public gcn::ActionListener,
+ public ActionListener,
public ConfigListener
{
public:
diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp
index a3fd0fc73..7372345ef 100644
--- a/src/gui/windows/worldselectdialog.cpp
+++ b/src/gui/windows/worldselectdialog.cpp
@@ -82,7 +82,7 @@ class WorldListModel final : public gcn::ListModel
WorldSelectDialog::WorldSelectDialog(Worlds worlds):
// TRANSLATORS: world select dialog name
Window(_("Select World"), false, nullptr, "world.xml"),
- gcn::ActionListener(),
+ ActionListener(),
gcn::KeyListener(),
mWorldListModel(new WorldListModel(worlds)),
mWorldList(new ListBox(this, mWorldListModel, "")),
diff --git a/src/gui/windows/worldselectdialog.h b/src/gui/windows/worldselectdialog.h
index 0f3d857b2..9fe42cf13 100644
--- a/src/gui/windows/worldselectdialog.h
+++ b/src/gui/windows/worldselectdialog.h
@@ -27,7 +27,7 @@
#include "net/worldinfo.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/keylistener.hpp"
class Button;
@@ -39,7 +39,8 @@ class WorldListModel;
*
* \ingroup Interface
*/
-class WorldSelectDialog final : public Window, public gcn::ActionListener,
+class WorldSelectDialog final : public Window,
+ public ActionListener,
public gcn::KeyListener
{
public:
diff --git a/src/gui/base/actionlistener.hpp b/src/listeners/actionlistener.h
index 8a40fbb8c..ee3154f80 100644
--- a/src/gui/base/actionlistener.hpp
+++ b/src/listeners/actionlistener.h
@@ -61,52 +61,49 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef GCN_ACTIONLISTENER_HPP
-#define GCN_ACTIONLISTENER_HPP
+#ifndef LISTENERS_ACTIONLISTENER_HPP
+#define LISTENERS_ACTIONLISTENER_HPP
#include <string>
#include "gui/base/actionevent.hpp"
-namespace gcn
+/**
+ * Interface for listening for action events from widgets.
+ *
+ * @see Widget::addActionListener, Widget::removeActionListener,
+ * ActionEvent
+ * @author Olof Naessén
+ * @author Per Larsson
+ */
+class ActionListener
{
- /**
- * Interface for listening for action events from widgets.
- *
- * @see Widget::addActionListener, Widget::removeActionListener,
- * ActionEvent
- * @author Olof Naessén
- * @author Per Larsson
- */
- class ActionListener
- {
public:
/**
- * Destructor.
- */
+ * Destructor.
+ */
virtual ~ActionListener()
{ }
/**
- * Called when an action is recieved from a widget. It is used
- * to be able to recieve a notification that an action has
- * occured.
- *
- * @param actionEvent The event of the action.
- * @since 0.6.0
- */
- virtual void action(const ActionEvent& actionEvent) = 0;
+ * Called when an action is recieved from a widget. It is used
+ * to be able to recieve a notification that an action has
+ * occured.
+ *
+ * @param actionEvent The event of the action.
+ * @since 0.6.0
+ */
+ virtual void action(const gcn::ActionEvent &actionEvent) = 0;
protected:
/**
- * Constructor.
- *
- * You should not be able to make an instance of ActionListener,
- * therefore its constructor is protected.
- */
+ * Constructor.
+ *
+ * You should not be able to make an instance of ActionListener,
+ * therefore its constructor is protected.
+ */
ActionListener()
{ }
- };
-} // namespace gcn
+};
-#endif // end GCN_ACTIONLISTENER_HPP
+#endif // end LISTENERS_ACTIONLISTENER_HPP
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 3e5db9169..c568012fc 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -60,7 +60,7 @@ namespace
/**
* Listener used for handling the overweigth message.
*/
- struct WeightListener final : public gcn::ActionListener
+ struct WeightListener final : public ActionListener
{
void action(const gcn::ActionEvent &event A_UNUSED)
{
@@ -71,7 +71,7 @@ namespace
/**
* Listener used for handling death message.
*/
- struct DeathListener final : public gcn::ActionListener
+ struct DeathListener final : public ActionListener
{
void action(const gcn::ActionEvent &event A_UNUSED)
{
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index 9457a31db..adecd591f 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -48,7 +48,7 @@ ConfirmDialog *confirmDlg = nullptr;
*/
namespace
{
- struct RequestTradeListener : public gcn::ActionListener
+ struct RequestTradeListener : public ActionListener
{
void action(const gcn::ActionEvent &event)
{