diff options
Diffstat (limited to 'src/gui/widgets/tabs')
-rw-r--r-- | src/gui/widgets/tabs/setup_players.cpp | 20 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_players.h | 4 |
2 files changed, 24 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); +} diff --git a/src/gui/widgets/tabs/setup_players.h b/src/gui/widgets/tabs/setup_players.h index dbc4ae019..c2fe43ba6 100644 --- a/src/gui/widgets/tabs/setup_players.h +++ b/src/gui/widgets/tabs/setup_players.h @@ -36,6 +36,10 @@ class Setup_Players final : public SetupTabScroll A_DELETE_COPY(Setup_Players) + void apply() override final; + + void externalUpdated() override final; + private: NamesModel *mBadgesList; }; |