|
43 | 43 | #include "vncConnDialog.h" |
44 | 44 |
|
45 | 45 | #include "Localization.h" // ACT : Add localization on messages |
| 46 | +#include "shlwapi.h" |
46 | 47 |
|
47 | 48 | //extern HINSTANCE g_hInst; |
48 | 49 |
|
@@ -719,7 +720,7 @@ vncProperties::DialogProc(HWND hwnd, |
719 | 720 |
|
720 | 721 | // Modif sf@2002 |
721 | 722 | SendMessage(GetDlgItem(hwnd, IDC_PLUGIN_CHECK), BM_SETCHECK, _this->m_server->IsDSMPluginEnabled(), 0); |
722 | | - EnableWindow(GetDlgItem(hwnd, IDC_PLUGIN_BUTTON), _this->m_server->IsDSMPluginEnabled()); |
| 723 | + EnableWindow(GetDlgItem(hwnd, IDC_PLUGIN_BUTTON), (_this->m_server->AuthClientCount() == 0 ? _this->m_server->IsDSMPluginEnabled(): false)); |
723 | 724 |
|
724 | 725 | // Query window option - Taken from TightVNC advanced properties |
725 | 726 | BOOL queryEnabled = (_this->m_server->QuerySetting() == 4); |
@@ -1285,8 +1286,9 @@ vncProperties::DialogProc(HWND hwnd, |
1285 | 1286 | // sf@2002 - DSM Plugin |
1286 | 1287 | case IDC_PLUGIN_CHECK: |
1287 | 1288 | { |
1288 | | - EnableWindow(GetDlgItem(hwnd, IDC_PLUGIN_BUTTON), |
1289 | | - SendMessage(GetDlgItem(hwnd, IDC_PLUGIN_CHECK), BM_GETCHECK, 0, 0) == BST_CHECKED); |
| 1289 | + EnableWindow(GetDlgItem(hwnd, IDC_PLUGIN_BUTTON), _this->m_server->AuthClientCount() == 0 |
| 1290 | + ? SendMessage(GetDlgItem(hwnd, IDC_PLUGIN_CHECK), BM_GETCHECK, 0, 0) == BST_CHECKED |
| 1291 | + : BST_UNCHECKED); |
1290 | 1292 | } |
1291 | 1293 | return TRUE; |
1292 | 1294 | // Marscha@2004 - authSSP: moved MSLogon checkbox back to admin props page |
@@ -1368,6 +1370,8 @@ vncProperties::DialogProc(HWND hwnd, |
1368 | 1370 | { |
1369 | 1371 | TCHAR szPlugin[MAX_PATH]; |
1370 | 1372 | GetDlgItemText(hwnd, IDC_PLUGINS_COMBO, szPlugin, MAX_PATH); |
| 1373 | + PathStripPathA(szPlugin); |
| 1374 | + |
1371 | 1375 | if (!_this->m_server->GetDSMPluginPointer()->IsLoaded()) |
1372 | 1376 | _this->m_server->GetDSMPluginPointer()->LoadPlugin(szPlugin, false); |
1373 | 1377 | else |
|
0 commit comments