diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-15 20:37:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-15 20:37:18 +0300 |
commit | f6cb5519a2cc4452055ff0bfb6f38990bc3e9e65 (patch) | |
tree | a4b22c43caebdccb79969dc95356f8745600d36c /src/gui/windows/serverinfowindow.cpp | |
parent | acc395f67dbe683787f1aeb0bf96fe0a16f62c5e (diff) | |
download | plus-f6cb5519a2cc4452055ff0bfb6f38990bc3e9e65.tar.gz plus-f6cb5519a2cc4452055ff0bfb6f38990bc3e9e65.tar.bz2 plus-f6cb5519a2cc4452055ff0bfb6f38990bc3e9e65.tar.xz plus-f6cb5519a2cc4452055ff0bfb6f38990bc3e9e65.zip |
Allow open server info window from game.
Diffstat (limited to 'src/gui/windows/serverinfowindow.cpp')
-rw-r--r-- | src/gui/windows/serverinfowindow.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/windows/serverinfowindow.cpp b/src/gui/windows/serverinfowindow.cpp index 660dd0241..c0099d356 100644 --- a/src/gui/windows/serverinfowindow.cpp +++ b/src/gui/windows/serverinfowindow.cpp @@ -33,6 +33,8 @@ #include "debug.h" +ServerInfoWindow *serverInfoWindow = nullptr; + ServerInfoWindow::ServerInfoWindow(ServerInfo &serverInfo) : // TRANSLATORS: servers dialog name Window(_("Server info"), Modal_false, nullptr, "server_info.xml"), @@ -170,3 +172,11 @@ void ServerInfoWindow::addServerComment(const std::string &url, mBrowserBox->addRow(str); } } + +void ServerInfoWindow::close() +{ + Window::close(); + if (serverInfoWindow == this) + serverInfoWindow = nullptr; + scheduleDelete(); +} |