diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-16 17:00:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-16 17:00:23 +0300 |
commit | e50013d92b22faeffb8711d07a8f344ab71e9e57 (patch) | |
tree | 2069b52249be03c4b6491059ee9078fd26572108 /src/gui/widgets/itemlinkhandler.cpp | |
parent | b8412102b392310c5f7748bb2da36b3600e0fe08 (diff) | |
download | manaverse-e50013d92b22faeffb8711d07a8f344ab71e9e57.tar.gz manaverse-e50013d92b22faeffb8711d07a8f344ab71e9e57.tar.bz2 manaverse-e50013d92b22faeffb8711d07a8f344ab71e9e57.tar.xz manaverse-e50013d92b22faeffb8711d07a8f344ab71e9e57.zip |
Move openurllistener into separate file.
Diffstat (limited to 'src/gui/widgets/itemlinkhandler.cpp')
-rw-r--r-- | src/gui/widgets/itemlinkhandler.cpp | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index efc6ef175..b1d277957 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -35,7 +35,7 @@ #include "resources/db/itemdb.h" -#include "listeners/actionlistener.h" +#include "listeners/openurllistener.h" #include "input/mouseinput.h" @@ -47,24 +47,7 @@ namespace { - struct OpenUrlListener : public ActionListener - { - OpenUrlListener() : - ActionListener(), - url() - { - } - - A_DELETE_COPY(OpenUrlListener) - - void action(const ActionEvent &event) override final - { - if (event.getId() == "yes") - openBrowser(url); - } - - std::string url; - } listener; + OpenUrlListener listener; } // namespace ItemLinkHandler::ItemLinkHandler() : |