diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-21 15:49:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-21 15:49:23 +0300 |
commit | 84b7634a85d0474d83af7002ee7639cf421686bf (patch) | |
tree | c1d4bed2c70f26b19db7758ad23aa4ace9c3d6c7 /src/gui/widgets/tabs/setup_players.cpp | |
parent | ff67cb1d126ac5b26907816ddd094c517ae5216d (diff) | |
download | manaverse-84b7634a85d0474d83af7002ee7639cf421686bf.tar.gz manaverse-84b7634a85d0474d83af7002ee7639cf421686bf.tar.bz2 manaverse-84b7634a85d0474d83af7002ee7639cf421686bf.tar.xz manaverse-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.cpp | 20 |
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); +} |