Get rid of the DOS version combobox, normal users should never need to

change it.
This commit is contained in:
Alexandre Julliard 2005-05-07 18:06:35 +00:00
parent 836b7df693
commit bf961bb144
4 changed files with 8 additions and 84 deletions

View File

@ -44,13 +44,11 @@ BEGIN
LTEXT "Wine can mimic different Windows versions for each application.",
IDC_STATIC,15,20,227,20
CONTROL "Applications",IDC_APP_LISTVIEW,"SysListView32",WS_BORDER | WS_TABSTOP | LVS_LIST | LVS_SINGLESEL | LVS_SHOWSELALWAYS,
15,40,230,140
PUSHBUTTON "&Add application...",IDC_APP_ADDAPP, 90,184,75,14
PUSHBUTTON "&Remove application",IDC_APP_REMOVEAPP, 170,184,75,14
LTEXT "&Windows Version:",IDC_STATIC,17,204,58,8
COMBOBOX IDC_WINVER,83,202,163,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "&DOS Version:",IDC_STATIC,17,223,57,8
COMBOBOX IDC_DOSVER,83,224,163,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
15,40,230,160
PUSHBUTTON "&Add application...",IDC_APP_ADDAPP, 90,204,75,14
PUSHBUTTON "&Remove application",IDC_APP_REMOVEAPP, 170,204,75,14
LTEXT "&Windows Version:",IDC_STATIC,17,226,58,8
COMBOBOX IDC_WINVER,83,224,163,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
END
IDD_GRAPHCFG DIALOG DISCARDABLE 0, 0, 260, 250

View File

@ -37,16 +37,13 @@ static void update_comboboxes(HWND dialog)
int i;
const VERSION_DESC *pVer = NULL;
char *winver, *dosver;
char *winver;
/* retrieve the registry values */
winver = get(keypath("Version"), "Windows", "");
dosver = get(keypath("Version"), "DOS", "");
/* empty winver/dosver means use automatic mode (ie the builtin dll linkage heuristics) */
/* empty winver means use automatic mode (ie the builtin dll linkage heuristics) */
WINE_TRACE("winver is %s\n", *winver != '\0' ? winver : "null (automatic mode)");
WINE_TRACE("dosver is %s\n", *dosver != '\0' ? dosver : "null (automatic mode)");
/* normalize the version strings */
if (*winver != '\0')
@ -69,29 +66,7 @@ static void update_comboboxes(HWND dialog)
SendDlgItemMessage (dialog, IDC_WINVER, CB_SETCURSEL, 0, 0);
}
if (*dosver != '\0')
{
if ((pVer = getDOSVersions ()))
{
for (i = 0; *pVer->szVersion || *pVer->szDescription; i++, pVer++)
{
if (!strcasecmp (pVer->szVersion, dosver))
{
SendDlgItemMessage (dialog, IDC_DOSVER, CB_SETCURSEL,
(WPARAM) (i + 1), 0);
WINE_TRACE("match with %s\n", pVer->szVersion);
}
}
}
}
else
{
WINE_TRACE("setting dosver combobox to automatic/default\n");
SendDlgItemMessage (dialog, IDC_DOSVER, CB_SETCURSEL, 0, 0);
}
HeapFree(GetProcessHeap(), 0, winver);
HeapFree(GetProcessHeap(), 0, dosver);
}
void
@ -100,20 +75,16 @@ init_comboboxes (HWND dialog)
int i;
const VERSION_DESC *ver = NULL;
SendDlgItemMessage(dialog, IDC_WINVER, CB_RESETCONTENT, 0, 0);
SendDlgItemMessage(dialog, IDC_DOSVER, CB_RESETCONTENT, 0, 0);
/* add the default entries (automatic) which correspond to no setting */
if (current_app)
{
SendDlgItemMessage(dialog, IDC_WINVER, CB_ADDSTRING, 0, (LPARAM) "Use global settings");
SendDlgItemMessage(dialog, IDC_DOSVER, CB_ADDSTRING, 0, (LPARAM) "Use global settings");
}
else
{
SendDlgItemMessage(dialog, IDC_WINVER, CB_ADDSTRING, 0, (LPARAM) "Automatically detect required version");
SendDlgItemMessage(dialog, IDC_DOSVER, CB_ADDSTRING, 0, (LPARAM) "Automatically detect required version");
}
if ((ver = getWinVersions ()))
@ -124,14 +95,6 @@ init_comboboxes (HWND dialog)
0, (LPARAM) ver->szDescription);
}
}
if ((ver = getDOSVersions ()))
{
for (i = 0; *ver->szVersion || *ver->szDescription ; i++, ver++)
{
SendDlgItemMessage (dialog, IDC_DOSVER, CB_ADDSTRING,
0, (LPARAM) ver->szDescription);
}
}
}
static void add_listview_item(HWND listview, char *text, void *association)
@ -345,26 +308,6 @@ static void on_winver_change(HWND dialog)
SendMessage(GetParent(dialog), PSM_CHANGED, (WPARAM) dialog, 0);
}
static void on_dosver_change(HWND dialog)
{
int selection = SendDlgItemMessage(dialog, IDC_DOSVER, CB_GETCURSEL, 0, 0);
VERSION_DESC *ver = getDOSVersions();
if (selection == 0)
{
WINE_TRACE("automatic/default selected so removing current setting\n");
set(keypath("Version"), "DOS", NULL);
}
else
{
WINE_TRACE("setting Version\\DOS key to value '%s'\n", ver[selection - 1].szVersion);
set(keypath("Version"), "DOS", ver[selection - 1].szVersion);
}
/* enable the apply button */
SendMessage(GetParent(dialog), PSM_CHANGED, (WPARAM) dialog, 0);
}
INT_PTR CALLBACK
AppDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
@ -401,9 +344,6 @@ AppDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case IDC_WINVER:
on_winver_change(hDlg);
break;
case IDC_DOSVER:
on_dosver_change(hDlg);
break;
}
case BN_CLICKED:
switch(LOWORD(wParam))

View File

@ -39,11 +39,6 @@ static VERSION_DESC sWinVersions[] = {
{"", ""}
};
static VERSION_DESC sDOSVersions[] = {
{"6.22", "MS-DOS 6.22"},
{"", ""}
};
static DLL_DESC sDLLType[] = {
{"oleaut32", DLL_BUILTIN},
{"ole32", DLL_BUILTIN},
@ -83,14 +78,6 @@ VERSION_DESC* getWinVersions(void)
}
/*****************************************************************************
*/
VERSION_DESC* getDOSVersions(void)
{
return sDOSVersions;
}
/*****************************************************************************
*/
DLL_DESC* getDLLDefaults(void)

View File

@ -42,7 +42,6 @@
#define IDC_APPLYBTN 1002
#define IDC_WINEVER 1011
#define IDC_WINVER 1012
#define IDC_DOSVER 1014
#define IDC_SYSCOLORS 1017
#define IDC_PRIVATEMAP 1018
#define IDC_PERFECTGRAPH 1019