vncProperties.cpp
资源名称:vnc3326s.zip [点击查看]
上传用户:sbftbdw
上传日期:2007-01-03
资源大小:379k
文件大小:20k
源码类别:
远程控制编程
开发平台:
Visual C++
- // Copyright (C) 1997, 1998 Olivetti & Oracle Research Laboratory
- //
- // This file is part of the VNC system.
- //
- // The VNC system is free software; you can redistribute it and/or modify
- // it under the terms of the GNU General Public License as published by
- // the Free Software Foundation; either version 2 of the License, or
- // (at your option) any later version.
- //
- // This program is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- // GNU General Public License for more details.
- //
- // You should have received a copy of the GNU General Public License
- // along with this program; if not, write to the Free Software
- // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- // USA.
- //
- // If the source code for the VNC system is not available from the place
- // whence you received this file, check http://www.orl.co.uk/vnc or contact
- // the authors on vnc@orl.co.uk for information on obtaining it.
- // vncProperties.cpp
- // Implementation of the Properties dialog!
- #include "stdhdrs.h"
- #include "lmcons.h"
- #include "vncService.h"
- #include "WinVNC.h"
- #include "vncProperties.h"
- #include "vncServer.h"
- #include "vncPasswd.h"
- const char WINVNC_REGISTRY_KEY [] = "Software\ORL\WinVNC3";
- const char NO_PASSWORD_WARN [] = "WARNING : Running WinVNC without setting a password is "
- "a dangerous security risk!n"
- "Until you set a password, WinVNC will not accept incoming connections.";
- const char NO_OVERRIDE_ERR [] = "This machine has been preconfigured with WinVNC settings, "
- "which cannot be overridden by individual users. "
- "The preconfigured settings may be modified only by a System Administrator.";
- // Constructor & Destructor
- vncProperties::vncProperties()
- {
- m_allowproperties = TRUE;
- m_allowshutdown = TRUE;
- m_dlgvisible = FALSE;
- }
- vncProperties::~vncProperties()
- {
- }
- // Initialisation
- BOOL
- vncProperties::Init(vncServer *server)
- {
- // Save the server pointer
- m_server = server;
- // Load the settings from the registry
- Load();
- // If the password is empty then always show a dialog
- char passwd[MAXPWLEN];
- m_server->GetPassword(passwd);
- {
- vncPasswd::ToText plain(passwd);
- if (strlen(plain) == 0)
- Show(m_server->AuthRequired());
- }
- return TRUE;
- }
- // Dialog box handling functions
- void
- vncProperties::Show(BOOL show)
- {
- if (show)
- {
- if (!m_allowproperties)
- {
- // If the user isn't allowed to override the settings then tell them
- MessageBox(NULL, NO_OVERRIDE_ERR, "WinVNC Error", MB_OK | MB_ICONEXCLAMATION);
- return;
- }
- if (!m_dlgvisible)
- {
- log.Print(LL_INTINFO, VNCLOG("show Propertiesn"));
- for (;;)
- {
- m_returncode_valid = FALSE;
- // Do the dialog box
- int result = DialogBoxParam(hAppInstance,
- MAKEINTRESOURCE(IDD_PROPERTIES),
- NULL,
- (DLGPROC) DialogProc,
- (LONG) this);
- if (!m_returncode_valid)
- result = IDCANCEL;
- log.Print(LL_INTINFO, VNCLOG("dialog result = %dn"), result);
- if (result == -1)
- {
- // Dialog box failed, so quit
- PostQuitMessage(0);
- return;
- }
- // We're allowed to exit if the password is not empty
- char passwd[MAXPWLEN];
- m_server->GetPassword(passwd);
- {
- vncPasswd::ToText plain(passwd);
- if ((strlen(plain) != 0) || !m_server->AuthRequired())
- return;
- }
- log.Print(LL_INTERR, VNCLOG("warning - empty passwordn"));
- // The password is empty, so if OK was used then redisplay the box,
- // otherwise, if CANCEL was used, close down WinVNC
- if (result == IDCANCEL)
- {
- log.Print(LL_INTERR, VNCLOG("no password - QUITTINGn"));
- PostQuitMessage(0);
- return;
- }
- // If we reached here then OK was used & there is no password!
- int result2 = MessageBox(NULL, NO_PASSWORD_WARN,
- "WinVNC Warning", MB_OK | MB_ICONEXCLAMATION);
- omni_thread::sleep(4);
- }
- }
- }
- }
- BOOL CALLBACK
- vncProperties::DialogProc(HWND hwnd,
- UINT uMsg,
- WPARAM wParam,
- LPARAM lParam )
- {
- // We use the dialog-box's USERDATA to store a _this pointer
- // This is set only once WM_INITDIALOG has been recieved, though!
- vncProperties *_this = (vncProperties *) GetWindowLong(hwnd, GWL_USERDATA);
- switch (uMsg)
- {
- case WM_INITDIALOG:
- {
- // Retrieve the Dialog box parameter and use it as a pointer
- // to the calling vncProperties object
- SetWindowLong(hwnd, GWL_USERDATA, lParam);
- _this = (vncProperties *) lParam;
- // Initialise the properties controls
- HWND hConnectSock = GetDlgItem(hwnd, IDC_CONNECT_SOCK);
- SendMessage(hConnectSock,
- BM_SETCHECK,
- _this->m_server->SockConnected(),
- 0);
- HWND hConnectCorba = GetDlgItem(hwnd, IDC_CONNECT_CORBA);
- SendMessage(hConnectCorba,
- BM_SETCHECK,
- _this->m_server->CORBAConnected(),
- 0);
- #if(defined(_CORBA))
- EnableWindow(hConnectCorba, TRUE);
- #else
- EnableWindow(hConnectCorba, FALSE);
- #endif
- HWND hPortNoAuto = GetDlgItem(hwnd, IDC_PORTNO_AUTO);
- SendMessage(hPortNoAuto,
- BM_SETCHECK,
- _this->m_server->AutoPortSelect(),
- 0);
- EnableWindow(hPortNoAuto, _this->m_server->SockConnected());
- HWND hPortNo = GetDlgItem(hwnd, IDC_PORTNO);
- SetDlgItemInt(hwnd, IDC_PORTNO, PORT_TO_DISPLAY(_this->m_server->GetPort()), FALSE);
- EnableWindow(hPortNo, _this->m_server->SockConnected()
- && !_this->m_server->AutoPortSelect());
- HWND hPassword = GetDlgItem(hwnd, IDC_PASSWORD);
- EnableWindow(hPassword, _this->m_server->SockConnected());
- // Get the password
- char passwd[MAXPWLEN];
- _this->m_server->GetPassword(passwd);
- {
- vncPasswd::ToText plain(passwd);
- SetDlgItemText(hwnd, IDC_PASSWORD, (const char *) plain);
- }
- // Remote input settings
- HWND hEnableInputs = GetDlgItem(hwnd, IDC_DISABLE_INPUTS);
- SendMessage(hEnableInputs,
- BM_SETCHECK,
- !(_this->m_server->InputsEnabled()),
- 0);
- // Set the polling options
- HWND hPollFullScreen = GetDlgItem(hwnd, IDC_POLL_FULLSCREEN);
- SendMessage(hPollFullScreen,
- BM_SETCHECK,
- _this->m_server->PollFullScreen(),
- 0);
- HWND hPollForeground = GetDlgItem(hwnd, IDC_POLL_FOREGROUND);
- SendMessage(hPollForeground,
- BM_SETCHECK,
- _this->m_server->PollForeground(),
- 0);
- HWND hPollUnderCursor = GetDlgItem(hwnd, IDC_POLL_UNDER_CURSOR);
- SendMessage(hPollUnderCursor,
- BM_SETCHECK,
- _this->m_server->PollUnderCursor(),
- 0);
- HWND hPollConsoleOnly = GetDlgItem(hwnd, IDC_CONSOLE_ONLY);
- SendMessage(hPollConsoleOnly,
- BM_SETCHECK,
- _this->m_server->PollConsoleOnly(),
- 0);
- EnableWindow(hPollConsoleOnly,
- _this->m_server->PollUnderCursor() || _this->m_server->PollForeground()
- );
- HWND hPollOnEventOnly = GetDlgItem(hwnd, IDC_ONEVENT_ONLY);
- SendMessage(hPollOnEventOnly,
- BM_SETCHECK,
- _this->m_server->PollOnEventOnly(),
- 0);
- EnableWindow(hPollOnEventOnly,
- _this->m_server->PollUnderCursor() || _this->m_server->PollForeground()
- );
- SetForegroundWindow(hwnd);
- _this->m_dlgvisible = TRUE;
- return TRUE;
- }
- case WM_COMMAND:
- switch (LOWORD(wParam))
- {
- case IDOK:
- case IDC_APPLY:
- {
- // Save the password
- char passwd[MAXPWLEN+1];
- if (GetDlgItemText(hwnd, IDC_PASSWORD, (LPSTR) &passwd, MAXPWLEN+1) == 0)
- {
- vncPasswd::FromClear crypt;
- _this->m_server->SetPassword(crypt);
- }
- else
- {
- vncPasswd::FromText crypt(passwd);
- _this->m_server->SetPassword(crypt);
- }
- // Save the new settings to the server
- HWND hPortNoAuto = GetDlgItem(hwnd, IDC_PORTNO_AUTO);
- _this->m_server->SetAutoPortSelect(
- SendMessage(hPortNoAuto, BM_GETCHECK, 0, 0) == BST_CHECKED
- );
- // only save the port number if we're not auto selecting!
- if (!_this->m_server->AutoPortSelect())
- {
- BOOL success;
- UINT portno = GetDlgItemInt(hwnd, IDC_PORTNO, &success, TRUE);
- if (success)
- _this->m_server->SetPort(DISPLAY_TO_PORT(portno));
- }
- HWND hConnectSock = GetDlgItem(hwnd, IDC_CONNECT_SOCK);
- _this->m_server->SockConnect(
- SendMessage(hConnectSock, BM_GETCHECK, 0, 0) == BST_CHECKED
- );
- HWND hConnectCorba = GetDlgItem(hwnd, IDC_CONNECT_CORBA);
- _this->m_server->CORBAConnect(
- SendMessage(hConnectCorba, BM_GETCHECK, 0, 0) == BST_CHECKED
- );
- // Remote input stuff
- HWND hEnableInputs = GetDlgItem(hwnd, IDC_DISABLE_INPUTS);
- _this->m_server->EnableInputs(
- SendMessage(hEnableInputs, BM_GETCHECK, 0, 0) != BST_CHECKED
- );
- // Handle the polling stuff
- HWND hPollFullScreen = GetDlgItem(hwnd, IDC_POLL_FULLSCREEN);
- _this->m_server->PollFullScreen(
- SendMessage(hPollFullScreen, BM_GETCHECK, 0, 0) == BST_CHECKED
- );
- HWND hPollForeground = GetDlgItem(hwnd, IDC_POLL_FOREGROUND);
- _this->m_server->PollForeground(
- SendMessage(hPollForeground, BM_GETCHECK, 0, 0) == BST_CHECKED
- );
- HWND hPollUnderCursor = GetDlgItem(hwnd, IDC_POLL_UNDER_CURSOR);
- _this->m_server->PollUnderCursor(
- SendMessage(hPollUnderCursor, BM_GETCHECK, 0, 0) == BST_CHECKED
- );
- HWND hPollConsoleOnly = GetDlgItem(hwnd, IDC_CONSOLE_ONLY);
- _this->m_server->PollConsoleOnly(
- SendMessage(hPollConsoleOnly, BM_GETCHECK, 0, 0) == BST_CHECKED
- );
- HWND hPollOnEventOnly = GetDlgItem(hwnd, IDC_ONEVENT_ONLY);
- _this->m_server->PollOnEventOnly(
- SendMessage(hPollOnEventOnly, BM_GETCHECK, 0, 0) == BST_CHECKED
- );
- // And to the registry
- _this->Save();
- // Was ok pressed?
- if (LOWORD(wParam) == IDOK)
- {
- // Yes, so close the dialog
- log.Print(LL_INTINFO, VNCLOG("enddialog (OK)n"));
- _this->m_returncode_valid = TRUE;
- EndDialog(hwnd, IDOK);
- _this->m_dlgvisible = FALSE;
- }
- return TRUE;
- }
- case IDCANCEL:
- log.Print(LL_INTINFO, VNCLOG("enddialog (CANCEL)n"));
- _this->m_returncode_valid = TRUE;
- EndDialog(hwnd, IDCANCEL);
- _this->m_dlgvisible = FALSE;
- return TRUE;
- case IDC_CONNECT_SOCK:
- // The user has clicked on the socket connect tickbox
- {
- HWND hConnectSock = GetDlgItem(hwnd, IDC_CONNECT_SOCK);
- BOOL connectsockon =
- (SendMessage(hConnectSock, BM_GETCHECK, 0, 0) == BST_CHECKED);
- HWND hPortNoAuto = GetDlgItem(hwnd, IDC_PORTNO_AUTO);
- EnableWindow(hPortNoAuto, connectsockon);
- HWND hPortNo = GetDlgItem(hwnd, IDC_PORTNO);
- EnableWindow(hPortNo, connectsockon
- && (SendMessage(hPortNoAuto, BM_GETCHECK, 0, 0) != BST_CHECKED));
- HWND hPassword = GetDlgItem(hwnd, IDC_PASSWORD);
- EnableWindow(hPassword, connectsockon);
- }
- return TRUE;
- case IDC_POLL_FOREGROUND:
- case IDC_POLL_UNDER_CURSOR:
- // User has clicked on one of the polling mode buttons
- // affected by the pollconsole and pollonevent options
- {
- // Get the poll-mode buttons
- HWND hPollForeground = GetDlgItem(hwnd, IDC_POLL_FOREGROUND);
- HWND hPollUnderCursor = GetDlgItem(hwnd, IDC_POLL_UNDER_CURSOR);
- // Determine whether to enable the modifier options
- BOOL enabled = (SendMessage(hPollForeground, BM_GETCHECK, 0, 0) == BST_CHECKED) ||
- (SendMessage(hPollUnderCursor, BM_GETCHECK, 0, 0) == BST_CHECKED);
- HWND hPollConsoleOnly = GetDlgItem(hwnd, IDC_CONSOLE_ONLY);
- EnableWindow(hPollConsoleOnly, enabled);
- HWND hPollOnEventOnly = GetDlgItem(hwnd, IDC_ONEVENT_ONLY);
- EnableWindow(hPollOnEventOnly, enabled);
- }
- return TRUE;
- case IDC_PORTNO_AUTO:
- // User has toggled the Auto Port Select feature.
- // If this is in use, then we don't allow the Display number field
- // to be modified!
- {
- // Get the auto select button
- HWND hPortNoAuto = GetDlgItem(hwnd, IDC_PORTNO_AUTO);
- // Should the portno field be modifiable?
- BOOL enable = SendMessage(hPortNoAuto, BM_GETCHECK, 0, 0) != BST_CHECKED;
- // Set the state
- HWND hPortNo = GetDlgItem(hwnd, IDC_PORTNO);
- EnableWindow(hPortNo, enable);
- }
- return TRUE;
- }
- break;
- }
- return 0;
- }
- // Functions to load & save the settings
- LONG
- vncProperties::LoadInt(HKEY key, LPCSTR valname, LONG defval)
- {
- LONG pref;
- ULONG type = REG_DWORD;
- ULONG prefsize = sizeof(pref);
- if (RegQueryValueEx(key,
- valname,
- NULL,
- &type,
- (LPBYTE) &pref,
- &prefsize) != ERROR_SUCCESS)
- return defval;
- if (type != REG_DWORD)
- return defval;
- if (prefsize != sizeof(pref))
- return defval;
- return pref;
- }
- void
- vncProperties::LoadPassword(HKEY key, char *buffer)
- {
- DWORD type;
- int slen=MAXPWLEN;
- char inouttext[MAXPWLEN];
- // Retrieve the encrypted password
- if (RegQueryValueEx(key,
- "Password",
- NULL,
- &type,
- (LPBYTE) &inouttext,
- (LPDWORD) &slen) != ERROR_SUCCESS)
- return;
- if (slen > MAXPWLEN)
- return;
- memcpy(buffer, inouttext, MAXPWLEN);
- }
- void
- vncProperties::Load()
- {
- char username[UNLEN+1];
- HKEY hkLocal, hkLocalUser, hkDefault;
- DWORD dw;
- // NEW (R3) PREFERENCES ALGORITHM
- // 1. Look in HKEY_LOCAL_MACHINE/Software/ORL/WinVNC3/%username%
- // for sysadmin-defined, user-specific settings.
- // 2. If not found, fall back to %username%=Default
- // 3. If AllowOverrides is set then load settings from
- // HKEY_CURRENT_USER/Software/ORL/WinVNC3
- // GET THE CORRECT KEY TO READ FROM
- // Get the user name / service name
- if (!vncService::CurrentUser((char *)&username, sizeof(username)))
- return;
- // If there is no user logged on them default to SYSTEM
- if (strcmp(username, "") == 0)
- strcpy((char *)&username, "SYSTEM");
- // Try to get the machine registry key for WinVNC
- if (RegCreateKeyEx(HKEY_LOCAL_MACHINE,
- WINVNC_REGISTRY_KEY,
- 0, REG_NONE, REG_OPTION_NON_VOLATILE,
- KEY_READ, NULL, &hkLocal, &dw) != ERROR_SUCCESS)
- return;
- // Now try to get the per-user key
- if (RegOpenKeyEx(hkLocal,
- username,
- 0, KEY_READ,
- &hkLocalUser) != ERROR_SUCCESS)
- hkLocalUser = NULL;
- // Get the default key
- if (RegCreateKeyEx(hkLocal,
- "Default",
- 0, REG_NONE, REG_OPTION_NON_VOLATILE,
- KEY_READ,
- NULL,
- &hkDefault,
- &dw) != ERROR_SUCCESS)
- hkDefault = NULL;
- // LOAD THE MACHINE-LEVEL PREFS
- // Logging/debugging prefs
- log.SetMode(LoadInt(hkLocal, "DebugMode", 0));
- log.SetLevel(LoadInt(hkLocal, "DebugLevel", 0));
- // Authentication required, loopback allowed
- m_server->SetLoopbackOk(LoadInt(hkLocal, "AllowLoopback", false));
- m_server->SetAuthRequired(LoadInt(hkLocal, "AuthRequired", true));
- m_server->SetConnectPriority(LoadInt(hkLocal, "ConnectPriority", 0));
- // LOAD THE USER PREFERENCES
- // Set the default user prefs
- log.Print(LL_INTINFO, VNCLOG("clearing settingsn"));
- m_server->SetAutoPortSelect(TRUE);
- m_server->SockConnect(TRUE);
- m_server->CORBAConnect(FALSE);
- {
- vncPasswd::FromClear crypt;
- m_server->SetPassword(crypt);
- }
- m_server->EnableInputs(TRUE);
- m_server->SetLockSettings(-1);
- m_server->PollUnderCursor(FALSE);
- m_server->PollForeground(TRUE);
- m_server->PollFullScreen(FALSE);
- m_server->PollConsoleOnly(TRUE);
- m_server->PollOnEventOnly(FALSE);
- m_allowshutdown = TRUE;
- m_allowproperties = TRUE;
- // Load the user prefs
- if (hkDefault != NULL)
- {
- log.Print(LL_INTINFO, VNCLOG("loading DEFAULT settingsn"));
- LoadUserPrefs(hkDefault);
- m_allowshutdown = LoadInt(hkDefault, "AllowShutdown", m_allowshutdown);
- m_allowproperties = LoadInt(hkDefault, "AllowProperties", m_allowproperties);
- }
- if (hkLocalUser != NULL)
- {
- log.Print(LL_INTINFO, VNCLOG("loading "%s" local settingsn"), username);
- LoadUserPrefs(hkLocalUser);
- m_allowshutdown = LoadInt(hkLocalUser, "AllowShutdown", m_allowshutdown);
- m_allowproperties = LoadInt(hkLocalUser, "AllowProperties", m_allowproperties);
- }
- if (m_allowproperties)
- {
- // Now override the system settings with the user's settings
- HKEY hkGlobalUser;
- if (RegCreateKeyEx(HKEY_CURRENT_USER,
- WINVNC_REGISTRY_KEY,
- 0, REG_NONE, REG_OPTION_NON_VOLATILE,
- KEY_READ, NULL, &hkGlobalUser, &dw) == ERROR_SUCCESS)
- {
- log.Print(LL_INTINFO, VNCLOG("loading "%s" global settingsn"), username);
- LoadUserPrefs(hkGlobalUser);
- RegCloseKey(hkGlobalUser);
- }
- }
- if (hkDefault != NULL) RegCloseKey(hkLocalUser);
- if (hkDefault != NULL) RegCloseKey(hkDefault);
- RegCloseKey(hkLocal);
- }
- void
- vncProperties::LoadUserPrefs(HKEY appkey)
- {
- // LOAD USER PREFS FROM THE SELECTED KEY
- // Connection prefs
- m_server->SockConnect(
- LoadInt(appkey, "SocketConnect", m_server->SockConnected())
- );
- m_server->SetAutoPortSelect(
- LoadInt(appkey, "AutoPortSelect", m_server->AutoPortSelect())
- );
- if (!m_server->AutoPortSelect())
- {
- m_server->SetPort(
- LoadInt(appkey, "PortNumber", m_server->GetPort())
- );
- }
- // Load the password
- char passwd[MAXPWLEN];
- m_server->GetPassword(passwd);
- LoadPassword(appkey, passwd);
- m_server->SetPassword(passwd);
- // Clear out the existing CORBA object & generate a new one if required
- m_server->CORBAConnect(
- LoadInt(appkey, "CORBAConnect", m_server->CORBAConnected())
- );
- // Remote access prefs
- m_server->EnableInputs(
- LoadInt(appkey, "InputsEnabled", m_server->InputsEnabled())
- );
- m_server->SetLockSettings(
- LoadInt(appkey, "LockSetting", -1)
- );
- // Polling prefs
- m_server->PollUnderCursor(
- LoadInt(appkey, "PollUnderCursor", m_server->PollUnderCursor())
- );
- m_server->PollForeground(
- LoadInt(appkey, "PollForeground", m_server->PollForeground())
- );
- m_server->PollFullScreen(
- LoadInt(appkey, "PollFullScreen", m_server->PollFullScreen())
- );
- m_server->PollConsoleOnly(
- LoadInt(appkey, "OnlyPollConsole", m_server->PollConsoleOnly())
- );
- m_server->PollOnEventOnly(
- LoadInt(appkey, "OnlyPollOnEvent", m_server->PollOnEventOnly())
- );
- }
- void
- vncProperties::SaveInt(HKEY key, LPSTR valname, LONG val)
- {
- RegSetValueEx(key, valname, 0, REG_DWORD, (LPBYTE) &val, sizeof(val));
- }
- void
- vncProperties::SavePassword(HKEY key, char *buffer)
- {
- RegSetValueEx(key, "Password", 0, REG_BINARY, (LPBYTE) buffer, MAXPWLEN);
- }
- void
- vncProperties::Save()
- {
- HKEY appkey;
- DWORD dw;
- // NEW (R3) PREFERENCES ALGORITHM
- // The user's prefs are only saved if the user is allowed to override
- // the machine-local settings specified for them. Otherwise, the
- // properties entry on the tray icon menu will be greyed out.
- // GET THE CORRECT KEY TO READ FROM
- // Try to get the machine registry key for WinVNC
- if (RegCreateKeyEx(HKEY_CURRENT_USER,
- WINVNC_REGISTRY_KEY,
- 0, REG_NONE, REG_OPTION_NON_VOLATILE,
- KEY_WRITE | KEY_READ, NULL, &appkey, &dw) != ERROR_SUCCESS)
- return;
- // SAVE PER-USER PREFS IF ALLOWED
- if (m_allowproperties)
- SaveUserPrefs(appkey);
- RegCloseKey(appkey);
- }
- void
- vncProperties::SaveUserPrefs(HKEY appkey)
- {
- // SAVE THE PER USER PREFS
- // Connection prefs
- SaveInt(appkey, "SocketConnect", m_server->SockConnected());
- SaveInt(appkey, "AutoPortSelect", m_server->AutoPortSelect());
- if (!m_server->AutoPortSelect())
- SaveInt(appkey, "PortNumber", m_server->GetPort());
- SaveInt(appkey, "InputsEnabled", m_server->InputsEnabled());
- // Save the password
- char passwd[MAXPWLEN];
- m_server->GetPassword(passwd);
- SavePassword(appkey, passwd);
- #if(defined(_CORBA))
- // Don't save the CORBA enabled flag if CORBA is not compiled in!
- SaveInt(appkey, "CORBAConnect", m_server->CORBAConnected());
- #endif
- // Polling prefs
- SaveInt(appkey, "PollUnderCursor", m_server->PollUnderCursor());
- SaveInt(appkey, "PollForeground", m_server->PollForeground());
- SaveInt(appkey, "PollFullScreen", m_server->PollFullScreen());
- SaveInt(appkey, "OnlyPollConsole", m_server->PollConsoleOnly());
- SaveInt(appkey, "OnlyPollOnEvent", m_server->PollOnEventOnly());
- }