From: Rémi Bernon rbernon@codeweavers.com
--- programs/explorer/appbar.c | 35 ++++++++++++++++------------------- programs/explorer/desktop.c | 26 ++++++++++++-------------- programs/explorer/explorer.c | 30 ++++++++++++++---------------- programs/explorer/startmenu.c | 4 ++-- programs/explorer/systray.c | 22 +++++++++++----------- 5 files changed, 55 insertions(+), 62 deletions(-)
diff --git a/programs/explorer/appbar.c b/programs/explorer/appbar.c index 2f96c580e19..af2ede55ba3 100644 --- a/programs/explorer/appbar.c +++ b/programs/explorer/appbar.c @@ -149,7 +149,7 @@ static UINT_PTR handle_appbarmessage(DWORD msg, struct appbar_data_msg *abd) data = calloc( 1, sizeof(struct appbar_data) ); if (!data) { - WINE_ERR("out of memory\n"); + ERR( "out of memory\n" ); return FALSE; } data->hwnd = hwnd; @@ -167,18 +167,16 @@ static UINT_PTR handle_appbarmessage(DWORD msg, struct appbar_data_msg *abd)
free( data ); } - else - WINE_WARN("removing hwnd %p not on the list\n", hwnd); + else WARN( "removing hwnd %p not on the list\n", hwnd ); return TRUE; case ABM_QUERYPOS: - if (abd->uEdge > ABE_BOTTOM) - WINE_WARN("invalid edge %i for %p\n", abd->uEdge, hwnd); + if (abd->uEdge > ABE_BOTTOM) WARN( "invalid edge %i for %p\n", abd->uEdge, hwnd ); appbar_cliprect( hwnd, &abd->rc ); return TRUE; case ABM_SETPOS: if (abd->uEdge > ABE_BOTTOM) { - WINE_WARN("invalid edge %i for %p\n", abd->uEdge, hwnd); + WARN( "invalid edge %i for %p\n", abd->uEdge, hwnd ); return TRUE; } if ((data = get_appbar(hwnd))) @@ -196,14 +194,14 @@ static UINT_PTR handle_appbarmessage(DWORD msg, struct appbar_data_msg *abd) } else { - WINE_WARN("app sent ABM_SETPOS message for %p without ABM_ADD\n", hwnd); + WARN( "app sent ABM_SETPOS message for %p without ABM_ADD\n", hwnd ); } return TRUE; case ABM_GETSTATE: - WINE_FIXME("SHAppBarMessage(ABM_GETSTATE): stub\n"); + FIXME( "SHAppBarMessage(ABM_GETSTATE): stub\n" ); return ABS_ALWAYSONTOP | ABS_AUTOHIDE; case ABM_GETTASKBARPOS: - WINE_FIXME("SHAppBarMessage(ABM_GETTASKBARPOS, hwnd=%p): stub\n", hwnd); + FIXME( "SHAppBarMessage(ABM_GETTASKBARPOS, hwnd=%p): stub\n", hwnd ); /* Report the taskbar is at the bottom of the screen. */ abd->rc.left = 0; abd->rc.right = GetSystemMetrics(SM_CXSCREEN); @@ -214,16 +212,16 @@ static UINT_PTR handle_appbarmessage(DWORD msg, struct appbar_data_msg *abd) case ABM_ACTIVATE: return TRUE; case ABM_GETAUTOHIDEBAR: - WINE_FIXME("SHAppBarMessage(ABM_GETAUTOHIDEBAR, hwnd=%p, edge=%x): stub\n", hwnd, abd->uEdge); + FIXME( "SHAppBarMessage(ABM_GETAUTOHIDEBAR, hwnd=%p, edge=%x): stub\n", hwnd, abd->uEdge ); return 0; case ABM_SETAUTOHIDEBAR: - WINE_FIXME("SHAppBarMessage(ABM_SETAUTOHIDEBAR, hwnd=%p, edge=%x, lparam=%s): stub\n", - hwnd, abd->uEdge, wine_dbgstr_longlong(abd->lParam)); + FIXME( "SHAppBarMessage(ABM_SETAUTOHIDEBAR, hwnd=%p, edge=%x, lparam=%s): stub\n", hwnd, + abd->uEdge, wine_dbgstr_longlong( abd->lParam ) ); return TRUE; case ABM_WINDOWPOSCHANGED: return TRUE; default: - WINE_FIXME("SHAppBarMessage(%lx) unimplemented\n", msg); + FIXME( "SHAppBarMessage(%lx) unimplemented\n", msg ); return FALSE; } } @@ -252,14 +250,14 @@ static LRESULT CALLBACK appbar_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARA return_hproc = OpenProcess(PROCESS_DUP_HANDLE, FALSE, cmd.return_process); if (return_hproc == NULL) { - WINE_ERR("couldn't open calling process\n"); + ERR( "couldn't open calling process\n" ); return TRUE; }
if (!DuplicateHandle(return_hproc, UlongToHandle(cmd.return_map), GetCurrentProcess(), &return_map, 0, FALSE, DUPLICATE_SAME_ACCESS)) { - WINE_ERR("couldn't duplicate handle\n"); + ERR( "couldn't duplicate handle\n" ); CloseHandle(return_hproc); return TRUE; } @@ -275,8 +273,7 @@ static LRESULT CALLBACK appbar_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARA
UnmapViewOfFile(return_view); } - else - WINE_ERR("couldn't map view of file\n"); + else ERR( "couldn't map view of file\n" );
CloseHandle(return_map); return TRUE; @@ -302,14 +299,14 @@ void initialize_appbar(void)
if (!RegisterClassExW(&class)) { - WINE_ERR("Could not register appbar message window class\n"); + ERR( "Could not register appbar message window class\n" ); return; }
appbarmsg_window = CreateWindowW(classname, classname, 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL); if (!appbarmsg_window) { - WINE_ERR("Could not create appbar message window\n"); + ERR( "Could not create appbar message window\n" ); return; } } diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 79652cbbc3b..6a9724a6a2d 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -594,13 +594,13 @@ static void initialize_launchers( HWND hwnd ) hr = SHGetKnownFolderPath( &FOLDERID_Desktop, KF_FLAG_CREATE, NULL, &desktop_folder ); if (FAILED( hr )) { - WINE_ERR("Could not get user desktop folder\n"); + ERR( "Could not get user desktop folder\n" ); return; } hr = SHGetKnownFolderPath( &FOLDERID_PublicDesktop, KF_FLAG_CREATE, NULL, &desktop_folder_public ); if (FAILED( hr )) { - WINE_ERR("Could not get public desktop folder\n"); + ERR( "Could not get public desktop folder\n" ); CoTaskMemFree( desktop_folder ); return; } @@ -707,7 +707,7 @@ static WNDPROC desktop_orig_wndproc; /* window procedure for the desktop window */ static LRESULT WINAPI desktop_wnd_proc( HWND hwnd, UINT message, WPARAM wp, LPARAM lp ) { - WINE_TRACE( "got msg %04x wp %Ix lp %Ix\n", message, wp, lp ); + TRACE( "got msg %04x wp %Ix lp %Ix\n", message, wp, lp );
switch(message) { @@ -963,19 +963,17 @@ static void initialize_display_settings(void) { if (!EnumDisplaySettingsExW( ddW.DeviceName, ENUM_CURRENT_SETTINGS, &dmW, 0)) { - WINE_ERR( "Failed to query current display settings for %s.\n", - wine_dbgstr_w( ddW.DeviceName ) ); + ERR( "Failed to query current display settings for %s.\n", debugstr_w(ddW.DeviceName) ); continue; }
- WINE_TRACE( "Device %s current display mode %lux%lu %luBits %luHz at %ld,%ld.\n", - wine_dbgstr_w( ddW.DeviceName ), dmW.dmPelsWidth, dmW.dmPelsHeight, - dmW.dmBitsPerPel, dmW.dmDisplayFrequency, dmW.dmPosition.x, dmW.dmPosition.y ); + TRACE( "Device %s current display mode %lux%lu %luBits %luHz at %ld,%ld.\n", + debugstr_w( ddW.DeviceName ), dmW.dmPelsWidth, dmW.dmPelsHeight, + dmW.dmBitsPerPel, dmW.dmDisplayFrequency, dmW.dmPosition.x, dmW.dmPosition.y );
if (ChangeDisplaySettingsExW( ddW.DeviceName, &dmW, 0, CDS_GLOBAL | CDS_NORESET | CDS_UPDATEREGISTRY, 0 )) - WINE_ERR( "Failed to initialize registry display settings for %s.\n", - wine_dbgstr_w( ddW.DeviceName ) ); + ERR( "Failed to initialize registry display settings for %s.\n", debugstr_w(ddW.DeviceName) ); } }
@@ -1077,7 +1075,7 @@ void manage_desktop( WCHAR *arg ) else desktop = CreateDesktopW( name, NULL, &devmode, DF_WINE_CREATE_DESKTOP, DESKTOP_ALL_ACCESS, NULL ); if (!desktop) { - WINE_ERR( "failed to create desktop %s error %ld\n", wine_dbgstr_w(name), GetLastError() ); + ERR( "failed to create desktop %s error %ld\n", debugstr_w(name), GetLastError() ); ExitProcess( 1 ); } SetThreadDesktop( desktop ); @@ -1127,7 +1125,7 @@ void manage_desktop( WCHAR *arg )
memset( &si, 0, sizeof(si) ); si.cb = sizeof(si); - WINE_TRACE( "starting %s\n", wine_dbgstr_w(cmdline) ); + TRACE( "starting %s\n", debugstr_w(cmdline) ); if (CreateProcessW( NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi )) { CloseHandle( pi.hThread ); @@ -1141,9 +1139,9 @@ void manage_desktop( WCHAR *arg ) /* run the desktop message loop */ if (hwnd) { - WINE_TRACE( "desktop message loop starting on hwnd %p\n", hwnd ); + TRACE( "desktop message loop starting on hwnd %p\n", hwnd ); while (GetMessageW( &msg, 0, 0, 0 )) DispatchMessageW( &msg ); - WINE_TRACE( "desktop message loop exiting for hwnd %p\n", hwnd ); + TRACE( "desktop message loop exiting for hwnd %p\n", hwnd ); }
if (pShellDDEInit) pShellDDEInit( FALSE ); diff --git a/programs/explorer/explorer.c b/programs/explorer/explorer.c index 8960ac62d81..66636d374ff 100644 --- a/programs/explorer/explorer.c +++ b/programs/explorer/explorer.c @@ -131,7 +131,7 @@ static BOOL create_combobox_item(IShellFolder *folder, LPCITEMIDLIST child_pidl, hres = StrRetToStrW(&strret, child_pidl, &item->pszText); if(FAILED(hres)) { - WINE_WARN("Could not get name for pidl\n"); + WARN( "Could not get name for pidl\n" ); return FALSE; }
@@ -198,8 +198,8 @@ static void update_path_box(explorer_info *info) hres = IEnumIDList_Next(ids,1,&curr_pidl,NULL); if(FAILED(hres) || hres == S_FALSE) break; - if(!create_combobox_item(desktop,curr_pidl,info->icon_list,&item)) - WINE_WARN("Could not create a combobox item\n"); + if (!create_combobox_item( desktop, curr_pidl, info->icon_list, &item )) + WARN( "Could not create a combobox item\n" ); else { LPITEMIDLIST full_pidl = ILCombine(desktop_pidl,curr_pidl); @@ -215,8 +215,7 @@ static void update_path_box(explorer_info *info) hres = IShellFolder_BindToObject(desktop,curr_pidl,NULL, &IID_IShellFolder, (void**)&curr_folder); - if(FAILED(hres)) - WINE_WARN("Could not get an IShellFolder\n"); + if (FAILED(hres)) WARN( "Could not get an IShellFolder\n" ); while(!ILIsEmpty(next_pidl)) { LPITEMIDLIST first = ILCloneFirst(next_pidl); @@ -224,7 +223,7 @@ static void update_path_box(explorer_info *info) if(!create_combobox_item(curr_folder,first, info->icon_list,&item)) { - WINE_WARN("Could not create a combobox item\n"); + WARN( "Could not create a combobox item\n" ); break; } ++item.iIndent; @@ -237,7 +236,7 @@ static void update_path_box(explorer_info *info) (void**)&temp); if(FAILED(hres)) { - WINE_WARN("Could not get an IShellFolder\n"); + WARN( "Could not get an IShellFolder\n" ); break; } IShellFolder_Release(curr_folder); @@ -258,8 +257,7 @@ static void update_path_box(explorer_info *info) ILFree(curr_pidl); IEnumIDList_Release(ids); } - else - WINE_WARN("Could not enumerate the desktop\n"); + else WARN( "Could not enumerate the desktop\n" ); SendMessageW(info->path_box,CBEM_SETITEMW,0,(LPARAM)&main_item); CoTaskMemFree(main_item.pszText); } @@ -447,7 +445,7 @@ static void make_explorer_window(parameters_struct *params) info = calloc( 1, sizeof(explorer_info) ); if(!info) { - WINE_ERR("Could not allocate an explorer_info struct\n"); + ERR( "Could not allocate an explorer_info struct\n" ); IShellWindows_Release(sw); free(path); return; @@ -456,7 +454,7 @@ static void make_explorer_window(parameters_struct *params) &IID_IExplorerBrowser,(LPVOID*)&info->browser); if(FAILED(hres)) { - WINE_ERR( "Could not obtain an instance of IExplorerBrowser\n" ); + ERR( "Could not obtain an instance of IExplorerBrowser\n" ); free(info); IShellWindows_Release(sw); free(path); @@ -574,7 +572,7 @@ static LRESULT explorer_on_end_edit(explorer_info *info,NMCBEENDEDITW *edit_info { LPITEMIDLIST pidl = NULL;
- WINE_TRACE("iWhy=%x\n",edit_info->iWhy); + TRACE( "iWhy=%x\n", edit_info->iWhy ); switch(edit_info->iWhy) { case CBENF_DROPDOWN: @@ -623,7 +621,7 @@ static LRESULT update_rebar_size(explorer_info* info,NMRBAUTOSIZE *size_info)
static LRESULT explorer_on_notify(explorer_info* info,NMHDR* notification) { - WINE_TRACE("code=%i\n",notification->code); + TRACE( "code=%i\n", notification->code ); switch(notification->code) { case CBEN_BEGINEDIT: @@ -707,7 +705,7 @@ static LRESULT CALLBACK explorer_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, L = (explorer_info*)GetWindowLongPtrW(hwnd,EXPLORER_INFO_INDEX); IExplorerBrowser *browser = NULL;
- WINE_TRACE("(hwnd=%p,uMsg=%u,wParam=%Ix,lParam=%Ix)\n",hwnd,uMsg,wParam,lParam); + TRACE( "(hwnd=%p,uMsg=%u,wParam=%Ix,lParam=%Ix)\n", hwnd, uMsg, wParam, lParam ); if(info) browser = info->browser; switch(uMsg) @@ -913,7 +911,7 @@ int WINAPI wWinMain(HINSTANCE hinstance, hres = OleInitialize(NULL); if(FAILED(hres)) { - WINE_ERR("Could not initialize COM\n"); + ERR( "Could not initialize COM\n" ); ExitProcess(EXIT_FAILURE); } if(parameters.root[0] && !PathIsDirectoryW(parameters.root)) @@ -923,7 +921,7 @@ int WINAPI wWinMain(HINSTANCE hinstance, init_info.dwICC = ICC_USEREX_CLASSES | ICC_BAR_CLASSES | ICC_COOL_CLASSES; if(!InitCommonControlsEx(&init_info)) { - WINE_ERR("Could not initialize Comctl\n"); + ERR( "Could not initialize Comctl\n" ); ExitProcess(EXIT_FAILURE); } register_explorer_window_class(); diff --git a/programs/explorer/startmenu.c b/programs/explorer/startmenu.c index 0a6ef5f9c25..489a81f94b9 100644 --- a/programs/explorer/startmenu.c +++ b/programs/explorer/startmenu.c @@ -440,7 +440,7 @@ void do_startmenu(HWND hwnd)
destroy_menus();
- WINE_TRACE("creating start menu\n"); + TRACE( "creating start menu\n" );
root_menu.menuhandle = public_startmenu.menuhandle = user_startmenu.menuhandle = CreatePopupMenu(); if (!root_menu.menuhandle) @@ -498,6 +498,6 @@ void do_startmenu(HWND hwnd) TPM_LEFTALIGN|TPM_BOTTOMALIGN|TPM_VERTICAL, rc.left, rc.top, hwnd, &tpm)) { - WINE_ERR("couldn't display menu\n"); + ERR( "couldn't display menu\n" ); } } diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index 4cea6c9f458..7be26f4026f 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -319,7 +319,7 @@ static void invalidate_icons( unsigned int start, unsigned int end ) /* make an icon visible */ static BOOL show_icon(struct icon *icon) { - WINE_TRACE("id=0x%x, hwnd=%p\n", icon->id, icon->owner); + TRACE( "id=0x%x, hwnd=%p\n", icon->id, icon->owner );
if (icon->display != -1) return TRUE; /* already displayed */
@@ -349,7 +349,7 @@ static BOOL hide_icon(struct icon *icon) { unsigned int i;
- WINE_TRACE("id=0x%x, hwnd=%p\n", icon->id, icon->owner); + TRACE( "id=0x%x, hwnd=%p\n", icon->id, icon->owner );
if (icon->display == -1) return TRUE; /* already hidden */
@@ -374,12 +374,12 @@ static BOOL hide_icon(struct icon *icon) /* Modifies an existing icon record */ static BOOL modify_icon( struct icon *icon, NOTIFYICONDATAW *nid ) { - WINE_TRACE("id=0x%x, hwnd=%p\n", nid->uID, nid->hWnd); + TRACE( "id=0x%x, hwnd=%p\n", nid->uID, nid->hWnd );
/* demarshal the request from the NID */ if (!icon) { - WINE_WARN("Invalid icon ID (0x%x) for HWND %p\n", nid->uID, nid->hWnd); + WARN( "Invalid icon ID (0x%x) for HWND %p\n", nid->uID, nid->hWnd ); return FALSE; }
@@ -423,17 +423,17 @@ static BOOL add_icon(NOTIFYICONDATAW *nid) { struct icon *icon;
- WINE_TRACE("id=0x%x, hwnd=%p\n", nid->uID, nid->hWnd); + TRACE( "id=0x%x, hwnd=%p\n", nid->uID, nid->hWnd );
if ((icon = get_icon(nid->hWnd, nid->uID))) { - WINE_WARN("duplicate tray icon add, buggy app?\n"); + WARN( "duplicate tray icon add, buggy app?\n" ); return FALSE; }
if (!(icon = calloc( 1, sizeof(*icon) ))) { - WINE_ERR("out of memory\n"); + ERR( "out of memory\n" ); return FALSE; }
@@ -554,7 +554,7 @@ static BOOL handle_incoming(HWND hwndSource, COPYDATASTRUCT *cds)
if (cds->cbData < sizeof(*data) + cbMaskBits + cbColourBits) { - WINE_ERR("buffer underflow\n"); + ERR( "buffer underflow\n" ); return FALSE; } nid.hIcon = CreateIcon(NULL, data->width, data->height, data->planes, data->bpp, @@ -591,7 +591,7 @@ static BOOL handle_incoming(HWND hwndSource, COPYDATASTRUCT *cds) } break; default: - WINE_FIXME("unhandled tray message: %Id\n", cds->dwData); + FIXME( "unhandled tray message: %Id\n", cds->dwData ); break; }
@@ -915,7 +915,7 @@ void initialize_systray( HMODULE graphics_driver, BOOL using_root, BOOL arg_enab
if (!RegisterClassExW(&class)) { - WINE_ERR("Could not register SysTray window class\n"); + ERR( "Could not register SysTray window class\n" ); return; }
@@ -928,7 +928,7 @@ void initialize_systray( HMODULE graphics_driver, BOOL using_root, BOOL arg_enab taskbar_rect.bottom - taskbar_rect.top, 0, 0, 0, 0 ); if (!tray_window) { - WINE_ERR("Could not create tray window\n"); + ERR( "Could not create tray window\n" ); return; }