From 63605d2d6922dc5740fed9443a53ec4356aced38 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 8 Mar 2011 07:34:57 +0000 Subject: Added option to terminate on server reset when xmdcp --- xorg-server/hw/xwin/xlaunch/config.cc | 2 + xorg-server/hw/xwin/xlaunch/config.h | 4 +- xorg-server/hw/xwin/xlaunch/main.cc | 855 +++++++++++----------- xorg-server/hw/xwin/xlaunch/resources/dialog.rc | 3 +- xorg-server/hw/xwin/xlaunch/resources/resources.h | 150 ++-- xorg-server/hw/xwin/xlaunch/resources/strings.rc | 2 + 6 files changed, 516 insertions(+), 500 deletions(-) (limited to 'xorg-server/hw/xwin') diff --git a/xorg-server/hw/xwin/xlaunch/config.cc b/xorg-server/hw/xwin/xlaunch/config.cc index 21c7079df..c7ac398fb 100644 --- a/xorg-server/hw/xwin/xlaunch/config.cc +++ b/xorg-server/hw/xwin/xlaunch/config.cc @@ -93,6 +93,7 @@ void CConfig::Save(const char *filename) setAttribute(root, "ExtraParams", extra_params.c_str()); setAttribute(root, "Wgl", wgl?"True":"False"); setAttribute(root, "DisableAC", disableac?"True":"False"); + setAttribute(root, "XDMCPTerminate", xdmcpterminate?"True":"False"); xmlSaveFormatFileEnc(filename, doc, "UTF-8", 1); @@ -183,6 +184,7 @@ void CConfig::Load(const char *filename) getAttribute(root, "ExtraParams", extra_params); getAttributeBool(root, "Wgl", wgl); getAttributeBool(root, "DisableAC", disableac); + getAttributeBool(root, "XDMCPTerminate", xdmcpterminate); /*free the document */ xmlFreeDoc(doc); diff --git a/xorg-server/hw/xwin/xlaunch/config.h b/xorg-server/hw/xwin/xlaunch/config.h index 54ce69764..ac8f1d411 100644 --- a/xorg-server/hw/xwin/xlaunch/config.h +++ b/xorg-server/hw/xwin/xlaunch/config.h @@ -57,6 +57,7 @@ struct CConfig bool clipboardprimary; bool wgl; bool disableac; + bool xdmcpterminate; std::string extra_params; #ifdef _DEBUG CConfig() : window(MultiWindow), client(NoClient), display("1"), @@ -77,7 +78,8 @@ struct CConfig clipboardprimary(true), extra_params(), disableac(false), - wgl(true) + wgl(true), + xdmcpterminate(false) { }; void Load(const char * filename); diff --git a/xorg-server/hw/xwin/xlaunch/main.cc b/xorg-server/hw/xwin/xlaunch/main.cc index a8529b5f9..0ee6c00af 100644 --- a/xorg-server/hw/xwin/xlaunch/main.cc +++ b/xorg-server/hw/xwin/xlaunch/main.cc @@ -50,7 +50,7 @@ class CMyWizard : public CWizard { public: private: - CConfig config; /// Storage for config options. + CConfig config; /// Storage for config options. public: /// @brief Constructor. /// Set wizard pages. @@ -65,142 +65,146 @@ class CMyWizard : public CWizard AddPage(IDD_FINISH, IDS_FINISH_TITLE, IDS_FINISH_SUBTITLE); } - virtual void LoadConfig(const char *filename) - { - try { - config.Load(filename); - } catch (std::runtime_error &e) - { - char Message[255]; - sprintf(Message,"Failure: %s\n", e.what()); - MessageBox(NULL,Message,"Exception",MB_OK); - } - } + virtual void LoadConfig(const char *filename) + { + try { + config.Load(filename); + } catch (std::runtime_error &e) + { + char Message[255]; + sprintf(Message,"Failure: %s\n", e.what()); + MessageBox(NULL,Message,"Exception",MB_OK); + } + } /// @brief Handle the PSN_WIZNEXT message. /// @param hwndDlg Handle to active page dialog. /// @param index Index of current page. /// @return TRUE if the message was handled. FALSE otherwise. - virtual BOOL WizardNext(HWND hwndDlg, unsigned index) - { + virtual BOOL WizardNext(HWND hwndDlg, unsigned index) + { #ifdef _DEBUG - printf("%s %d\n", __FUNCTION__, index); + printf("%s %d\n", __FUNCTION__, index); #endif - switch (PageID(index)) - { - case IDD_DISPLAY: + switch (PageID(index)) + { + case IDD_DISPLAY: // Check for select window mode - if (IsDlgButtonChecked(hwndDlg, IDC_MULTIWINDOW)) - config.window = CConfig::MultiWindow; - else if (IsDlgButtonChecked(hwndDlg, IDC_FULLSCREEN)) - config.window = CConfig::Fullscreen; - else if (IsDlgButtonChecked(hwndDlg, IDC_WINDOWED)) - config.window = CConfig::Windowed; - else if (IsDlgButtonChecked(hwndDlg, IDC_NODECORATION)) - config.window = CConfig::Nodecoration; - else - { - SetWindowLong(hwndDlg, DWL_MSGRESULT, -1); - return TRUE; - } + if (IsDlgButtonChecked(hwndDlg, IDC_MULTIWINDOW)) + config.window = CConfig::MultiWindow; + else if (IsDlgButtonChecked(hwndDlg, IDC_FULLSCREEN)) + config.window = CConfig::Fullscreen; + else if (IsDlgButtonChecked(hwndDlg, IDC_WINDOWED)) + config.window = CConfig::Windowed; + else if (IsDlgButtonChecked(hwndDlg, IDC_NODECORATION)) + config.window = CConfig::Nodecoration; + else + { + SetWindowLong(hwndDlg, DWL_MSGRESULT, -1); + return TRUE; + } // Get selected display number - { - char buffer[512]; - GetDlgItemText(hwndDlg, IDC_DISPLAY, buffer, 512); - buffer[511] = 0; - config.display = buffer; + { + char buffer[512]; + GetDlgItemText(hwndDlg, IDC_DISPLAY, buffer, 512); + buffer[511] = 0; + config.display = buffer; } // Check for valid input if (config.display.empty()) { MessageBox(hwndDlg,"Please fill in a display number.","Error",MB_OK); - SetWindowLong(hwndDlg, DWL_MSGRESULT, -1); + SetWindowLong(hwndDlg, DWL_MSGRESULT, -1); } else SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CLIENTS); - return TRUE; - case IDD_CLIENTS: + return TRUE; + case IDD_CLIENTS: // Check for select client startup method - if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT)) - { - config.client = CConfig::StartProgram; - SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_PROGRAM); - } else if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP)) - { - config.client = CConfig::XDMCP; - SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_XDMCP); - } else if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT_NONE)) - { - config.client = CConfig::NoClient; - SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_EXTRA); - } else - SetWindowLong(hwndDlg, DWL_MSGRESULT, -1); - return TRUE; - case IDD_PROGRAM: + if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT)) + { + config.client = CConfig::StartProgram; + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_PROGRAM); + } else if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP)) + { + config.client = CConfig::XDMCP; + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_XDMCP); + } else if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT_NONE)) + { + config.client = CConfig::NoClient; + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_EXTRA); + } else + SetWindowLong(hwndDlg, DWL_MSGRESULT, -1); + return TRUE; + case IDD_PROGRAM: // Check wether local or remote client should be started - if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT_LOCAL)) - config.local = true; - else if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT_REMOTE)) - config.local = false; - else - { - SetWindowLong(hwndDlg, DWL_MSGRESULT, -1); - return TRUE; - } + if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT_LOCAL)) + config.local = true; + else if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT_REMOTE)) + config.local = false; + else + { + SetWindowLong(hwndDlg, DWL_MSGRESULT, -1); + return TRUE; + } // Read program, user and host name - { - char buffer[512]; - GetDlgItemText(hwndDlg, IDC_CLIENT_USER, buffer, 512); - buffer[511] = 0; - config.user = buffer; - GetDlgItemText(hwndDlg, IDC_CLIENT_HOST, buffer, 512); - buffer[511] = 0; - config.host = buffer; - GetDlgItemText(hwndDlg, IDC_CLIENT_PROGRAM, buffer, 512); - buffer[511] = 0; - config.localprogram = buffer; - GetDlgItemText(hwndDlg, IDC_CLIENT_REMOTEPROGRAM, buffer, 512); - buffer[511] = 0; - config.remoteprogram = buffer; - GetDlgItemText(hwndDlg, IDC_CLIENT_PASSWORD, buffer, 512); - buffer[511] = 0; - config.remotepassword = buffer; - } + { + char buffer[512]; + GetDlgItemText(hwndDlg, IDC_CLIENT_USER, buffer, 512); + buffer[511] = 0; + config.user = buffer; + GetDlgItemText(hwndDlg, IDC_CLIENT_HOST, buffer, 512); + buffer[511] = 0; + config.host = buffer; + GetDlgItemText(hwndDlg, IDC_CLIENT_PROGRAM, buffer, 512); + buffer[511] = 0; + config.localprogram = buffer; + GetDlgItemText(hwndDlg, IDC_CLIENT_REMOTEPROGRAM, buffer, 512); + buffer[511] = 0; + config.remoteprogram = buffer; + GetDlgItemText(hwndDlg, IDC_CLIENT_PASSWORD, buffer, 512); + buffer[511] = 0; + config.remotepassword = buffer; + } // Check for valid input - if (!config.local && (config.host.empty() || config.localprogram.empty() || config.remoteprogram.empty())) - SetWindowLong(hwndDlg, DWL_MSGRESULT, -1); - else - SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_EXTRA); - return TRUE; - case IDD_XDMCP: + if (!config.local && (config.host.empty() || config.localprogram.empty() || config.remoteprogram.empty())) + SetWindowLong(hwndDlg, DWL_MSGRESULT, -1); + else + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_EXTRA); + return TRUE; + case IDD_XDMCP: // Check for broadcast - if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP_BROADCAST)) - config.broadcast = true; - else if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP_QUERY)) - config.broadcast = false; - else - { - SetWindowLong(hwndDlg, DWL_MSGRESULT, -1); - return TRUE; - } + if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP_BROADCAST)) + config.broadcast = true; + else if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP_QUERY)) + config.broadcast = false; + else + { + SetWindowLong(hwndDlg, DWL_MSGRESULT, -1); + return TRUE; + } // Check for indirect mode - if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP_INDIRECT)) - config.indirect = true; - else - config.indirect = false; + if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP_INDIRECT)) + config.indirect = true; + else + config.indirect = false; // Read hostname - { - char buffer[512]; - GetDlgItemText(hwndDlg, IDC_XDMCP_HOST, buffer, 512); - buffer[511] = 0; - config.xdmcp_host = buffer; - } + { + char buffer[512]; + GetDlgItemText(hwndDlg, IDC_XDMCP_HOST, buffer, 512); + buffer[511] = 0; + config.xdmcp_host = buffer; + } // Check for valid input - if (!config.broadcast && config.xdmcp_host.empty()) - SetWindowLong(hwndDlg, DWL_MSGRESULT, -1); - else - SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_EXTRA); - return TRUE; + if (!config.broadcast && config.xdmcp_host.empty()) + SetWindowLong(hwndDlg, DWL_MSGRESULT, -1); + else + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_EXTRA); + if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP_TERMINATE)) + config.xdmcpterminate = true; + else + config.xdmcpterminate = false; + return TRUE; case IDD_EXTRA: // check for clipboard if (IsDlgButtonChecked(hwndDlg, IDC_CLIPBOARD)) @@ -223,173 +227,173 @@ class CMyWizard : public CWizard else config.disableac = false; // read parameters - { - char buffer[512]; - GetDlgItemText(hwndDlg, IDC_EXTRA_PARAMS, buffer, 512); - buffer[511] = 0; - config.extra_params = buffer; - } + { + char buffer[512]; + GetDlgItemText(hwndDlg, IDC_EXTRA_PARAMS, buffer, 512); + buffer[511] = 0; + config.extra_params = buffer; + } SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_FINISH); return TRUE; - default: - break; - } - return FALSE; - } + default: + break; + } + return FALSE; + } /// @brief Handle PSN_WIZFINISH message. /// @param hwndDlg Handle to active page dialog. /// @param index Index of current page. /// @return TRUE if the message was handled. FALSE otherwise. - virtual BOOL WizardFinish(HWND hwndDlg, unsigned index) - { + virtual BOOL WizardFinish(HWND hwndDlg, unsigned index) + { #ifdef _DEBUG - printf("finish %d\n", index); + printf("finish %d\n", index); #endif - return FALSE; - } + return FALSE; + } /// @brief Handle PSN_WIZBACK message. /// Basicly handles switching to proper page (skipping XDMCP or program page /// if required). /// @param hwndDlg Handle to active page dialog. /// @param index Index of current page. /// @return TRUE if the message was handled. FALSE otherwise. - virtual BOOL WizardBack(HWND hwndDlg, unsigned index) - { - switch (PageID(index)) - { - case IDD_PROGRAM: - case IDD_XDMCP: - SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CLIENTS); - return TRUE; - case IDD_FONTPATH: + virtual BOOL WizardBack(HWND hwndDlg, unsigned index) + { + switch (PageID(index)) + { + case IDD_PROGRAM: + case IDD_XDMCP: + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CLIENTS); + return TRUE; + case IDD_FONTPATH: case IDD_EXTRA: // temporary. fontpath is disabled - switch (config.client) - { - case CConfig::NoClient: - SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CLIENTS); - return TRUE; - case CConfig::StartProgram: - SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_PROGRAM); - return TRUE; - case CConfig::XDMCP: - SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_XDMCP); - return TRUE; - } - break; - } - return FALSE; - } + switch (config.client) + { + case CConfig::NoClient: + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CLIENTS); + return TRUE; + case CConfig::StartProgram: + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_PROGRAM); + return TRUE; + case CConfig::XDMCP: + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_XDMCP); + return TRUE; + } + break; + } + return FALSE; + } /// @brief Handle PSN_SETACTIVE message. /// @param hwndDlg Handle to active page dialog. /// @param index Index of current page. /// @return TRUE if the message was handled. FALSE otherwise. - virtual BOOL WizardActivate(HWND hwndDlg, unsigned index) - { + virtual BOOL WizardActivate(HWND hwndDlg, unsigned index) + { #ifdef _DEBUG - printf("%s %d\n", __FUNCTION__, index); + printf("%s %d\n", __FUNCTION__, index); #endif - switch (PageID(index)) - { - case IDD_CLIENTS: + switch (PageID(index)) + { + case IDD_CLIENTS: // Enable or disable XDMCP radiobutton and text - if (config.window != CConfig::MultiWindow) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP), true); - EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP_DESC), true); - } - else - { - if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP)) - CheckRadioButton(hwndDlg, IDC_CLIENT_NONE, IDC_CLIENT, IDC_CLIENT_NONE); - EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP), false); - EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP_DESC), false); - } - break; - } - return FALSE; - } + if (config.window != CConfig::MultiWindow) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP), true); + EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP_DESC), true); + } + else + { + if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP)) + CheckRadioButton(hwndDlg, IDC_CLIENT_NONE, IDC_CLIENT, IDC_CLIENT_NONE); + EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP), false); + EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP_DESC), false); + } + break; + } + return FALSE; + } protected: /// @brief Enable or disable the control for remote clients. /// @param hwndDlg Handle to active page dialog. /// @param state State of control group. - void EnableRemoteProgramGroup(HWND hwndDlg, BOOL state) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_PASSWORD), state); - EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_HOST), state); - EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_USER), state); - EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_PASSWORD_DESC), state); - EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_HOST_DESC), state); - EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_USER_DESC), state); - EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_REMOTEPROGRAM), state); - EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_REMOTEPROGRAM_DESC), state); - EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_PROGRAM), !state); - EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_PROGRAM_DESC), !state); - } + void EnableRemoteProgramGroup(HWND hwndDlg, BOOL state) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_PASSWORD), state); + EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_HOST), state); + EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_USER), state); + EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_PASSWORD_DESC), state); + EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_HOST_DESC), state); + EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_USER_DESC), state); + EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_REMOTEPROGRAM), state); + EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_REMOTEPROGRAM_DESC), state); + EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_PROGRAM), !state); + EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_PROGRAM_DESC), !state); + } /// @brief Enable or disable the control for XDMCP connection. /// @param hwndDlg Handle to active page dialog. /// @param state State of control group. - void EnableXDMCPQueryGroup(HWND hwndDlg, BOOL state) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP_HOST), state); - EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP_INDIRECT), state); - } + void EnableXDMCPQueryGroup(HWND hwndDlg, BOOL state) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP_HOST), state); + EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP_INDIRECT), state); + } /// @brief Fill program box with default values. /// @param hwndDlg Handle to active page dialog. - void FillProgramBox(HWND hwndDlg) - { - HWND cbwnd = GetDlgItem(hwndDlg, IDC_CLIENT_PROGRAM); - if (cbwnd == NULL) - return; - SendMessage(cbwnd, CB_RESETCONTENT, 0, 0); - SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) "xcalc"); - SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) "xclock"); - SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) "xwininfo"); - SendMessage(cbwnd, CB_SETCURSEL, 0, 0); - } - void ShowSaveDialog(HWND parent) - { - char szTitle[512]; - char szFilter[512]; - char szFileTitle[512]; - char szFile[MAX_PATH]; - HINSTANCE hInst = GetModuleHandle(NULL); - - LoadString(hInst, IDS_SAVE_TITLE, szTitle, sizeof(szTitle)); - LoadString(hInst, IDS_SAVE_FILETITLE, szFileTitle, sizeof(szFileTitle)); - LoadString(hInst, IDS_SAVE_FILTER, szFilter, sizeof(szFilter)); - for (unsigned i=0; szFilter[i]; i++) - if (szFilter[i] == '%') - szFilter[i] = '\0'; + void FillProgramBox(HWND hwndDlg) + { + HWND cbwnd = GetDlgItem(hwndDlg, IDC_CLIENT_PROGRAM); + if (cbwnd == NULL) + return; + SendMessage(cbwnd, CB_RESETCONTENT, 0, 0); + SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) "xcalc"); + SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) "xclock"); + SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) "xwininfo"); + SendMessage(cbwnd, CB_SETCURSEL, 0, 0); + } + void ShowSaveDialog(HWND parent) + { + char szTitle[512]; + char szFilter[512]; + char szFileTitle[512]; + char szFile[MAX_PATH]; + HINSTANCE hInst = GetModuleHandle(NULL); + + LoadString(hInst, IDS_SAVE_TITLE, szTitle, sizeof(szTitle)); + LoadString(hInst, IDS_SAVE_FILETITLE, szFileTitle, sizeof(szFileTitle)); + LoadString(hInst, IDS_SAVE_FILTER, szFilter, sizeof(szFilter)); + for (unsigned i=0; szFilter[i]; i++) + if (szFilter[i] == '%') + szFilter[i] = '\0'; - strcpy(szFile, "config.xlaunch"); + strcpy(szFile, "config.xlaunch"); - OPENFILENAME ofn; - memset(&ofn, 0, sizeof(OPENFILENAME)); - ofn.lStructSize = sizeof(OPENFILENAME); - ofn.hwndOwner = parent; - ofn.lpstrFilter = szFilter; - ofn.lpstrFile= szFile; - ofn.nMaxFile = sizeof(szFile)/ sizeof(*szFile); - ofn.lpstrFileTitle = szFileTitle; - ofn.nMaxFileTitle = sizeof(szFileTitle); - ofn.lpstrInitialDir = (LPSTR)NULL; - ofn.Flags = OFN_SHOWHELP | OFN_OVERWRITEPROMPT; - ofn.lpstrTitle = szTitle; + OPENFILENAME ofn; + memset(&ofn, 0, sizeof(OPENFILENAME)); + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = parent; + ofn.lpstrFilter = szFilter; + ofn.lpstrFile= szFile; + ofn.nMaxFile = sizeof(szFile)/ sizeof(*szFile); + ofn.lpstrFileTitle = szFileTitle; + ofn.nMaxFileTitle = sizeof(szFileTitle); + ofn.lpstrInitialDir = (LPSTR)NULL; + ofn.Flags = OFN_SHOWHELP | OFN_OVERWRITEPROMPT; + ofn.lpstrTitle = szTitle; - if (GetSaveFileName(&ofn)) - { - try { - config.Save(ofn.lpstrFile); - } catch (std::runtime_error &e) - { - char Message[255]; - sprintf(Message,"Failure: %s\n", e.what()); - MessageBox(NULL,Message,"Exception",MB_OK); - } - } - } + if (GetSaveFileName(&ofn)) + { + try { + config.Save(ofn.lpstrFile); + } catch (std::runtime_error &e) + { + char Message[255]; + sprintf(Message,"Failure: %s\n", e.what()); + MessageBox(NULL,Message,"Exception",MB_OK); + } + } + } public: - + /// @brief Handle messages fo the dialog pages. /// @param hwndDlg Handle of active dialog. /// @param uMsg Message code. @@ -406,64 +410,65 @@ class CMyWizard : public CWizard { case IDD_DISPLAY: // Init display dialog. Enable correct check buttons - switch (config.window) - { - default: - case CConfig::MultiWindow: - CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_MULTIWINDOW); - break; - case CConfig::Fullscreen: - CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_FULLSCREEN); - break; - case CConfig::Windowed: - CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_WINDOWED); - break; - case CConfig::Nodecoration: - CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_NODECORATION); - break; - } + switch (config.window) + { + default: + case CConfig::MultiWindow: + CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_MULTIWINDOW); + break; + case CConfig::Fullscreen: + CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_FULLSCREEN); + break; + case CConfig::Windowed: + CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_WINDOWED); + break; + case CConfig::Nodecoration: + CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_NODECORATION); + break; + } // Set display number SetDlgItemText(hwndDlg, IDC_DISPLAY, config.display.c_str()); break; case IDD_CLIENTS: // Init client dialog. Enable correct check buttons - switch (config.client) - { - default: - case CConfig::NoClient: - CheckRadioButton(hwndDlg, IDC_CLIENT_NONE, IDC_CLIENT, IDC_CLIENT_NONE); - break; - case CConfig::StartProgram: - CheckRadioButton(hwndDlg, IDC_CLIENT_NONE, IDC_CLIENT, IDC_CLIENT); - break; - case CConfig::XDMCP: - CheckRadioButton(hwndDlg, IDC_CLIENT_NONE, IDC_CLIENT, IDC_XDMCP); - break; - } + switch (config.client) + { + default: + case CConfig::NoClient: + CheckRadioButton(hwndDlg, IDC_CLIENT_NONE, IDC_CLIENT, IDC_CLIENT_NONE); + break; + case CConfig::StartProgram: + CheckRadioButton(hwndDlg, IDC_CLIENT_NONE, IDC_CLIENT, IDC_CLIENT); + break; + case CConfig::XDMCP: + CheckRadioButton(hwndDlg, IDC_CLIENT_NONE, IDC_CLIENT, IDC_XDMCP); + break; + } break; - case IDD_PROGRAM: + case IDD_PROGRAM: // Init program dialog. Check local and remote buttons CheckRadioButton(hwndDlg, IDC_CLIENT_LOCAL, IDC_CLIENT_REMOTE, config.local?IDC_CLIENT_LOCAL:IDC_CLIENT_REMOTE); - EnableRemoteProgramGroup(hwndDlg, config.local?FALSE:TRUE); + EnableRemoteProgramGroup(hwndDlg, config.local?FALSE:TRUE); // Fill combo boxes - FillProgramBox(hwndDlg); + FillProgramBox(hwndDlg); // Set edit fields - if (!config.localprogram.empty()) - SetDlgItemText(hwndDlg, IDC_CLIENT_PROGRAM, config.localprogram.c_str()); - if (!config.remoteprogram.empty()) - SetDlgItemText(hwndDlg, IDC_CLIENT_REMOTEPROGRAM, config.remoteprogram.c_str()); - SetDlgItemText(hwndDlg, IDC_CLIENT_USER, config.user.c_str()); - SetDlgItemText(hwndDlg, IDC_CLIENT_HOST, config.host.c_str()); - SetDlgItemText(hwndDlg, IDC_CLIENT_PASSWORD, config.remotepassword.c_str()); - break; - case IDD_XDMCP: + if (!config.localprogram.empty()) + SetDlgItemText(hwndDlg, IDC_CLIENT_PROGRAM, config.localprogram.c_str()); + if (!config.remoteprogram.empty()) + SetDlgItemText(hwndDlg, IDC_CLIENT_REMOTEPROGRAM, config.remoteprogram.c_str()); + SetDlgItemText(hwndDlg, IDC_CLIENT_USER, config.user.c_str()); + SetDlgItemText(hwndDlg, IDC_CLIENT_HOST, config.host.c_str()); + SetDlgItemText(hwndDlg, IDC_CLIENT_PASSWORD, config.remotepassword.c_str()); + break; + case IDD_XDMCP: // Init XDMCP dialog. Check broadcast and indirect button CheckRadioButton(hwndDlg, IDC_XDMCP_QUERY, IDC_XDMCP_BROADCAST, config.broadcast?IDC_XDMCP_BROADCAST:IDC_XDMCP_QUERY); CheckDlgButton(hwndDlg, IDC_XDMCP_INDIRECT, config.indirect?BST_CHECKED:BST_UNCHECKED); - EnableXDMCPQueryGroup(hwndDlg, config.broadcast?FALSE:TRUE); + EnableXDMCPQueryGroup(hwndDlg, config.broadcast?FALSE:TRUE); // Set hostname - SetDlgItemText(hwndDlg, IDC_XDMCP_HOST, config.xdmcp_host.c_str()); - break; + SetDlgItemText(hwndDlg, IDC_XDMCP_HOST, config.xdmcp_host.c_str()); + CheckDlgButton(hwndDlg, IDC_XDMCP_TERMINATE, config.xdmcpterminate?BST_CHECKED:BST_UNCHECKED); + break; case IDD_EXTRA: CheckDlgButton(hwndDlg, IDC_CLIPBOARD, config.clipboard?BST_CHECKED:BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_CLIPBOARDPRIMARY, config.clipboardprimary?BST_CHECKED:BST_UNCHECKED); @@ -488,15 +493,15 @@ class CMyWizard : public CWizard // Disable unavailable controls case IDC_CLIENT_REMOTE: case IDC_CLIENT_LOCAL: - EnableRemoteProgramGroup(hwndDlg, LOWORD(wParam) == IDC_CLIENT_REMOTE); + EnableRemoteProgramGroup(hwndDlg, LOWORD(wParam) == IDC_CLIENT_REMOTE); + break; + case IDC_XDMCP_QUERY: + case IDC_XDMCP_BROADCAST: + EnableXDMCPQueryGroup(hwndDlg, LOWORD(wParam) == IDC_XDMCP_QUERY); + break; + case IDC_FINISH_SAVE: + ShowSaveDialog(hwndDlg); break; - case IDC_XDMCP_QUERY: - case IDC_XDMCP_BROADCAST: - EnableXDMCPQueryGroup(hwndDlg, LOWORD(wParam) == IDC_XDMCP_QUERY); - break; - case IDC_FINISH_SAVE: - ShowSaveDialog(hwndDlg); - break; } } // pass messages to parent @@ -525,46 +530,48 @@ class CMyWizard : public CWizard } /// @brief Do the actual start of VCXsrv and clients - void StartUp() - { - std::string buffer; - std::string client; + void StartUp() + { + std::string buffer; + std::string client; // Construct display strings - std::string display_id = ":" + config.display; - std::string display = "DISPLAY=127.0.0.1" + display_id + ".0"; + std::string display_id = ":" + config.display; + std::string display = "DISPLAY=127.0.0.1" + display_id + ".0"; // Build Xsrv commandline - buffer = "vcxsrv " + display_id + " "; - switch (config.window) - { - case CConfig::MultiWindow: - buffer += "-multiwindow "; - break; - case CConfig::Fullscreen: - buffer += "-fullscreen "; - break; - case CConfig::Nodecoration: - buffer += "-nodecoration "; - break; - default: - break; - } + buffer = "vcxsrv " + display_id + " "; + switch (config.window) + { + case CConfig::MultiWindow: + buffer += "-multiwindow "; + break; + case CConfig::Fullscreen: + buffer += "-fullscreen "; + break; + case CConfig::Nodecoration: + buffer += "-nodecoration "; + break; + default: + break; + } // Add XDMCP parameter - if (config.client == CConfig::XDMCP) - { - if (config.broadcast) - buffer += "-broadcast "; - else - { - if (config.indirect) - buffer += "-indirect "; - else - buffer += "-query "; - buffer += config.xdmcp_host; - buffer += " "; - } - } + if (config.client == CConfig::XDMCP) + { + if (config.broadcast) + buffer += "-broadcast "; + else + { + if (config.indirect) + buffer += "-indirect "; + else + buffer += "-query "; + buffer += config.xdmcp_host; + buffer += " "; + } + if (config.xdmcpterminate) + buffer += "-terminate "; + } if (config.clipboard) buffer += "-clipboard "; if (!config.clipboardprimary) @@ -580,54 +587,54 @@ class CMyWizard : public CWizard } // Construct client commandline - if (config.client == CConfig::StartProgram) - { - if (!config.local) - { - char cmdline[512]; + if (config.client == CConfig::StartProgram) + { + if (!config.local) + { + char cmdline[512]; std::string host = config.host; std::string remotepassword; if (!config.user.empty()) host = config.user + "@" + config.host; if (!config.remotepassword.empty()) remotepassword=std::string(" -pw ")+config.remotepassword; - _snprintf(cmdline,512,"plink -ssh -X%s %s %s", + _snprintf(cmdline,512,"plink -ssh -X%s %s %s", remotepassword.c_str(), host.c_str(),config.remoteprogram.c_str()); - client += cmdline; - } + client += cmdline; + } else - { - client += config.localprogram.c_str(); - } - } + { + client += config.localprogram.c_str(); + } + } // Prepare program startup - STARTUPINFO si, sic; - PROCESS_INFORMATION pi, pic; - HANDLE handles[2]; - DWORD hcount = 0; + STARTUPINFO si, sic; + PROCESS_INFORMATION pi, pic; + HANDLE handles[2]; + DWORD hcount = 0; Display *dpy = NULL; - ZeroMemory( &si, sizeof(si) ); - si.cb = sizeof(si); - ZeroMemory( &pi, sizeof(pi) ); - ZeroMemory( &sic, sizeof(sic) ); - sic.cb = sizeof(sic); - ZeroMemory( &pic, sizeof(pic) ); + ZeroMemory( &si, sizeof(si) ); + si.cb = sizeof(si); + ZeroMemory( &pi, sizeof(pi) ); + ZeroMemory( &sic, sizeof(sic) ); + sic.cb = sizeof(sic); + ZeroMemory( &pic, sizeof(pic) ); - // Start VCXsrv process. + // Start VCXsrv process. #ifdef _DEBUG - printf("%s\n", buffer.c_str()); + printf("%s\n", buffer.c_str()); #endif - if( !CreateProcess( NULL, (CHAR*)buffer.c_str(), NULL, NULL, + if( !CreateProcess( NULL, (CHAR*)buffer.c_str(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi )) - throw win32_error("CreateProcess failed"); - handles[hcount++] = pi.hProcess; + throw win32_error("CreateProcess failed"); + handles[hcount++] = pi.hProcess; - if (!client.empty()) - { + if (!client.empty()) + { // Set DISPLAY variable - _putenv(display.c_str()); + _putenv(display.c_str()); // Wait for server to startup dpy = WaitForServer(pi.hProcess); @@ -635,62 +642,62 @@ class CMyWizard : public CWizard { while (hcount--) TerminateProcess(handles[hcount], (DWORD)-1); - throw std::runtime_error("Connection to server failed"); + throw std::runtime_error("Connection to server failed"); } #ifdef _DEBUG - printf("%s\n", client.c_str()); + printf("%s\n", client.c_str()); #endif // Hide a console window // FIXME: This may make it impossible to enter the password - sic.dwFlags = STARTF_USESHOWWINDOW; - sic.wShowWindow = SW_HIDE; + sic.dwFlags = STARTF_USESHOWWINDOW; + sic.wShowWindow = SW_HIDE; - // Start the child process. - if( !CreateProcess( NULL, (CHAR*)client.c_str(), NULL, NULL, + // Start the child process. + if( !CreateProcess( NULL, (CHAR*)client.c_str(), NULL, NULL, FALSE, 0, NULL, NULL, &sic, &pic )) - { + { DWORD err = GetLastError(); while (hcount--) TerminateProcess(handles[hcount], (DWORD)-1); - throw win32_error("CreateProcess failed", err); - } - handles[hcount++] = pic.hProcess; - } + throw win32_error("CreateProcess failed", err); + } + handles[hcount++] = pic.hProcess; + } - // Wait until any child process exits. - DWORD ret = WaitForMultipleObjects(hcount, handles, FALSE, INFINITE ); + // Wait until any child process exits. + DWORD ret = WaitForMultipleObjects(hcount, handles, FALSE, INFINITE ); #ifdef _DEBUG - printf("killing process!\n"); + printf("killing process!\n"); #endif // Check if Xsrv is still running, but only when we started a local program if (0) { - DWORD exitcode; - GetExitCodeProcess(pi.hProcess, &exitcode); - unsigned counter = 0; - while (exitcode == STILL_ACTIVE) - { - if (++counter > 10) - TerminateProcess(pi.hProcess, (DWORD)-1); - else - // Shutdown Xsrv (the soft way!) - EnumThreadWindows(pi.dwThreadId, KillWindowsProc, 0); - Sleep(500); - GetExitCodeProcess(pi.hProcess, &exitcode); - } - // Kill the client - TerminateProcess(pic.hProcess, (DWORD)-1); + DWORD exitcode; + GetExitCodeProcess(pi.hProcess, &exitcode); + unsigned counter = 0; + while (exitcode == STILL_ACTIVE) + { + if (++counter > 10) + TerminateProcess(pi.hProcess, (DWORD)-1); + else + // Shutdown Xsrv (the soft way!) + EnumThreadWindows(pi.dwThreadId, KillWindowsProc, 0); + Sleep(500); + GetExitCodeProcess(pi.hProcess, &exitcode); + } + // Kill the client + TerminateProcess(pic.hProcess, (DWORD)-1); } - // Close process and thread handles. - CloseHandle( pi.hProcess ); - CloseHandle( pi.hThread ); - CloseHandle( pic.hProcess ); - CloseHandle( pic.hThread ); - } + // Close process and thread handles. + CloseHandle( pi.hProcess ); + CloseHandle( pi.hThread ); + CloseHandle( pic.hProcess ); + CloseHandle( pic.hThread ); + } }; int main(int argc, char **argv) @@ -699,41 +706,41 @@ int main(int argc, char **argv) InitCommonControls(); CMyWizard dialog; - bool skip_wizard = false; + bool skip_wizard = false; - for (int i = 1; i < argc; i++) - { - if (argv[i] == NULL) - continue; - - std::string arg(argv[i]); - if (arg == "-load" && i + 1 < argc) - { - i++; - dialog.LoadConfig(argv[i]); - continue; - } - if (arg == "-run" && i + 1 < argc) - { - i++; - dialog.LoadConfig(argv[i]); - skip_wizard = true; - continue; - } - } + for (int i = 1; i < argc; i++) + { + if (argv[i] == NULL) + continue; + + std::string arg(argv[i]); + if (arg == "-load" && i + 1 < argc) + { + i++; + dialog.LoadConfig(argv[i]); + continue; + } + if (arg == "-run" && i + 1 < argc) + { + i++; + dialog.LoadConfig(argv[i]); + skip_wizard = true; + continue; + } + } - int ret = 0; + int ret = 0; if (skip_wizard || (ret =dialog.ShowModal()) != 0) - dialog.StartUp(); + dialog.StartUp(); #ifdef _DEBUG - printf("return %d\n", ret); + printf("return %d\n", ret); #endif - return 0; + return 0; } catch (std::runtime_error &e) { - char Message[255]; - sprintf(Message,"Failure: %s\n", e.what()); - MessageBox(NULL,Message,"Exception",MB_OK); + char Message[255]; + sprintf(Message,"Failure: %s\n", e.what()); + MessageBox(NULL,Message,"Exception",MB_OK); return -1; } } diff --git a/xorg-server/hw/xwin/xlaunch/resources/dialog.rc b/xorg-server/hw/xwin/xlaunch/resources/dialog.rc index 630c0b940..85f9386ad 100644 --- a/xorg-server/hw/xwin/xlaunch/resources/dialog.rc +++ b/xorg-server/hw/xwin/xlaunch/resources/dialog.rc @@ -98,7 +98,8 @@ BEGIN EDITTEXT IDC_XDMCP_HOST,78,12,64,12 AUTOCHECKBOX STR_XDMCP_INDIRECT,IDC_XDMCP_INDIRECT,19,28,280,10 AUTORADIOBUTTON STR_XDMCP_BROADCAST, IDC_XDMCP_BROADCAST,7,42,300,10 - LTEXT STR_XDMCP_QUERY_DESC,IDC_XDMCP_QUERY_DESC,7,56,300,42 + LTEXT STR_XDMCP_QUERY_DESC,IDC_XDMCP_QUERY_DESC,7,66,300,42 + AUTOCHECKBOX STR_XDMCP_TERMINATE,IDC_XDMCP_TERMINATE,7,94,300,10 END IDD_EXTRA DIALOGEX 0, 0, 317, 143 diff --git a/xorg-server/hw/xwin/xlaunch/resources/resources.h b/xorg-server/hw/xwin/xlaunch/resources/resources.h index 3df186d3b..03f3dac1f 100644 --- a/xorg-server/hw/xwin/xlaunch/resources/resources.h +++ b/xorg-server/hw/xwin/xlaunch/resources/resources.h @@ -24,86 +24,88 @@ * use or other dealings in this Software without prior written authorization. */ -#define IDC_STATIC -1 +#define IDC_STATIC -1 -#define IDD_WELCOME 100 -#define IDD_FINISH 101 -#define IDD_DISPLAY 102 -#define IDD_CLIENTS 103 -#define IDD_PROGRAM 104 -#define IDD_XDMCP 105 -#define IDD_FONTPATH 106 -#define IDD_EXTRA 107 +#define IDD_WELCOME 100 +#define IDD_FINISH 101 +#define IDD_DISPLAY 102 +#define IDD_CLIENTS 103 +#define IDD_PROGRAM 104 +#define IDD_XDMCP 105 +#define IDD_FONTPATH 106 +#define IDD_EXTRA 107 -#define IDI_XLAUNCH 108 +#define IDI_XLAUNCH 108 -#define IDS_DISPLAY_TITLE 300 -#define IDS_DISPLAY_SUBTITLE 301 -#define IDS_CLIENTS_TITLE 302 -#define IDS_CLIENTS_SUBTITLE 303 -#define IDS_PROGRAM_TITLE 304 -#define IDS_PROGRAM_SUBTITLE 305 -#define IDS_XDMCP_TITLE 306 -#define IDS_XDMCP_SUBTITLE 307 -#define IDS_FONTPATH_TITLE 308 -#define IDS_FONTPATH_SUBTITLE 309 -#define IDS_FINISH_TITLE 310 -#define IDS_FINISH_SUBTITLE 311 -#define IDS_EXTRA_TITLE 312 -#define IDS_EXTRA_SUBTITLE 313 -#define IDS_SAVE_TITLE 320 -#define IDS_SAVE_FILETITLE 321 -#define IDS_SAVE_FILTER 322 - -#define IDC_MULTIWINDOW 200 -#define IDC_WINDOWED 201 -#define IDC_FULLSCREEN 202 -#define IDC_NODECORATION 203 -#define IDC_MULTIWINDOW_IMG 204 -#define IDC_WINDOWED_IMG 205 -#define IDC_FULLSCREEN_IMG 206 -#define IDC_NODECORATION_IMG 207 -#define IDC_DISPLAY 208 -#define IDC_DISPLAY_DESC 209 +#define IDC_MULTIWINDOW 200 +#define IDC_WINDOWED 201 +#define IDC_FULLSCREEN 202 +#define IDC_NODECORATION 203 +#define IDC_MULTIWINDOW_IMG 204 +#define IDC_WINDOWED_IMG 205 +#define IDC_FULLSCREEN_IMG 206 +#define IDC_NODECORATION_IMG 207 +#define IDC_DISPLAY 208 +#define IDC_DISPLAY_DESC 209 -#define IDC_CLIENT_NONE 210 -#define IDC_XDMCP 211 -#define IDC_CLIENT 212 -#define IDC_CLIENT_LOCAL 213 -#define IDC_CLIENT_REMOTE 214 -#define IDC_CLIENT_HOST 215 -#define IDC_CLIENT_USER 216 -#define IDC_CLIENT_PASSWORD 217 -#define IDC_CLIENT_CONFIGURE 218 -#define IDC_CLIENT_PROGRAM 219 -#define IDC_XDMCP_QUERY 220 -#define IDC_XDMCP_BROADCAST 221 -#define IDC_XDMCP_INDIRECT 222 -#define IDC_XDMCP_HOST 223 -#define IDC_CLIENT_NONE_DESC 224 -#define IDC_XDMCP_DESC 225 -#define IDC_CLIENT_DESC 226 -#define IDC_XDMCP_QUERY_DESC 227 -#define IDC_CLIENT_PROGRAM_DESC 228 -#define IDC_CLIENT_HOST_DESC 229 -#define IDC_CLIENT_USER_DESC 230 -#define IDC_CLIENT_PASSWORD_DESC 231 +#define IDC_CLIENT_NONE 210 +#define IDC_XDMCP 211 +#define IDC_CLIENT 212 +#define IDC_CLIENT_LOCAL 213 +#define IDC_CLIENT_REMOTE 214 +#define IDC_CLIENT_HOST 215 +#define IDC_CLIENT_USER 216 +#define IDC_CLIENT_PASSWORD 217 +#define IDC_CLIENT_CONFIGURE 218 +#define IDC_CLIENT_PROGRAM 219 +#define IDC_XDMCP_QUERY 220 +#define IDC_XDMCP_BROADCAST 221 +#define IDC_XDMCP_INDIRECT 222 +#define IDC_XDMCP_HOST 223 +#define IDC_CLIENT_NONE_DESC 224 +#define IDC_XDMCP_DESC 225 +#define IDC_CLIENT_DESC 226 +#define IDC_XDMCP_QUERY_DESC 227 +#define IDC_CLIENT_PROGRAM_DESC 228 +#define IDC_CLIENT_HOST_DESC 229 +#define IDC_CLIENT_USER_DESC 230 +#define IDC_CLIENT_PASSWORD_DESC 231 #define IDC_CLIENT_REMOTEPROGRAM 232 #define IDC_CLIENT_REMOTEPROGRAM_DESC 233 -#define IDC_FONTPATH_DESC 240 +#define IDC_FONTPATH_DESC 240 + +#define IDC_FINISH_DESC 250 +#define IDC_FINISH_SAVE 251 +#define IDC_FINISH_SAVE_DESC 252 -#define IDC_FINISH_DESC 250 -#define IDC_FINISH_SAVE 251 -#define IDC_FINISH_SAVE_DESC 252 +#define IDC_CLIPBOARD 260 +#define IDC_CLIPBOARD_DESC 261 +#define IDC_EXTRA_PARAMS 262 +#define IDC_EXTRA_PARAMS_DESC 263 +#define IDC_WGL 264 +#define IDC_WGL_DESC 265 +#define IDC_CLIPBOARDPRIMARY 266 +#define IDC_CLIPBOARDPRIMARY_DESC 267 +#define IDC_DISABLEAC 268 +#define IDC_DISABLEAC_DESC 269 +#define IDC_XDMCP_TERMINATE 270 -#define IDC_CLIPBOARD 260 -#define IDC_CLIPBOARD_DESC 261 -#define IDC_EXTRA_PARAMS 262 -#define IDC_EXTRA_PARAMS_DESC 263 -#define IDC_WGL 264 -#define IDC_WGL_DESC 265 -#define IDC_CLIPBOARDPRIMARY 266 -#define IDC_CLIPBOARDPRIMARY_DESC 267 -#define IDC_DISABLEAC 268 -#define IDC_DISABLEAC_DESC 269 +#define IDS_DISPLAY_TITLE 300 +#define IDS_DISPLAY_SUBTITLE 301 +#define IDS_CLIENTS_TITLE 302 +#define IDS_CLIENTS_SUBTITLE 303 +#define IDS_PROGRAM_TITLE 304 +#define IDS_PROGRAM_SUBTITLE 305 +#define IDS_XDMCP_TITLE 306 +#define IDS_XDMCP_SUBTITLE 307 +#define IDS_FONTPATH_TITLE 308 +#define IDS_FONTPATH_SUBTITLE 309 +#define IDS_FINISH_TITLE 310 +#define IDS_FINISH_SUBTITLE 311 +#define IDS_EXTRA_TITLE 312 +#define IDS_EXTRA_SUBTITLE 313 +#define IDS_SAVE_TITLE 320 +#define IDS_SAVE_FILETITLE 321 +#define IDS_SAVE_FILTER 322 + diff --git a/xorg-server/hw/xwin/xlaunch/resources/strings.rc b/xorg-server/hw/xwin/xlaunch/resources/strings.rc index 1d7fd3b0a..dab2b30af 100644 --- a/xorg-server/hw/xwin/xlaunch/resources/strings.rc +++ b/xorg-server/hw/xwin/xlaunch/resources/strings.rc @@ -71,6 +71,8 @@ #define STR_DISABLEAC "Disable access control" #define STR_DISABLEAC_DESC "Use this when you want vcxsrv to accept connections from all clients." +#define STR_XDMCP_TERMINATE "Terminate on server reset." + #define STR_CAPTION_FINISH "Finish configuration" #define STR_FINISH_DESC "Configuration is complete. Click Finish to start VcXsrv." #define STR_FINISH_SAVE_DESC "You may also save the configuration for later use." -- cgit v1.2.3