Added debug level combo box and version number to title bar.

This commit is contained in:
crs 2002-09-14 12:05:06 +00:00
parent 06856e170d
commit 10bbf6f824
3 changed files with 329 additions and 294 deletions

View File

@ -16,6 +16,7 @@
#include "ProtocolTypes.h" #include "ProtocolTypes.h"
#include "CPlatform.h" #include "CPlatform.h"
#include "CNetwork.h" #include "CNetwork.h"
#include "CLog.h"
#include "Version.h" #include "Version.h"
#include "stdvector.h" #include "stdvector.h"
#include "resource.h" #include "resource.h"
@ -50,6 +51,17 @@ HINSTANCE s_instance = NULL;
static const TCHAR* s_mainClass = TEXT("GoSynergy"); static const TCHAR* s_mainClass = TEXT("GoSynergy");
static const TCHAR* s_layoutClass = TEXT("SynergyLayout"); static const TCHAR* s_layoutClass = TEXT("SynergyLayout");
static const char* s_debugName[][2] = {
{ TEXT("Error"), "ERROR" },
{ TEXT("Warning"), "WARNING" },
{ TEXT("Note"), "NOTE" },
{ TEXT("Info"), "INFO" },
{ TEXT("Debug"), "DEBUG" },
{ TEXT("Debug1"), "DEBUG1" },
{ TEXT("Debug2"), "DEBUG2" }
};
static const int s_defaultDebug = 3; // INFO
static HWND s_mainWindow; static HWND s_mainWindow;
static CConfig s_config; static CConfig s_config;
static CConfig s_oldConfig; static CConfig s_oldConfig;
@ -97,7 +109,7 @@ static
bool bool
isClientChecked(HWND hwnd) isClientChecked(HWND hwnd)
{ {
HWND child = GetDlgItem(hwnd, IDC_MAIN_CLIENT_RADIO); HWND child = getItem(hwnd, IDC_MAIN_CLIENT_RADIO);
return (SendMessage(child, BM_GETCHECK, 0, 0) == BST_CHECKED); return (SendMessage(child, BM_GETCHECK, 0, 0) == BST_CHECKED);
} }
@ -116,7 +128,7 @@ enableScreensControls(HWND hwnd)
bool client = isClientChecked(hwnd); bool client = isClientChecked(hwnd);
bool screenSelected = false; bool screenSelected = false;
if (!client) { if (!client) {
HWND child = GetDlgItem(hwnd, IDC_MAIN_SERVER_SCREENS_LIST); HWND child = getItem(hwnd, IDC_MAIN_SERVER_SCREENS_LIST);
if (SendMessage(child, LB_GETCURSEL, 0, 0) != LB_ERR) { if (SendMessage(child, LB_GETCURSEL, 0, 0) != LB_ERR) {
screenSelected = true; screenSelected = true;
} }
@ -167,7 +179,7 @@ updateNeighbor(HWND hwnd, const CString& screen, EDirection direction)
} }
// add empty neighbor to combo box // add empty neighbor to combo box
SendMessage(hwnd, CB_ADDSTRING, 0, (LPARAM)"---"); SendMessage(hwnd, CB_ADDSTRING, 0, (LPARAM)TEXT("---"));
// select neighbor in combo box // select neighbor in combo box
LRESULT index = 0; LRESULT index = 0;
@ -190,20 +202,20 @@ updateNeighbors(HWND hwnd)
{ {
// get selected screen name or empty string if no selection // get selected screen name or empty string if no selection
CString screen; CString screen;
HWND child = GetDlgItem(hwnd, IDC_MAIN_SERVER_SCREENS_LIST); HWND child = getItem(hwnd, IDC_MAIN_SERVER_SCREENS_LIST);
LRESULT index = SendMessage(child, LB_GETCURSEL, 0, 0); LRESULT index = SendMessage(child, LB_GETCURSEL, 0, 0);
if (index != LB_ERR) { if (index != LB_ERR) {
screen = s_screens[index]; screen = s_screens[index];
} }
// set neighbor combo boxes // set neighbor combo boxes
child = GetDlgItem(hwnd, IDC_MAIN_SERVER_LEFT_COMBO); child = getItem(hwnd, IDC_MAIN_SERVER_LEFT_COMBO);
updateNeighbor(child, screen, kLeft); updateNeighbor(child, screen, kLeft);
child = GetDlgItem(hwnd, IDC_MAIN_SERVER_RIGHT_COMBO); child = getItem(hwnd, IDC_MAIN_SERVER_RIGHT_COMBO);
updateNeighbor(child, screen, kRight); updateNeighbor(child, screen, kRight);
child = GetDlgItem(hwnd, IDC_MAIN_SERVER_TOP_COMBO); child = getItem(hwnd, IDC_MAIN_SERVER_TOP_COMBO);
updateNeighbor(child, screen, kTop); updateNeighbor(child, screen, kTop);
child = GetDlgItem(hwnd, IDC_MAIN_SERVER_BOTTOM_COMBO); child = getItem(hwnd, IDC_MAIN_SERVER_BOTTOM_COMBO);
updateNeighbor(child, screen, kBottom); updateNeighbor(child, screen, kBottom);
} }
@ -221,7 +233,7 @@ addScreen(HWND hwnd)
UInt32 i = s_screens.size(); UInt32 i = s_screens.size();
// add screen to list control // add screen to list control
HWND child = GetDlgItem(hwnd, IDC_MAIN_SERVER_SCREENS_LIST); HWND child = getItem(hwnd, IDC_MAIN_SERVER_SCREENS_LIST);
CString item = CStringUtil::print("%d. %s", CString item = CStringUtil::print("%d. %s",
i + 1, info.m_screen.c_str()); i + 1, info.m_screen.c_str());
SendMessage(child, LB_ADDSTRING, 0, (LPARAM)item.c_str()); SendMessage(child, LB_ADDSTRING, 0, (LPARAM)item.c_str());
@ -250,7 +262,7 @@ void
editScreen(HWND hwnd) editScreen(HWND hwnd)
{ {
// get selected list item // get selected list item
HWND child = GetDlgItem(hwnd, IDC_MAIN_SERVER_SCREENS_LIST); HWND child = getItem(hwnd, IDC_MAIN_SERVER_SCREENS_LIST);
LRESULT index = SendMessage(child, LB_GETCURSEL, 0, 0); LRESULT index = SendMessage(child, LB_GETCURSEL, 0, 0);
if (index == LB_ERR) { if (index == LB_ERR) {
// no selection // no selection
@ -311,7 +323,7 @@ void
removeScreen(HWND hwnd) removeScreen(HWND hwnd)
{ {
// get selected list item // get selected list item
HWND child = GetDlgItem(hwnd, IDC_MAIN_SERVER_SCREENS_LIST); HWND child = getItem(hwnd, IDC_MAIN_SERVER_SCREENS_LIST);
LRESULT index = SendMessage(child, LB_GETCURSEL, 0, 0); LRESULT index = SendMessage(child, LB_GETCURSEL, 0, 0);
if (index == LB_ERR) { if (index == LB_ERR) {
// no selection // no selection
@ -341,7 +353,7 @@ void
changeNeighbor(HWND hwnd, HWND combo, EDirection direction) changeNeighbor(HWND hwnd, HWND combo, EDirection direction)
{ {
// get selected screen // get selected screen
HWND child = GetDlgItem(hwnd, IDC_MAIN_SERVER_SCREENS_LIST); HWND child = getItem(hwnd, IDC_MAIN_SERVER_SCREENS_LIST);
LRESULT index = SendMessage(child, LB_GETCURSEL, 0, 0); LRESULT index = SendMessage(child, LB_GETCURSEL, 0, 0);
if (index == LB_ERR) { if (index == LB_ERR) {
// no selection // no selection
@ -430,7 +442,7 @@ getCommandLine(HWND hwnd, bool testing)
const bool isClient = isClientChecked(hwnd); const bool isClient = isClientChecked(hwnd);
// get and verify screen name // get and verify screen name
HWND child = GetDlgItem(hwnd, IDC_MAIN_ADVANCED_NAME_EDIT); HWND child = getItem(hwnd, IDC_MAIN_ADVANCED_NAME_EDIT);
CString name = getWindowText(child); CString name = getWindowText(child);
if (!s_config.isValidScreenName(name)) { if (!s_config.isValidScreenName(name)) {
showError(hwnd, CStringUtil::format( showError(hwnd, CStringUtil::format(
@ -448,7 +460,7 @@ getCommandLine(HWND hwnd, bool testing)
} }
// get and verify port // get and verify port
child = GetDlgItem(hwnd, IDC_MAIN_ADVANCED_PORT_EDIT); child = getItem(hwnd, IDC_MAIN_ADVANCED_PORT_EDIT);
CString portString = getWindowText(child); CString portString = getWindowText(child);
UInt32 port = (UInt32)atoi(portString.c_str()); UInt32 port = (UInt32)atoi(portString.c_str());
if (port < 1 || port > 65535) { if (port < 1 || port > 65535) {
@ -464,13 +476,19 @@ getCommandLine(HWND hwnd, bool testing)
// prepare command line // prepare command line
CString cmdLine; CString cmdLine;
if (testing) { if (testing) {
// constant testing args
cmdLine += " -z --no-restart --no-daemon"; cmdLine += " -z --no-restart --no-daemon";
// debug level testing arg
child = getItem(hwnd, IDC_MAIN_DEBUG);
cmdLine += " --debug ";
cmdLine += s_debugName[SendMessage(child, CB_GETCURSEL, 0, 0)][1];
} }
cmdLine += " --name "; cmdLine += " --name ";
cmdLine += name; cmdLine += name;
if (isClient) { if (isClient) {
// check server name // check server name
child = GetDlgItem(hwnd, IDC_MAIN_CLIENT_SERVER_NAME_EDIT); child = getItem(hwnd, IDC_MAIN_CLIENT_SERVER_NAME_EDIT);
CString server = getWindowText(child); CString server = getWindowText(child);
if (!s_config.isValidScreenName(server)) { if (!s_config.isValidScreenName(server)) {
showError(hwnd, CStringUtil::format( showError(hwnd, CStringUtil::format(
@ -633,6 +651,10 @@ initMainWindow(HWND hwnd)
{ {
CPlatform platform; CPlatform platform;
// append version number to title
CString titleFormat = getString(IDS_TITLE);
setWindowText(hwnd, CStringUtil::format(titleFormat.c_str(), VERSION));
// load configuration // load configuration
bool configLoaded = loadConfig(s_config); bool configLoaded = loadConfig(s_config);
s_oldConfig = s_config; s_oldConfig = s_config;
@ -640,17 +662,17 @@ initMainWindow(HWND hwnd)
// choose client/server radio buttons // choose client/server radio buttons
HWND child; HWND child;
child = GetDlgItem(hwnd, IDC_MAIN_CLIENT_RADIO); child = getItem(hwnd, IDC_MAIN_CLIENT_RADIO);
SendMessage(child, BM_SETCHECK, !configLoaded ? SendMessage(child, BM_SETCHECK, !configLoaded ?
BST_CHECKED : BST_UNCHECKED, 0); BST_CHECKED : BST_UNCHECKED, 0);
child = GetDlgItem(hwnd, IDC_MAIN_SERVER_RADIO); child = getItem(hwnd, IDC_MAIN_SERVER_RADIO);
SendMessage(child, BM_SETCHECK, configLoaded ? SendMessage(child, BM_SETCHECK, configLoaded ?
BST_CHECKED : BST_UNCHECKED, 0); BST_CHECKED : BST_UNCHECKED, 0);
// if config is loaded then initialize server controls // if config is loaded then initialize server controls
if (configLoaded) { if (configLoaded) {
int i = 1; int i = 1;
child = GetDlgItem(hwnd, IDC_MAIN_SERVER_SCREENS_LIST); child = getItem(hwnd, IDC_MAIN_SERVER_SCREENS_LIST);
for (CConfig::const_iterator index = s_config.begin(); for (CConfig::const_iterator index = s_config.begin();
index != s_config.end(); ++i, ++index) { index != s_config.end(); ++i, ++index) {
s_screens.push_back(*index); s_screens.push_back(*index);
@ -662,13 +684,20 @@ initMainWindow(HWND hwnd)
// initialize other controls // initialize other controls
char buffer[256]; char buffer[256];
sprintf(buffer, "%d", kDefaultPort); sprintf(buffer, "%d", kDefaultPort);
child = GetDlgItem(hwnd, IDC_MAIN_ADVANCED_PORT_EDIT); child = getItem(hwnd, IDC_MAIN_ADVANCED_PORT_EDIT);
SendMessage(child, WM_SETTEXT, 0, (LPARAM)buffer); SendMessage(child, WM_SETTEXT, 0, (LPARAM)buffer);
CNetwork::gethostname(buffer, sizeof(buffer)); CNetwork::gethostname(buffer, sizeof(buffer));
child = GetDlgItem(hwnd, IDC_MAIN_ADVANCED_NAME_EDIT); child = getItem(hwnd, IDC_MAIN_ADVANCED_NAME_EDIT);
SendMessage(child, WM_SETTEXT, 0, (LPARAM)buffer); SendMessage(child, WM_SETTEXT, 0, (LPARAM)buffer);
child = getItem(hwnd, IDC_MAIN_DEBUG);
for (unsigned int i = 0; i < sizeof(s_debugName) /
sizeof(s_debugName[0]); ++i) {
SendMessage(child, CB_ADDSTRING, 0, (LPARAM)s_debugName[i][0]);
}
SendMessage(child, CB_SETCURSEL, s_defaultDebug, 0);
// update neighbor combo boxes // update neighbor combo boxes
enableMainWindowControls(hwnd); enableMainWindowControls(hwnd);
updateNeighbors(hwnd); updateNeighbors(hwnd);
@ -686,7 +715,7 @@ addDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
info = (CScreenInfo*)lParam; info = (CScreenInfo*)lParam;
// fill in screen name // fill in screen name
HWND child = GetDlgItem(hwnd, IDC_ADD_SCREEN_NAME_EDIT); HWND child = getItem(hwnd, IDC_ADD_SCREEN_NAME_EDIT);
SendMessage(child, WM_SETTEXT, 0, (LPARAM)info->m_screen.c_str()); SendMessage(child, WM_SETTEXT, 0, (LPARAM)info->m_screen.c_str());
// fill in aliases // fill in aliases
@ -698,7 +727,7 @@ addDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
} }
aliases += *index; aliases += *index;
} }
child = GetDlgItem(hwnd, IDC_ADD_ALIASES_EDIT); child = getItem(hwnd, IDC_ADD_ALIASES_EDIT);
SendMessage(child, WM_SETTEXT, 0, (LPARAM)aliases.c_str()); SendMessage(child, WM_SETTEXT, 0, (LPARAM)aliases.c_str());
return TRUE; return TRUE;
@ -711,9 +740,9 @@ addDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
CStringList newAliases; CStringList newAliases;
// extract name and aliases // extract name and aliases
HWND child = GetDlgItem(hwnd, IDC_ADD_SCREEN_NAME_EDIT); HWND child = getItem(hwnd, IDC_ADD_SCREEN_NAME_EDIT);
newName = getWindowText(child); newName = getWindowText(child);
child = GetDlgItem(hwnd, IDC_ADD_ALIASES_EDIT); child = getItem(hwnd, IDC_ADD_ALIASES_EDIT);
tokenize(newAliases, getWindowText(child)); tokenize(newAliases, getWindowText(child));
// name must be valid // name must be valid

View File

@ -1,269 +1,273 @@
//Microsoft Developer Studio generated resource script. //Microsoft Developer Studio generated resource script.
// //
#include "resource.h" #include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS #define APSTUDIO_READONLY_SYMBOLS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Generated from the TEXTINCLUDE 2 resource. // Generated from the TEXTINCLUDE 2 resource.
// //
#include "afxres.h" #include "afxres.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS #undef APSTUDIO_READONLY_SYMBOLS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources // English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32 #ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252) #pragma code_page(1252)
#endif //_WIN32 #endif //_WIN32
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// TEXTINCLUDE // TEXTINCLUDE
// //
1 TEXTINCLUDE DISCARDABLE 1 TEXTINCLUDE DISCARDABLE
BEGIN BEGIN
"resource.h\0" "resource.h\0"
END END
2 TEXTINCLUDE DISCARDABLE 2 TEXTINCLUDE DISCARDABLE
BEGIN BEGIN
"#include ""afxres.h""\r\n" "#include ""afxres.h""\r\n"
"\0" "\0"
END END
3 TEXTINCLUDE DISCARDABLE 3 TEXTINCLUDE DISCARDABLE
BEGIN BEGIN
"\r\n" "\r\n"
"\0" "\0"
END END
#endif // APSTUDIO_INVOKED #endif // APSTUDIO_INVOKED
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Dialog // Dialog
// //
IDD_MAIN DIALOG DISCARDABLE 32768, 0, 300, 262 IDD_MAIN DIALOG DISCARDABLE 32768, 0, 300, 262
STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU
CAPTION "Synergy" CAPTION "Synergy"
CLASS "GoSynergy" CLASS "GoSynergy"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
LTEXT "Choose to start either the Client or Server and provide the requested information. Then click Test to check your settings or Start to save your settings and start Synergy.", LTEXT "Choose to start either the Client or Server and provide the requested information. Then click Test to check your settings or Start to save your settings and start Synergy.",
IDC_STATIC,7,7,286,19 IDC_STATIC,7,7,286,19
GROUPBOX "",IDC_STATIC,7,29,286,31 GROUPBOX "",IDC_STATIC,7,29,286,31
GROUPBOX "",IDC_STATIC,7,67,286,103 GROUPBOX "",IDC_STATIC,7,67,286,103
GROUPBOX "Advanced Options",IDC_STATIC,7,177,286,56 GROUPBOX "Advanced Options",IDC_STATIC,7,177,286,56
CONTROL "&Client",IDC_MAIN_CLIENT_RADIO,"Button", CONTROL "&Client",IDC_MAIN_CLIENT_RADIO,"Button",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,11,29,33,10 BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,11,29,33,10
CONTROL "Server",IDC_MAIN_SERVER_RADIO,"Button", CONTROL "Server",IDC_MAIN_SERVER_RADIO,"Button",
BS_AUTORADIOBUTTON,11,67,37,10 BS_AUTORADIOBUTTON,11,67,37,10
LTEXT "Server &Host Name:",IDC_MAIN_CLIENT_SERVER_NAME_LABEL, LTEXT "Server &Host Name:",IDC_MAIN_CLIENT_SERVER_NAME_LABEL,
12,41,61,8 12,41,61,8
EDITTEXT IDC_MAIN_CLIENT_SERVER_NAME_EDIT,79,39,106,12, EDITTEXT IDC_MAIN_CLIENT_SERVER_NAME_EDIT,79,39,106,12,
ES_AUTOHSCROLL ES_AUTOHSCROLL
LTEXT "&Screens:",IDC_MAIN_SERVER_SCREENS_LABEL,12,79,29,8 LTEXT "&Screens:",IDC_MAIN_SERVER_SCREENS_LABEL,12,79,29,8
LISTBOX IDC_MAIN_SERVER_SCREENS_LIST,12,91,106,36, LISTBOX IDC_MAIN_SERVER_SCREENS_LIST,12,91,106,36,
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Add",IDC_MAIN_SERVER_ADD_BUTTON,12,132,50,14 PUSHBUTTON "&Add",IDC_MAIN_SERVER_ADD_BUTTON,12,132,50,14
PUSHBUTTON "&Edit",IDC_MAIN_SERVER_EDIT_BUTTON,68,132,50,14 PUSHBUTTON "&Edit",IDC_MAIN_SERVER_EDIT_BUTTON,68,132,50,14
PUSHBUTTON "&Remove",IDC_MAIN_SERVER_REMOVE_BUTTON,12,150,50,14 PUSHBUTTON "&Remove",IDC_MAIN_SERVER_REMOVE_BUTTON,12,150,50,14
LTEXT "&Layout:",IDC_MAIN_SERVER_LAYOUT_LABEL,138,79,24,8 LTEXT "&Layout:",IDC_MAIN_SERVER_LAYOUT_LABEL,138,79,24,8
LTEXT "Left:",IDC_MAIN_SERVER_LEFT_LABEL,144,93,15,8 LTEXT "Left:",IDC_MAIN_SERVER_LEFT_LABEL,144,93,15,8
COMBOBOX IDC_MAIN_SERVER_LEFT_COMBO,175,91,118,46, COMBOBOX IDC_MAIN_SERVER_LEFT_COMBO,175,91,118,46,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "Right:",IDC_MAIN_SERVER_RIGHT_LABEL,144,109,20,8 LTEXT "Right:",IDC_MAIN_SERVER_RIGHT_LABEL,144,109,20,8
COMBOBOX IDC_MAIN_SERVER_RIGHT_COMBO,175,107,118,46, COMBOBOX IDC_MAIN_SERVER_RIGHT_COMBO,175,107,118,46,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "Above:",IDC_MAIN_SERVER_TOP_LABEL,144,125,24,8 LTEXT "Above:",IDC_MAIN_SERVER_TOP_LABEL,144,125,24,8
COMBOBOX IDC_MAIN_SERVER_TOP_COMBO,175,123,118,46, COMBOBOX IDC_MAIN_SERVER_TOP_COMBO,175,123,118,46,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "Below:",IDC_MAIN_SERVER_BOTTOM_LABEL,144,141,22,8 LTEXT "Below:",IDC_MAIN_SERVER_BOTTOM_LABEL,144,141,22,8
COMBOBOX IDC_MAIN_SERVER_BOTTOM_COMBO,175,139,118,46, COMBOBOX IDC_MAIN_SERVER_BOTTOM_COMBO,175,139,118,46,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "Screen &Name:",IDC_STATIC,12,192,46,8 LTEXT "Screen &Name:",IDC_STATIC,12,192,46,8
EDITTEXT IDC_MAIN_ADVANCED_NAME_EDIT,64,190,106,12,ES_AUTOHSCROLL EDITTEXT IDC_MAIN_ADVANCED_NAME_EDIT,64,190,106,12,ES_AUTOHSCROLL
LTEXT "&Port:",IDC_STATIC,194,192,16,8 LTEXT "&Port:",IDC_STATIC,194,192,16,8
EDITTEXT IDC_MAIN_ADVANCED_PORT_EDIT,216,190,40,12,ES_AUTOHSCROLL | EDITTEXT IDC_MAIN_ADVANCED_PORT_EDIT,216,190,40,12,ES_AUTOHSCROLL |
ES_NUMBER ES_NUMBER
LTEXT "Automatic Startup:",IDC_STATIC,12,212,59,8 LTEXT "Automatic Startup:",IDC_STATIC,12,212,59,8
PUSHBUTTON "Con&figure...",IDC_MAIN_AUTOSTART,78,210,50,14 PUSHBUTTON "Con&figure...",IDC_MAIN_AUTOSTART,78,210,50,14
PUSHBUTTON "Sa&ve",IDC_MAIN_SAVE,75,241,50,14 LTEXT "Test &Debug Level:",IDC_STATIC,151,212,60,8
DEFPUSHBUTTON "&Test",IDC_MAIN_TEST,131,241,50,14 COMBOBOX IDC_MAIN_DEBUG,216,210,61,60,CBS_DROPDOWNLIST |
PUSHBUTTON "Start",IDOK,187,241,50,14 WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Quit",IDCANCEL,243,241,50,14 PUSHBUTTON "Sa&ve",IDC_MAIN_SAVE,75,241,50,14
END DEFPUSHBUTTON "&Test",IDC_MAIN_TEST,131,241,50,14
PUSHBUTTON "Start",IDOK,187,241,50,14
IDD_ADD DIALOG DISCARDABLE 0, 0, 172, 95 PUSHBUTTON "Quit",IDCANCEL,243,241,50,14
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION END
CAPTION "Add Screen"
FONT 8, "MS Sans Serif" IDD_ADD DIALOG DISCARDABLE 0, 0, 172, 95
BEGIN STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
LTEXT "Screen Name:",IDC_STATIC,7,9,46,8 CAPTION "Add Screen"
EDITTEXT IDC_ADD_SCREEN_NAME_EDIT,59,7,106,12,ES_AUTOHSCROLL FONT 8, "MS Sans Serif"
LTEXT "Aliases:",IDC_STATIC,7,25,25,8 BEGIN
EDITTEXT IDC_ADD_ALIASES_EDIT,59,26,106,40,ES_MULTILINE | LTEXT "Screen Name:",IDC_STATIC,7,9,46,8
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN EDITTEXT IDC_ADD_SCREEN_NAME_EDIT,59,7,106,12,ES_AUTOHSCROLL
DEFPUSHBUTTON "OK",IDOK,59,74,50,14 LTEXT "Aliases:",IDC_STATIC,7,25,25,8
PUSHBUTTON "Cancel",IDCANCEL,115,74,50,14 EDITTEXT IDC_ADD_ALIASES_EDIT,59,26,106,40,ES_MULTILINE |
END ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN
DEFPUSHBUTTON "OK",IDOK,59,74,50,14
IDD_WAIT DIALOG DISCARDABLE 0, 0, 186, 54 PUSHBUTTON "Cancel",IDCANCEL,115,74,50,14
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION END
CAPTION "Running Test..."
FONT 8, "MS Sans Serif" IDD_WAIT DIALOG DISCARDABLE 0, 0, 186, 54
BEGIN STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
DEFPUSHBUTTON "Stop",IDOK,129,33,50,14 CAPTION "Running Test..."
LTEXT "Running synergy. Press Stop to end the test.", FONT 8, "MS Sans Serif"
IDC_STATIC,7,7,172,15 BEGIN
END DEFPUSHBUTTON "Stop",IDOK,129,33,50,14
LTEXT "Running synergy. Press Stop to end the test.",
IDD_AUTOSTART DIALOG DISCARDABLE 0, 0, 195, 189 IDC_STATIC,7,7,172,15
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU END
CAPTION "Auto Start"
FONT 8, "MS Sans Serif" IDD_AUTOSTART DIALOG DISCARDABLE 0, 0, 195, 189
BEGIN STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
DEFPUSHBUTTON "Close",IDCANCEL,138,168,50,14 CAPTION "Auto Start"
LTEXT "Synergy can be configured to start automatically when you log in. If you have sufficient access rights, you can instead configure synergy to start automatically when your computer starts.", FONT 8, "MS Sans Serif"
IDC_STATIC,7,7,181,33 BEGIN
LTEXT "You have sufficient access rights to install and uninstall Auto Start for all users or for just yourself.", DEFPUSHBUTTON "Close",IDCANCEL,138,168,50,14
IDC_AUTOSTART_PERMISSION_MSG,7,69,181,17 LTEXT "Synergy can be configured to start automatically when you log in. If you have sufficient access rights, you can instead configure synergy to start automatically when your computer starts.",
LTEXT "Synergy is configured to start automatically when the system starts.", IDC_STATIC,7,7,181,33
IDC_AUTOSTART_INSTALLED_MSG,7,93,181,17 LTEXT "You have sufficient access rights to install and uninstall Auto Start for all users or for just yourself.",
GROUPBOX "When &You Log In",IDC_STATIC,7,119,84,40 IDC_AUTOSTART_PERMISSION_MSG,7,69,181,17
PUSHBUTTON "Install",IDC_AUTOSTART_INSTALL_USER,23,133,50,14 LTEXT "Synergy is configured to start automatically when the system starts.",
GROUPBOX "When &Computer Starts",IDC_STATIC,104,119,84,40 IDC_AUTOSTART_INSTALLED_MSG,7,93,181,17
PUSHBUTTON "Install",IDC_AUTOSTART_INSTALL_SYSTEM,119,134,50,14 GROUPBOX "When &You Log In",IDC_STATIC,7,119,84,40
LTEXT "Synergy can be configured to start automatically when the computer starts or when you log in but not both.", PUSHBUTTON "Install",IDC_AUTOSTART_INSTALL_USER,23,133,50,14
IDC_STATIC,7,43,181,17 GROUPBOX "When &Computer Starts",IDC_STATIC,104,119,84,40
END PUSHBUTTON "Install",IDC_AUTOSTART_INSTALL_SYSTEM,119,134,50,14
LTEXT "Synergy can be configured to start automatically when the computer starts or when you log in but not both.",
IDC_STATIC,7,43,181,17
///////////////////////////////////////////////////////////////////////////// END
//
// DESIGNINFO
// /////////////////////////////////////////////////////////////////////////////
//
#ifdef APSTUDIO_INVOKED // DESIGNINFO
GUIDELINES DESIGNINFO DISCARDABLE //
BEGIN
IDD_MAIN, DIALOG #ifdef APSTUDIO_INVOKED
BEGIN GUIDELINES DESIGNINFO DISCARDABLE
LEFTMARGIN, 7 BEGIN
RIGHTMARGIN, 293 IDD_MAIN, DIALOG
TOPMARGIN, 7 BEGIN
BOTTOMMARGIN, 255 LEFTMARGIN, 7
END RIGHTMARGIN, 293
TOPMARGIN, 7
IDD_ADD, DIALOG BOTTOMMARGIN, 255
BEGIN END
LEFTMARGIN, 7
RIGHTMARGIN, 165 IDD_ADD, DIALOG
TOPMARGIN, 7 BEGIN
BOTTOMMARGIN, 88 LEFTMARGIN, 7
END RIGHTMARGIN, 165
TOPMARGIN, 7
IDD_WAIT, DIALOG BOTTOMMARGIN, 88
BEGIN END
LEFTMARGIN, 7
RIGHTMARGIN, 179 IDD_WAIT, DIALOG
TOPMARGIN, 7 BEGIN
BOTTOMMARGIN, 47 LEFTMARGIN, 7
END RIGHTMARGIN, 179
TOPMARGIN, 7
IDD_AUTOSTART, DIALOG BOTTOMMARGIN, 47
BEGIN END
LEFTMARGIN, 7
RIGHTMARGIN, 188 IDD_AUTOSTART, DIALOG
TOPMARGIN, 7 BEGIN
BOTTOMMARGIN, 182 LEFTMARGIN, 7
END RIGHTMARGIN, 188
END TOPMARGIN, 7
#endif // APSTUDIO_INVOKED BOTTOMMARGIN, 182
END
END
///////////////////////////////////////////////////////////////////////////// #endif // APSTUDIO_INVOKED
//
// Icon
// /////////////////////////////////////////////////////////////////////////////
//
// Icon with lowest ID value placed first to ensure application icon // Icon
// remains consistent on all systems. //
IDI_SYNERGY ICON DISCARDABLE "synergy.ico"
// Icon with lowest ID value placed first to ensure application icon
///////////////////////////////////////////////////////////////////////////// // remains consistent on all systems.
// IDI_SYNERGY ICON DISCARDABLE "synergy.ico"
// String Table
// /////////////////////////////////////////////////////////////////////////////
//
STRINGTABLE DISCARDABLE // String Table
BEGIN //
IDS_ERROR "Error"
IDS_INVALID_SCREEN_NAME "Screen name `%{1}' is invalid." STRINGTABLE DISCARDABLE
IDS_DUPLICATE_SCREEN_NAME "The screen name `%{1}' is already being used." BEGIN
IDS_SCREEN_NAME_IS_ALIAS "A name may not be an alias of itself." IDS_ERROR "Error"
IDS_VERIFY "Confirm" IDS_INVALID_SCREEN_NAME "Screen name `%{1}' is invalid."
IDS_UNSAVED_DATA_REALLY_QUIT "You have unsaved changes. Really quit?" IDS_DUPLICATE_SCREEN_NAME "The screen name `%{1}' is already being used."
IDS_UNKNOWN_SCREEN_NAME "The screen name `%{1}' is not in the layout." IDS_SCREEN_NAME_IS_ALIAS "A name may not be an alias of itself."
IDS_INVALID_PORT "The port `%{1}' is invalid. It must be between 1 and 65535 inclusive. %{2} is the standard port." IDS_VERIFY "Confirm"
IDS_SAVE_FAILED "Failed to save configuration: %{1}" IDS_UNSAVED_DATA_REALLY_QUIT "You have unsaved changes. Really quit?"
IDS_STARTUP_FAILED "Failed to start synergy: %{1}" IDS_UNKNOWN_SCREEN_NAME "The screen name `%{1}' is not in the layout."
IDS_STARTED_TITLE "Started" IDS_INVALID_PORT "The port `%{1}' is invalid. It must be between 1 and 65535 inclusive. %{2} is the standard port."
IDS_STARTED "Synergy was successfully started. Use the task manager to terminate it." IDS_SAVE_FAILED "Failed to save configuration: %{1}"
IDS_UNINSTALL_TITLE "Removed Auto-Start" IDS_STARTUP_FAILED "Failed to start synergy: %{1}"
END IDS_STARTED_TITLE "Started"
IDS_STARTED "Synergy was successfully started. Use the task manager to terminate it."
STRINGTABLE DISCARDABLE IDS_UNINSTALL_TITLE "Removed Auto-Start"
BEGIN END
IDS_AUTOSTART_PERMISSION_SYSTEM
"You have sufficient access rights to install and uninstall Auto Start for all users or for just yourself." STRINGTABLE DISCARDABLE
IDS_AUTOSTART_PERMISSION_USER BEGIN
"You have sufficient access rights to install and uninstall Auto Start for just yourself." IDS_AUTOSTART_PERMISSION_SYSTEM
IDS_AUTOSTART_PERMISSION_NONE "You have sufficient access rights to install and uninstall Auto Start for all users or for just yourself."
"You do not have sufficient access rights to install or uninstall Auto Start." IDS_AUTOSTART_PERMISSION_USER
IDS_AUTOSTART_INSTALLED_SYSTEM "You have sufficient access rights to install and uninstall Auto Start for just yourself."
"Synergy is configured to start automatically when the system starts." IDS_AUTOSTART_PERMISSION_NONE
IDS_AUTOSTART_INSTALLED_USER "You do not have sufficient access rights to install or uninstall Auto Start."
"Synergy is configured to start automatically when you log in." IDS_AUTOSTART_INSTALLED_SYSTEM
IDS_AUTOSTART_INSTALLED_NONE "Synergy is configured to start automatically when the system starts."
"Synergy is not configured to start automatically." IDS_AUTOSTART_INSTALLED_USER
IDS_INSTALL_LABEL "Install" "Synergy is configured to start automatically when you log in."
IDS_UNINSTALL_LABEL "Uninstall" IDS_AUTOSTART_INSTALLED_NONE
IDS_INSTALL_GENERIC_ERROR "Install failed for an unknown reason." "Synergy is not configured to start automatically."
IDS_UNINSTALL_GENERIC_ERROR "Uninstall failed for an unknown reason." IDS_INSTALL_LABEL "Install"
IDS_INSTALL_TITLE "Installed Auto-Start" IDS_UNINSTALL_LABEL "Uninstall"
IDS_INSTALLED_SYSTEM "Installed auto-start. Synergy will now automatically start each time you start your computer." IDS_INSTALL_GENERIC_ERROR "Install failed for an unknown reason."
IDS_INSTALLED_USER "Installed auto-start. Synergy will now automatically start each time you log in." IDS_UNINSTALL_GENERIC_ERROR "Uninstall failed for an unknown reason."
END IDS_INSTALL_TITLE "Installed Auto-Start"
IDS_INSTALLED_SYSTEM "Installed auto-start. Synergy will now automatically start each time you start your computer."
STRINGTABLE DISCARDABLE IDS_INSTALLED_USER "Installed auto-start. Synergy will now automatically start each time you log in."
BEGIN END
IDS_UNINSTALLED_SYSTEM "Removed auto-start. Synergy will not automatically start each time you start or reboot your computer."
IDS_UNINSTALLED_USER "Removed auto-start. Synergy will not automatically start each time you log in." STRINGTABLE DISCARDABLE
IDS_INVALID_SERVER_NAME "Server name `%{1}' is invalid." BEGIN
END IDS_UNINSTALLED_SYSTEM "Removed auto-start. Synergy will not automatically start each time you start or reboot your computer."
IDS_UNINSTALLED_USER "Removed auto-start. Synergy will not automatically start each time you log in."
#endif // English (U.S.) resources IDS_INVALID_SERVER_NAME "Server name `%{1}' is invalid."
///////////////////////////////////////////////////////////////////////////// IDS_TITLE "Synergy - Version %{1}"
END
#endif // English (U.S.) resources
#ifndef APSTUDIO_INVOKED /////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
// #ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////////////// // Generated from the TEXTINCLUDE 3 resource.
#endif // not APSTUDIO_INVOKED //
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -36,6 +36,7 @@
#define IDS_UNINSTALLED_SYSTEM 32 #define IDS_UNINSTALLED_SYSTEM 32
#define IDS_UNINSTALLED_USER 33 #define IDS_UNINSTALLED_USER 33
#define IDS_INVALID_SERVER_NAME 34 #define IDS_INVALID_SERVER_NAME 34
#define IDS_TITLE 35
#define IDD_MAIN 101 #define IDD_MAIN 101
#define IDD_ADD 102 #define IDD_ADD 102
#define IDD_WAIT 103 #define IDD_WAIT 103
@ -71,6 +72,7 @@
#define IDC_AUTOSTART_INSTALL_USER 1033 #define IDC_AUTOSTART_INSTALL_USER 1033
#define IDC_AUTOSTART_INSTALL_SYSTEM 1034 #define IDC_AUTOSTART_INSTALL_SYSTEM 1034
#define IDC_MAIN_AUTOSTART 1035 #define IDC_MAIN_AUTOSTART 1035
#define IDC_MAIN_DEBUG 1036
// Next default values for new objects // Next default values for new objects
// //
@ -79,7 +81,7 @@
#define _APS_NO_MFC 1 #define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 106 #define _APS_NEXT_RESOURCE_VALUE 106
#define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1036 #define _APS_NEXT_CONTROL_VALUE 1037
#define _APS_NEXT_SYMED_VALUE 101 #define _APS_NEXT_SYMED_VALUE 101
#endif #endif
#endif #endif