Commit 567d1e6e authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

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.
parent 5c0a8a14
......@@ -127,13 +127,12 @@ static void add_listview_item(HWND listview, const WCHAR *text, void *associatio
{
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 dialog, HWND listview)
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 dialog)
LVITEMW item;
item.iItem = selection;
item.iSubItem = 0;
item.mask = LVIF_PARAM;
WINE_TRACE("selection=%d, section=%s\n", selection, section);
......
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