diff options
author | Pierre Ossman <ossman@cendio.se> | 2016-01-12 12:32:15 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2016-01-12 12:32:15 +0100 |
commit | fc08bee5afdb07830d6c6fb28359a020a5c305c5 (patch) | |
tree | e2009681235886e7c9e6669f0939b679815fcfab /win/vncconfig | |
parent | 4ab1e5d4b5ebaac0c410eedcc76865736aaa6ae4 (diff) | |
download | tigervnc-fc08bee5afdb07830d6c6fb28359a020a5c305c5.tar.gz tigervnc-fc08bee5afdb07830d6c6fb28359a020a5c305c5.zip |
Remove legacy Windows code
We have lots of code that deals with Windows versions that we no
longer support anyway. Clean out all of this old cruft.
Diffstat (limited to 'win/vncconfig')
-rw-r--r-- | win/vncconfig/Authentication.h | 3 | ||||
-rw-r--r-- | win/vncconfig/Desktop.h | 14 | ||||
-rw-r--r-- | win/vncconfig/Hooking.h | 8 | ||||
-rw-r--r-- | win/vncconfig/Inputs.h | 2 | ||||
-rw-r--r-- | win/vncconfig/Legacy.cxx | 3 | ||||
-rw-r--r-- | win/vncconfig/resource.h | 1 | ||||
-rw-r--r-- | win/vncconfig/vncconfig.cxx | 1 | ||||
-rw-r--r-- | win/vncconfig/vncconfig.rc | 14 |
8 files changed, 10 insertions, 36 deletions
diff --git a/win/vncconfig/Authentication.h b/win/vncconfig/Authentication.h index c2aba91e..7fa85a2f 100644 --- a/win/vncconfig/Authentication.h +++ b/win/vncconfig/Authentication.h @@ -21,7 +21,6 @@ #include <vncconfig/PasswordDialog.h> #include <rfb_win32/Registry.h> #include <rfb_win32/SecurityPage.h> -#include <rfb_win32/OSVersion.h> #include <rfb_win32/MsgBox.h> #include <rfb/ServerCore.h> #include <rfb/Security.h> @@ -87,7 +86,7 @@ namespace rfb { registryInsecure = warn; } bool enableQueryOnlyIfLoggedOn() { - return isItemChecked(IDC_QUERY_CONNECT) && osVersion.isPlatformNT && (osVersion.dwMajorVersion >= 5); + return isItemChecked(IDC_QUERY_CONNECT); } diff --git a/win/vncconfig/Desktop.h b/win/vncconfig/Desktop.h index 6479cb26..1a687d74 100644 --- a/win/vncconfig/Desktop.h +++ b/win/vncconfig/Desktop.h @@ -21,7 +21,6 @@ #include <rfb_win32/Registry.h> #include <rfb_win32/Dialog.h> #include <rfb_win32/SDisplay.h> -#include <rfb_win32/DynamicFn.h> namespace rfb { @@ -35,20 +34,10 @@ namespace rfb { CharArray action(rfb::win32::SDisplay::disconnectAction.getData()); bool disconnectLock = stricmp(action.buf, "Lock") == 0; bool disconnectLogoff = stricmp(action.buf, "Logoff") == 0; - typedef BOOL (WINAPI *_LockWorkStation_proto)(); - DynamicFn<_LockWorkStation_proto> _LockWorkStation(_T("user32.dll"), "LockWorkStation"); - if (!_LockWorkStation.isValid()) { - enableItem(IDC_DISCONNECT_LOCK, false); - if (disconnectLock) { - disconnectLogoff = true; - disconnectLock = false; - } - } setItemChecked(IDC_DISCONNECT_LOGOFF, disconnectLogoff); setItemChecked(IDC_DISCONNECT_LOCK, disconnectLock); setItemChecked(IDC_DISCONNECT_NONE, !disconnectLock && !disconnectLogoff); setItemChecked(IDC_REMOVE_WALLPAPER, rfb::win32::SDisplay::removeWallpaper); - setItemChecked(IDC_REMOVE_PATTERN, rfb::win32::SDisplay::removePattern); setItemChecked(IDC_DISABLE_EFFECTS, rfb::win32::SDisplay::disableEffects); } bool onCommand(int id, int cmd) { @@ -57,7 +46,6 @@ namespace rfb { case IDC_DISCONNECT_LOCK: case IDC_DISCONNECT_NONE: case IDC_REMOVE_WALLPAPER: - case IDC_REMOVE_PATTERN: case IDC_DISABLE_EFFECTS: CharArray action(rfb::win32::SDisplay::disconnectAction.getData()); bool disconnectLock = stricmp(action.buf, "Lock") == 0; @@ -65,7 +53,6 @@ namespace rfb { setChanged((disconnectLogoff != isItemChecked(IDC_DISCONNECT_LOGOFF)) || (disconnectLock != isItemChecked(IDC_DISCONNECT_LOCK)) || (isItemChecked(IDC_REMOVE_WALLPAPER) != rfb::win32::SDisplay::removeWallpaper) || - (isItemChecked(IDC_REMOVE_PATTERN) != rfb::win32::SDisplay::removePattern) || (isItemChecked(IDC_DISABLE_EFFECTS) != rfb::win32::SDisplay::disableEffects)); break; } @@ -79,7 +66,6 @@ namespace rfb { action = _T("Lock"); regKey.setString(_T("DisconnectAction"), action); regKey.setBool(_T("RemoveWallpaper"), isItemChecked(IDC_REMOVE_WALLPAPER)); - regKey.setBool(_T("RemovePattern"), isItemChecked(IDC_REMOVE_PATTERN)); regKey.setBool(_T("DisableEffects"), isItemChecked(IDC_DISABLE_EFFECTS)); return true; } diff --git a/win/vncconfig/Hooking.h b/win/vncconfig/Hooking.h index b8137ddc..f5ef8b74 100644 --- a/win/vncconfig/Hooking.h +++ b/win/vncconfig/Hooking.h @@ -34,13 +34,9 @@ namespace rfb { : PropSheetPage(GetModuleHandle(0), MAKEINTRESOURCE(IDD_HOOKING)), regKey(rk) {} void initDialog() { setItemChecked(IDC_USEPOLLING, rfb::win32::SDisplay::updateMethod == 0); - setItemChecked(IDC_USEHOOKS, (rfb::win32::SDisplay::updateMethod == 1) && - rfb::win32::SDisplay::areHooksAvailable()); - enableItem(IDC_USEHOOKS, rfb::win32::SDisplay::areHooksAvailable()); + setItemChecked(IDC_USEHOOKS, (rfb::win32::SDisplay::updateMethod == 1)); setItemChecked(IDC_POLLCONSOLES, rfb::win32::WMPoller::poll_console_windows); - setItemChecked(IDC_CAPTUREBLT, osVersion.isPlatformNT && - rfb::win32::DeviceFrameBuffer::useCaptureBlt); - enableItem(IDC_CAPTUREBLT, osVersion.isPlatformNT); + setItemChecked(IDC_CAPTUREBLT, rfb::win32::DeviceFrameBuffer::useCaptureBlt); onCommand(IDC_USEHOOKS, 0); } bool onCommand(int id, int cmd) { diff --git a/win/vncconfig/Inputs.h b/win/vncconfig/Inputs.h index 1e0b4bac..2ad3b425 100644 --- a/win/vncconfig/Inputs.h +++ b/win/vncconfig/Inputs.h @@ -25,7 +25,6 @@ #include <rfb_win32/Registry.h> #include <rfb_win32/Dialog.h> -#include <rfb_win32/OSVersion.h> #include <rfb/ServerCore.h> namespace rfb { @@ -42,7 +41,6 @@ namespace rfb { setItemChecked(IDC_ACCEPT_CUTTEXT, rfb::Server::acceptCutText); setItemChecked(IDC_SEND_CUTTEXT, rfb::Server::sendCutText); setItemChecked(IDC_DISABLE_LOCAL_INPUTS, SDisplay::disableLocalInputs); - enableItem(IDC_DISABLE_LOCAL_INPUTS, !osVersion.isPlatformWindows); BOOL blocked = FALSE; if (SystemParametersInfo(SPI_GETBLOCKSENDINPUTRESETS, 0, &blocked, 0)) setItemChecked(IDC_AFFECT_SCREENSAVER, !blocked); diff --git a/win/vncconfig/Legacy.cxx b/win/vncconfig/Legacy.cxx index f8c20280..7d51de81 100644 --- a/win/vncconfig/Legacy.cxx +++ b/win/vncconfig/Legacy.cxx @@ -206,8 +206,7 @@ void LegacyPage::LoadPrefs() regKey.setInt(_T("IdleTimeout"), key.getInt(_T("IdleTimeout"), 0)); regKey.setBool(_T("RemoveWallpaper"), key.getBool(_T("RemoveWallpaper"))); - regKey.setBool(_T("RemovePattern"), key.getBool(_T("RemoveWallpaper"))); - regKey.setBool(_T("DisableEffects"), key.getBool(_T("RemoveWallpaper"))); + regKey.setBool(_T("DisableEffects"), key.getBool(_T("DisableEffects"))); if (key.getInt(_T("QuerySetting"), 2) != 2) { regKey.setBool(_T("QueryConnect"), key.getInt(_T("QuerySetting")) > 2); diff --git a/win/vncconfig/resource.h b/win/vncconfig/resource.h index 7b8e6479..243f8247 100644 --- a/win/vncconfig/resource.h +++ b/win/vncconfig/resource.h @@ -64,7 +64,6 @@ #define IDC_DISCONNECT_LOCK 1057 #define IDC_DISCONNECT_LOGOFF 1058 #define IDC_REMOVE_WALLPAPER 1059 -#define IDC_REMOVE_PATTERN 1060 #define IDC_DISABLE_EFFECTS 1061 #define IDC_CAPTUREBLT 1062 #define IDC_QUERY 1064 diff --git a/win/vncconfig/vncconfig.cxx b/win/vncconfig/vncconfig.cxx index b1d0eef3..18045c77 100644 --- a/win/vncconfig/vncconfig.cxx +++ b/win/vncconfig/vncconfig.cxx @@ -135,7 +135,6 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, char* cmdLine, int cmdShow) { } else if (e.err != ERROR_CALL_NOT_IMPLEMENTED && e.err != ERROR_NOT_LOGGED_ON) { // If the call is not implemented, ignore the error and continue - // If we are on Win9x and no user is logged on, ignore error and continue throw; } warnOnChangePassword = true; diff --git a/win/vncconfig/vncconfig.rc b/win/vncconfig/vncconfig.rc index ebcf7209..ae1057a8 100644 --- a/win/vncconfig/vncconfig.rc +++ b/win/vncconfig/vncconfig.rc @@ -241,20 +241,18 @@ STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CONTROL | WS_POPUP | WS_CAPTION | CAPTION "Desktop" FONT 8, "MS Sans Serif" BEGIN - GROUPBOX "While connected",IDC_STATIC,7,5,171,60 + GROUPBOX "While connected",IDC_STATIC,7,5,171,45 CONTROL "Remove wallpaper",IDC_REMOVE_WALLPAPER,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,15,15,155,15 - CONTROL "Remove background pattern",IDC_REMOVE_PATTERN,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,15,30,155,15 CONTROL "Disable user interface effects",IDC_DISABLE_EFFECTS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,46,155,14 - GROUPBOX "When last client disconnects",IDC_STATIC,7,70,171,60 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,30,155,14 + GROUPBOX "When last client disconnects",IDC_STATIC,7,55,171,60 CONTROL "Do nothing",IDC_DISCONNECT_NONE,"Button", - BS_AUTORADIOBUTTON,15,80,155,15 + BS_AUTORADIOBUTTON,15,65,155,15 CONTROL "Lock workstation",IDC_DISCONNECT_LOCK,"Button", - BS_AUTORADIOBUTTON,15,95,155,15 + BS_AUTORADIOBUTTON,15,80,155,15 CONTROL "Logoff user",IDC_DISCONNECT_LOGOFF,"Button", - BS_AUTORADIOBUTTON,15,110,155,15 + BS_AUTORADIOBUTTON,15,95,155,15 END |