Commit a18f2061 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed registry paths to edit the real config, and removed the startup

warning message.
parent f0fcaed6
...@@ -233,15 +233,6 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrev, LPSTR szCmdLine, int nShow) ...@@ -233,15 +233,6 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrev, LPSTR szCmdLine, int nShow)
if (ProcessCmdLine(szCmdLine)) { if (ProcessCmdLine(szCmdLine)) {
return 0; return 0;
} }
/* Until winecfg is fully functional, warn users that it is incomplete and doesn't do anything */
if (!getenv("WINECFG_NOWARN")) {
WINE_FIXME("The winecfg tool is not yet complete, and does not actually alter your configuration.\n");
WINE_FIXME("If you want to alter the way Wine works, look in the ~/.wine/config file for more information.\n");
MessageBoxA(NULL, "The winecfg tool is not yet complete, and does not actually alter your configuration\n\n"
"If you want to alter the way Wine works, look in the ~/.wine/config file for more information.",
"", MB_OK | MB_ICONEXCLAMATION);
}
if (initialize() != 0) { if (initialize() != 0) {
WINE_ERR("initialization failed, aborting\n"); WINE_ERR("initialization failed, aborting\n");
......
...@@ -521,7 +521,7 @@ void PRINTERROR(void) ...@@ -521,7 +521,7 @@ void PRINTERROR(void)
} }
int initialize(void) { int initialize(void) {
DWORD res = RegCreateKey(HKEY_LOCAL_MACHINE, WINE_KEY_ROOT, &config_key); DWORD res = RegCreateKey(HKEY_CURRENT_USER, WINE_KEY_ROOT, &config_key);
if (res != ERROR_SUCCESS) { if (res != ERROR_SUCCESS) {
WINE_ERR("RegOpenKey failed on wine config key (%ld)\n", res); WINE_ERR("RegOpenKey failed on wine config key (%ld)\n", res);
......
...@@ -126,6 +126,6 @@ static inline void set_text(HWND dialog, WORD id, const char *text) ...@@ -126,6 +126,6 @@ static inline void set_text(HWND dialog, WORD id, const char *text)
SetWindowText(GetDlgItem(dialog, id), text); SetWindowText(GetDlgItem(dialog, id), text);
} }
#define WINE_KEY_ROOT "Software\\Wine\\Testing\\Config" #define WINE_KEY_ROOT "Software\\Wine"
#endif #endif
...@@ -44,7 +44,7 @@ static void update_gui_for_desktop_mode(HWND dialog) { ...@@ -44,7 +44,7 @@ static void update_gui_for_desktop_mode(HWND dialog) {
updating_ui = TRUE; updating_ui = TRUE;
/* do we have desktop mode enabled? */ /* do we have desktop mode enabled? */
if (reg_key_exists(keypath("x11drv"), "Desktop")) if (reg_key_exists(keypath("X11 Driver"), "Desktop"))
{ {
char* buf, *bufindex; char* buf, *bufindex;
CheckDlgButton(dialog, IDC_ENABLE_DESKTOP, BST_CHECKED); CheckDlgButton(dialog, IDC_ENABLE_DESKTOP, BST_CHECKED);
...@@ -54,7 +54,7 @@ static void update_gui_for_desktop_mode(HWND dialog) { ...@@ -54,7 +54,7 @@ static void update_gui_for_desktop_mode(HWND dialog) {
enable(IDC_DESKTOP_SIZE); enable(IDC_DESKTOP_SIZE);
enable(IDC_DESKTOP_BY); enable(IDC_DESKTOP_BY);
buf = get_reg_key(keypath("x11drv"), "Desktop", "640x480"); buf = get_reg_key(keypath("X11 Driver"), "Desktop", "640x480");
bufindex = strchr(buf, 'x'); bufindex = strchr(buf, 'x');
if (bufindex) { if (bufindex) {
*bufindex = 0; *bufindex = 0;
...@@ -99,7 +99,7 @@ static void init_dialog (HWND dialog) ...@@ -99,7 +99,7 @@ static void init_dialog (HWND dialog)
SendDlgItemMessage(dialog, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "24 bit"); SendDlgItemMessage(dialog, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "24 bit");
SendDlgItemMessage(dialog, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "32 bit"); /* is this valid? */ SendDlgItemMessage(dialog, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "32 bit"); /* is this valid? */
buf = get_reg_key(keypath("x11drv"), "ScreenDepth", "24"); buf = get_reg_key(keypath("X11 Driver"), "ScreenDepth", "24");
if (strcmp(buf, "8") == 0) if (strcmp(buf, "8") == 0)
SendDlgItemMessage(dialog, IDC_SCREEN_DEPTH, CB_SETCURSEL, 0, 0); SendDlgItemMessage(dialog, IDC_SCREEN_DEPTH, CB_SETCURSEL, 0, 0);
else if (strcmp(buf, "16") == 0) else if (strcmp(buf, "16") == 0)
...@@ -115,14 +115,14 @@ static void init_dialog (HWND dialog) ...@@ -115,14 +115,14 @@ static void init_dialog (HWND dialog)
SendDlgItemMessage(dialog, IDC_DESKTOP_WIDTH, EM_LIMITTEXT, RES_MAXLEN, 0); SendDlgItemMessage(dialog, IDC_DESKTOP_WIDTH, EM_LIMITTEXT, RES_MAXLEN, 0);
SendDlgItemMessage(dialog, IDC_DESKTOP_HEIGHT, EM_LIMITTEXT, RES_MAXLEN, 0); SendDlgItemMessage(dialog, IDC_DESKTOP_HEIGHT, EM_LIMITTEXT, RES_MAXLEN, 0);
buf = get_reg_key(keypath("x11drv"), "DXGrab", "Y"); buf = get_reg_key(keypath("X11 Driver"), "DXGrab", "Y");
if (IS_OPTION_TRUE(*buf)) if (IS_OPTION_TRUE(*buf))
CheckDlgButton(dialog, IDC_DX_MOUSE_GRAB, BST_CHECKED); CheckDlgButton(dialog, IDC_DX_MOUSE_GRAB, BST_CHECKED);
else else
CheckDlgButton(dialog, IDC_DX_MOUSE_GRAB, BST_UNCHECKED); CheckDlgButton(dialog, IDC_DX_MOUSE_GRAB, BST_UNCHECKED);
HeapFree(GetProcessHeap(), 0, buf); HeapFree(GetProcessHeap(), 0, buf);
buf = get_reg_key(keypath("x11drv"), "DesktopDoubleBuffered", "Y"); buf = get_reg_key(keypath("X11 Driver"), "DesktopDoubleBuffered", "Y");
if (IS_OPTION_TRUE(*buf)) if (IS_OPTION_TRUE(*buf))
CheckDlgButton(dialog, IDC_DOUBLE_BUFFER, BST_CHECKED); CheckDlgButton(dialog, IDC_DOUBLE_BUFFER, BST_CHECKED);
else else
...@@ -154,7 +154,7 @@ static void set_from_desktop_edits(HWND dialog) { ...@@ -154,7 +154,7 @@ static void set_from_desktop_edits(HWND dialog) {
new = HeapAlloc(GetProcessHeap(), 0, strlen(width) + strlen(height) + 2 /* x + terminator */); new = HeapAlloc(GetProcessHeap(), 0, strlen(width) + strlen(height) + 2 /* x + terminator */);
sprintf(new, "%sx%s", width, height); sprintf(new, "%sx%s", width, height);
set_reg_key(keypath("x11drv"), "Desktop", new); set_reg_key(keypath("X11 Driver"), "Desktop", new);
HeapFree(GetProcessHeap(), 0, width); HeapFree(GetProcessHeap(), 0, width);
HeapFree(GetProcessHeap(), 0, height); HeapFree(GetProcessHeap(), 0, height);
...@@ -167,7 +167,7 @@ static void on_enable_desktop_clicked(HWND dialog) { ...@@ -167,7 +167,7 @@ static void on_enable_desktop_clicked(HWND dialog) {
if (IsDlgButtonChecked(dialog, IDC_ENABLE_DESKTOP) == BST_CHECKED) { if (IsDlgButtonChecked(dialog, IDC_ENABLE_DESKTOP) == BST_CHECKED) {
set_from_desktop_edits(dialog); set_from_desktop_edits(dialog);
} else { } else {
set_reg_key(keypath("x11drv"), "Desktop", NULL); set_reg_key(keypath("X11 Driver"), "Desktop", NULL);
} }
update_gui_for_desktop_mode(dialog); update_gui_for_desktop_mode(dialog);
...@@ -181,23 +181,23 @@ static void on_screen_depth_changed(HWND dialog) { ...@@ -181,23 +181,23 @@ static void on_screen_depth_changed(HWND dialog) {
if (updating_ui) return; if (updating_ui) return;
*spaceIndex = '\0'; *spaceIndex = '\0';
set_reg_key(keypath("x11drv"), "ScreenDepth", newvalue); set_reg_key(keypath("X11 Driver"), "ScreenDepth", newvalue);
HeapFree(GetProcessHeap(), 0, newvalue); HeapFree(GetProcessHeap(), 0, newvalue);
} }
static void on_dx_mouse_grab_clicked(HWND dialog) { static void on_dx_mouse_grab_clicked(HWND dialog) {
if (IsDlgButtonChecked(dialog, IDC_DX_MOUSE_GRAB) == BST_CHECKED) if (IsDlgButtonChecked(dialog, IDC_DX_MOUSE_GRAB) == BST_CHECKED)
set_reg_key(keypath("x11drv"), "DXGrab", "Y"); set_reg_key(keypath("X11 Driver"), "DXGrab", "Y");
else else
set_reg_key(keypath("x11drv"), "DXGrab", "N"); set_reg_key(keypath("X11 Driver"), "DXGrab", "N");
} }
static void on_double_buffer_clicked(HWND dialog) { static void on_double_buffer_clicked(HWND dialog) {
if (IsDlgButtonChecked(dialog, IDC_DOUBLE_BUFFER) == BST_CHECKED) if (IsDlgButtonChecked(dialog, IDC_DOUBLE_BUFFER) == BST_CHECKED)
set_reg_key(keypath("x11drv"), "DesktopDoubleBuffered", "Y"); set_reg_key(keypath("X11 Driver"), "DesktopDoubleBuffered", "Y");
else else
set_reg_key(keypath("x11drv"), "DesktopDoubleBuffered", "N"); set_reg_key(keypath("X11 Driver"), "DesktopDoubleBuffered", "N");
} }
INT_PTR CALLBACK INT_PTR CALLBACK
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment