This serie cleans up (partially) the builtin Wine programs/* compiled as GUI but still outputing to unix console.
Starting with the low hanging fruits with cases where no one should care for the output.
From: Eric Pouech epouech@codeweavers.com
Regular GUI apps don't.
Signed-off-by: Eric Pouech epouech@codeweavers.com --- programs/taskmgr/dbgchnl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/programs/taskmgr/dbgchnl.c b/programs/taskmgr/dbgchnl.c index 2d160bf4b50..ba17c5d21d6 100644 --- a/programs/taskmgr/dbgchnl.c +++ b/programs/taskmgr/dbgchnl.c @@ -42,7 +42,6 @@ * - get a better UI (replace the 'x' by real tick boxes in list view) * - enhance visual feedback: the list is large, and it's hard to get the * right line when clicking on rightmost column (trace for example) - * - get rid of printfs (error reporting) and use real message boxes * - include the column width settings in the full column management scheme * - use more global settings (like having a temporary on/off * setting for a fixme:s or err:s @@ -260,7 +259,7 @@ static void DebugChannels_OnNotify(HWND hDlg, LPARAM lParam) ListView_SetItemTextW(hChannelLV, lhti.iItem, lhti.iSubItem, val); } if (user.notdone) - printf("Some channel instances weren't correctly set\n"); + MessageBoxA(NULL, "Some channel instances weren't correctly set", "Error", MB_OK | MB_ICONHAND); } CloseHandle(hProcess); }
From: Eric Pouech epouech@codeweavers.com
Signed-off-by: Eric Pouech epouech@codeweavers.com --- programs/wordpad/wordpad.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c index 042cc04f4ad..b357ef7d6b8 100644 --- a/programs/wordpad/wordpad.c +++ b/programs/wordpad/wordpad.c @@ -2011,12 +2011,7 @@ static LRESULT OnCreate( HWND hWnd ) |ES_WANTRETURN|WS_VSCROLL|ES_NOHIDESEL|WS_HSCROLL, 0, 0, 1000, 100, hWnd, (HMENU)IDC_EDITOR, hInstance, NULL);
- if (!hEditorWnd) - { - fprintf(stderr, "Error code %lu\n", GetLastError()); - return -1; - } - assert(hEditorWnd); + if (!hEditorWnd) return -1;
setup_richedit_olecallback(hEditorWnd); SetFocus(hEditorWnd);
From: Eric Pouech epouech@codeweavers.com
As regular GUI apps should.
Signed-off-by: Eric Pouech epouech@codeweavers.com --- programs/mshta/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/programs/mshta/main.c b/programs/mshta/main.c index a0287a7d7cd..0e0a75dfbae 100644 --- a/programs/mshta/main.c +++ b/programs/mshta/main.c @@ -21,9 +21,10 @@ #define WIN32_LEAN_AND_MEAN #include <stdio.h> #include <windows.h> +#include "wine/debug.h"
int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cmdshow) { - printf("mshta.exe is a stub!\n"); + MESSAGE("mshta.exe is a stub!\n"); return 0; }
From: Eric Pouech epouech@codeweavers.com
Signed-off-by: Eric Pouech epouech@codeweavers.com --- programs/winebrowser/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/programs/winebrowser/main.c b/programs/winebrowser/main.c index 369ecb98002..24416070152 100644 --- a/programs/winebrowser/main.c +++ b/programs/winebrowser/main.c @@ -396,8 +396,7 @@ static WCHAR *convert_file_uri(IUri *uri) }
/***************************************************************************** - * Main entry point. This is a console application so we have a wmain() not a - * winmain(). + * Main entry point. */ int wmain(int argc, WCHAR *argv[]) {