Francois Gouget : winecfg: Remove ZeroMemory() calls and instead set iSubItem = 0 manually.
Module: wine Branch: master Commit: 567d1e6e29c95595fc8040004a2f52f3b8ddead3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=567d1e6e29c95595fc8040004a... Author: Francois Gouget <fgouget(a)free.fr> Date: Thu Oct 5 11:02:05 2006 +0200 winecfg: Remove ZeroMemory() calls and instead set iSubItem = 0 manually. Fix on_selection_change() and on_remove_app_click() so they do set iSubItem = 0. --- programs/winecfg/appdefaults.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/programs/winecfg/appdefaults.c b/programs/winecfg/appdefaults.c index e71055f..91d80b9 100644 --- a/programs/winecfg/appdefaults.c +++ b/programs/winecfg/appdefaults.c @@ -127,13 +127,12 @@ static void add_listview_item(HWND listv { LVITEMW item; - ZeroMemory(&item, sizeof(LVITEM)); - item.mask = LVIF_TEXT | LVIF_PARAM; item.pszText = (WCHAR*) text; item.cchTextMax = lstrlenW(text); item.lParam = (LPARAM) association; item.iItem = ListView_GetItemCount(listview); + item.iSubItem = 0; SendMessage(listview, LVM_INSERTITEMW, 0, (LPARAM) &item); } @@ -179,10 +178,9 @@ static void init_appsheet(HWND dialog) { LVITEM item; - ZeroMemory(&item, sizeof(item)); - - item.mask = LVIF_STATE; item.iItem = 0; + item.iSubItem = 0; + item.mask = LVIF_STATE; item.state = LVIS_SELECTED | LVIS_FOCUSED; item.stateMask = LVIS_SELECTED | LVIS_FOCUSED; @@ -215,6 +213,7 @@ static void on_selection_change(HWND dia WINE_TRACE("()\n"); item.iItem = get_listview_selection(listview); + item.iSubItem = 0; item.mask = LVIF_PARAM; WINE_TRACE("item.iItem=%d\n", item.iItem); @@ -314,6 +313,7 @@ static void on_remove_app_click(HWND dia LVITEMW item; item.iItem = selection; + item.iSubItem = 0; item.mask = LVIF_PARAM; WINE_TRACE("selection=%d, section=%s\n", selection, section);
participants (1)
-
Alexandre Julliard