From cb2b4d833d4852a3e54cdb2394422ad7aeb24166 Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 3 Jul 2018 17:07:10 +0400 Subject: add multilogin policy to protocol and client settings --- pica-client/dialogs/settingsdialog.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'pica-client/dialogs/settingsdialog.cpp') diff --git a/pica-client/dialogs/settingsdialog.cpp b/pica-client/dialogs/settingsdialog.cpp index 287569d..6850f5e 100644 --- a/pica-client/dialogs/settingsdialog.cpp +++ b/pica-client/dialogs/settingsdialog.cpp @@ -2,6 +2,7 @@ #include "../settings.h" #include "../globals.h" #include "../../PICA_netconf.h" +#include "../../PICA_proto.h" #include #include @@ -216,15 +217,15 @@ void SettingsDialog::loadSettings() switch(mlpstate) { - case 0: + case PICA_MULTILOGIN_PROHIBIT: rbMLPProhibit->setChecked(true); break; - case 1: + case PICA_MULTILOGIN_REPLACE: rbMLPReplace->setChecked(true); break; - case 2: + case PICA_MULTILOGIN_ALLOW: rbMLPAllowMultiple->setChecked(true); break; @@ -262,11 +263,11 @@ void SettingsDialog::storeSettings() int mlpstate; if (rbMLPProhibit->isChecked()) - mlpstate = 0; + mlpstate = PICA_MULTILOGIN_PROHIBIT; else if (rbMLPReplace->isChecked()) - mlpstate = 1; + mlpstate = PICA_MULTILOGIN_REPLACE; else if (rbMLPAllowMultiple->isChecked()) - mlpstate = 2; + mlpstate = PICA_MULTILOGIN_ALLOW; st.storeValue("multiple_logins.state", QString::number(mlpstate)); } -- cgit v1.2.1