summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs/setup_players.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-21 15:49:23 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-21 15:49:23 +0300
commit84b7634a85d0474d83af7002ee7639cf421686bf (patch)
treec1d4bed2c70f26b19db7758ad23aa4ace9c3d6c7 /src/gui/widgets/tabs/setup_players.cpp
parentff67cb1d126ac5b26907816ddd094c517ae5216d (diff)
downloadplus-84b7634a85d0474d83af7002ee7639cf421686bf.tar.gz
plus-84b7634a85d0474d83af7002ee7639cf421686bf.tar.bz2
plus-84b7634a85d0474d83af7002ee7639cf421686bf.tar.xz
plus-84b7634a85d0474d83af7002ee7639cf421686bf.zip
Add option for enable/disable remote commands.
In tmw remote commands disabled by default.
Diffstat (limited to 'src/gui/widgets/tabs/setup_players.cpp')
-rw-r--r--src/gui/widgets/tabs/setup_players.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/widgets/tabs/setup_players.cpp b/src/gui/widgets/tabs/setup_players.cpp
index e315b8d21..f749e347f 100644
--- a/src/gui/widgets/tabs/setup_players.cpp
+++ b/src/gui/widgets/tabs/setup_players.cpp
@@ -22,6 +22,9 @@
#include "gui/widgets/tabs/setup_players.h"
+#include "configuration.h"
+#include "settings.h"
+
#include "gui/models/namesmodel.h"
#include "gui/widgets/containerplacer.h"
@@ -141,6 +144,11 @@ Setup_Players::Setup_Players(const Widget2 *const widget) :
" (useful for touch interfaces)"),
"", "longmouseclick", this, "longmouseclickEvent");
+ // TRANSLATORS: settings option
+ new SetupItemCheckBox(_("Enable remote commands"),
+ "", "enableRemoteCommands", this, "enableRemoteCommandsEvent",
+ MainConfig_false);
+
setDimension(Rect(0, 0, 550, 350));
}
@@ -148,3 +156,15 @@ Setup_Players::~Setup_Players()
{
delete2(mBadgesList);
}
+
+void Setup_Players::externalUpdated()
+{
+ reread("enableRemoteCommands");
+}
+
+void Setup_Players::apply()
+{
+ SetupTabScroll::apply();
+ settings.enableRemoteCommands = serverConfig.getValue(
+ "enableRemoteCommands", true);
+}