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/windows | |
parent | b8412102b392310c5f7748bb2da36b3600e0fe08 (diff) | |
download | plus-e50013d92b22faeffb8711d07a8f344ab71e9e57.tar.gz plus-e50013d92b22faeffb8711d07a8f344ab71e9e57.tar.bz2 plus-e50013d92b22faeffb8711d07a8f344ab71e9e57.tar.xz plus-e50013d92b22faeffb8711d07a8f344ab71e9e57.zip |
Move openurllistener into separate file.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/logindialog.cpp | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp index f3fcec167..9979bf8b1 100644 --- a/src/gui/windows/logindialog.cpp +++ b/src/gui/windows/logindialog.cpp @@ -29,6 +29,8 @@ #include "input/keydata.h" +#include "listeners/openurllistener.h" + #include "gui/models/updatelistmodel.h" #include "gui/models/updatetypemodel.h" @@ -57,24 +59,7 @@ std::string LoginDialog::savedPasswordKey(""); 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; - } urlListener; + OpenUrlListener urlListener; } // namespace LoginDialog::LoginDialog(LoginData *const data, std::string serverName, |