winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
910 discussions
Start a n
N
ew thread
Nikolay Sivov : comctl32/listview: Fix find using partial string logic.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: b7b7b7113ed74092b5b30cb0e3eb296757299b8c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b7b7b7113ed74092b5b30cb0e…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sat Nov 21 22:19:54 2009 +0300 comctl32/listview: Fix find using partial string logic. --- dlls/comctl32/listview.c | 7 ++++--- dlls/comctl32/tests/listview.c | 39 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 24b90bc..448590a 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -5949,12 +5949,13 @@ again: else continue; } - + if (lvItem.mask & LVIF_TEXT) { if (lpFindInfo->flags & LVFI_PARTIAL) { - if (strstrW(lvItem.pszText, lpFindInfo->psz) == NULL) continue; + WCHAR *p = strstrW(lvItem.pszText, lpFindInfo->psz); + if (!p || p != lvItem.pszText) continue; } else { @@ -5963,7 +5964,7 @@ again: } if (!bNearest) return nItem; - + /* This is very inefficient. To do a good job here, * we need a sorted array of (x,y) item positions */ LISTVIEW_GetItemOrigin(infoPtr, nItem, &Position); diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 7bf2b03..55e7d96 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -4023,7 +4023,7 @@ static void test_LVS_EX_TRANSPARENTBKGND(void) DestroyWindow(hwnd); } -static void test_ApproximateViewRect(void) +static void test_approximate_viewrect(void) { HWND hwnd; DWORD ret; @@ -4097,6 +4097,40 @@ static void test_ApproximateViewRect(void) DestroyWindow(hwnd); } +static void test_finditem(void) +{ + LVFINDINFOA fi; + static char f[5]; + HWND hwnd; + DWORD r; + + hwnd = create_listview_control(0); + insert_item(hwnd, 0); + + memset(&fi, 0, sizeof(fi)); + + /* full string search, inserted text was "foo" */ + strcpy(f, "foo"); + fi.flags = LVFI_STRING; + fi.psz = f; + r = SendMessage(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi); + expect(0, r); + /* partial string search, inserted text was "foo" */ + strcpy(f, "fo"); + fi.flags = LVFI_STRING | LVFI_PARTIAL; + fi.psz = f; + r = SendMessage(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi); + expect(0, r); + /* partial string search, part after start char */ + strcpy(f, "oo"); + fi.flags = LVFI_STRING | LVFI_PARTIAL; + fi.psz = f; + r = SendMessage(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi); + expect(-1, r); + + DestroyWindow(hwnd); +} + START_TEST(listview) { HMODULE hComctl32; @@ -4154,7 +4188,8 @@ START_TEST(listview) test_indentation(); test_getitemspacing(); test_getcolumnwidth(); - test_ApproximateViewRect(); + test_approximate_viewrect(); + test_finditem(); if (!load_v6_module(&ctx_cookie, &hCtx)) {
1
0
0
0
Nikolay Sivov : comctl32/listview: Add LVSIL_GROUPHEADER definition.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: 90c4abe86fe48c666c72f646558321e254f41c2d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=90c4abe86fe48c666c72f6465…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sat Nov 21 17:09:58 2009 +0300 comctl32/listview: Add LVSIL_GROUPHEADER definition. --- dlls/comctl32/listview.c | 9 +++++++-- include/commctrl.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 4d2edd0..24b90bc 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -6205,8 +6205,13 @@ static HIMAGELIST LISTVIEW_GetImageList(const LISTVIEW_INFO *infoPtr, INT nImage switch (nImageList) { case LVSIL_NORMAL: return infoPtr->himlNormal; - case LVSIL_SMALL: return infoPtr->himlSmall; - case LVSIL_STATE: return infoPtr->himlState; + case LVSIL_SMALL: return infoPtr->himlSmall; + case LVSIL_STATE: return infoPtr->himlState; + case LVSIL_GROUPHEADER: + FIXME("LVSIL_GROUPHEADER not supported\n"); + break; + default: + WARN("got unknown imagelist index - %d\n", nImageList); } return NULL; } diff --git a/include/commctrl.h b/include/commctrl.h index 23a296b..4360925 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -3015,6 +3015,7 @@ static const WCHAR WC_LISTVIEWW[] = { 'S','y','s', #define LVSIL_NORMAL 0 #define LVSIL_SMALL 1 #define LVSIL_STATE 2 +#define LVSIL_GROUPHEADER 3 /* following 2 flags only for LVS_OWNERDATA listviews */ /* and only in report or list mode */
1
0
0
0
Nikolay Sivov : comctl32/listview: Group control data members, there' s no reasonable structure here.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: 79c55c5dd181040cdfd99b833b6452d5d7a8b37d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79c55c5dd181040cdfd99b833…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sat Nov 21 16:56:08 2009 +0300 comctl32/listview: Group control data members, there's no reasonable structure here. --- dlls/comctl32/listview.c | 142 ++++++++++++++++++++++++++++----------------- 1 files changed, 88 insertions(+), 54 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index cd924de..4d2edd0 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -237,86 +237,120 @@ typedef struct tagDELAYED_ITEM_EDIT typedef struct tagLISTVIEW_INFO { + /* control window */ HWND hwndSelf; - HBRUSH hBkBrush; - COLORREF clrBk; - COLORREF clrText; - COLORREF clrTextBk; - HIMAGELIST himlNormal; - HIMAGELIST himlSmall; - HIMAGELIST himlState; - BOOL bLButtonDown; - BOOL bRButtonDown; - BOOL bDragging; - BOOL bMarqueeSelect; /* marquee selection/highlight underway */ - BOOL bScrolling; - RECT marqueeRect; /* absolute coordinates of marquee selection */ - RECT marqueeDrawRect; /* relative coordinates for drawing marquee */ - POINT marqueeOrigin; /* absolute coordinates of marquee click origin */ - POINT ptClickPos; /* point where the user clicked */ - BOOL bNoItemMetrics; /* flags if item metrics are not yet computed */ - INT nItemHeight; - INT nItemWidth; - RANGES selectionRanges; - INT nSelectionMark; - INT nHotItem; - SHORT notifyFormat; - HWND hwndNotify; RECT rcList; /* This rectangle is really the window * client rectangle possibly reduced by the * horizontal scroll bar and/or header - see * LISTVIEW_UpdateSize. This rectangle offset * by the LISTVIEW_GetOrigin value is in * client coordinates */ - SIZE iconSize; - SIZE iconSpacing; - SIZE iconStateSize; - UINT uCallbackMask; - HWND hwndHeader; - HCURSOR hHotCursor; - HFONT hDefaultFont; - HFONT hFont; - INT ntmHeight; /* Some cached metrics of the font used */ - INT ntmMaxCharWidth; /* by the listview to draw items */ - INT nEllipsisWidth; - BOOL bRedraw; /* Turns on/off repaints & invalidations */ - BOOL bAutoarrange; /* Autoarrange flag when NOT in LVS_AUTOARRANGE */ - BOOL bFocus; + + /* notification window */ + SHORT notifyFormat; + HWND hwndNotify; BOOL bDoChangeNotify; /* send change notification messages? */ - INT nFocusedItem; - RECT rcFocus; - DWORD dwStyle; /* the cached window GWL_STYLE */ - DWORD dwLvExStyle; /* extended listview style */ - DWORD uView; /* current view available through LVM_[G,S]ETVIEW */ + UINT uCallbackMask; + + /* tooltips */ + HWND hwndToolTip; + + /* items */ INT nItemCount; /* the number of items in the list */ HDPA hdpaItems; /* array ITEM_INFO pointers */ HDPA hdpaItemIds; /* array of ITEM_ID pointers */ HDPA hdpaPosX; /* maintains the (X, Y) coordinates of the */ HDPA hdpaPosY; /* items in LVS_ICON, and LVS_SMALLICON modes */ + RANGES selectionRanges; + INT nSelectionMark; /* item to start next multiselection from */ + INT nHotItem; + BOOL bAutoarrange; /* Autoarrange flag when NOT in LVS_AUTOARRANGE */ + + /* columns */ HDPA hdpaColumns; /* array of COLUMN_INFO pointers */ BOOL colRectsDirty; /* trigger column rectangles requery from header */ - POINT currIconPos; /* this is the position next icon will be placed */ - PFNLVCOMPARE pfnCompare; + + /* item metrics */ + BOOL bNoItemMetrics; /* flags if item metrics are not yet computed */ + INT nItemHeight; + INT nItemWidth; + + /* sorting */ + PFNLVCOMPARE pfnCompare; /* sorting callback pointer */ LPARAM lParamSort; + + /* style */ + DWORD dwStyle; /* the cached window GWL_STYLE */ + DWORD dwLvExStyle; /* extended listview style */ + DWORD uView; /* current view available through LVM_[G,S]ETVIEW */ + + /* edit item */ HWND hwndEdit; WNDPROC EditWndProc; INT nEditLabelItem; - INT nLButtonDownItem; /* tracks item to reset multiselection on WM_LBUTTONUP */ - DWORD dwHoverTime; - HWND hwndToolTip; + DELAYED_ITEM_EDIT itemEdit; /* Pointer to this structure will be the timer ID */ + + /* icons */ + HIMAGELIST himlNormal; + HIMAGELIST himlSmall; + HIMAGELIST himlState; + SIZE iconSize; + SIZE iconSpacing; + SIZE iconStateSize; + POINT currIconPos; /* this is the position next icon will be placed */ + + /* header */ + HWND hwndHeader; + INT xTrackLine; /* The x coefficient of the track line or -1 if none */ - DWORD cditemmode; /* Keep the custom draw flags for an item/row */ + /* marquee selection */ + BOOL bMarqueeSelect; /* marquee selection/highlight underway */ + BOOL bScrolling; + RECT marqueeRect; /* absolute coordinates of marquee selection */ + RECT marqueeDrawRect; /* relative coordinates for drawing marquee */ + POINT marqueeOrigin; /* absolute coordinates of marquee click origin */ + + /* focus drawing */ + BOOL bFocus; /* control has focus */ + INT nFocusedItem; + RECT rcFocus; /* focus bounds */ + /* colors */ + HBRUSH hBkBrush; + COLORREF clrBk; + COLORREF clrText; + COLORREF clrTextBk; + + /* font */ + HFONT hDefaultFont; + HFONT hFont; + INT ntmHeight; /* Some cached metrics of the font used */ + INT ntmMaxCharWidth; /* by the listview to draw items */ + INT nEllipsisWidth; + + /* mouse operation */ + BOOL bLButtonDown; + BOOL bRButtonDown; + BOOL bDragging; + POINT ptClickPos; /* point where the user clicked */ + INT nLButtonDownItem; /* tracks item to reset multiselection on WM_LBUTTONUP */ + DWORD dwHoverTime; + HCURSOR hHotCursor; + + /* keyboard operation */ DWORD lastKeyPressTimestamp; WPARAM charCode; INT nSearchParamLength; WCHAR szSearchParam[ MAX_PATH ]; - BOOL bIsDrawing; - INT nMeasureItemHeight; - INT xTrackLine; /* The x coefficient of the track line or -1 if none */ - DELAYED_ITEM_EDIT itemEdit; /* Pointer to this structure will be the timer ID */ - DWORD iVersion; /* CCM_[G,S]ETVERSION */ + /* painting */ + DWORD cditemmode; /* Keep the custom draw flags for an item/row */ + BOOL bIsDrawing; /* Drawing in progress */ + INT nMeasureItemHeight; /* WM_MEASUREITEM result */ + BOOL bRedraw; /* WM_SETREDRAW switch */ + + /* misc */ + DWORD iVersion; /* CCM_[G,S]ETVERSION */ } LISTVIEW_INFO; /*
1
0
0
0
Nikolay Sivov : comctl32/listview: Send LVN_ENDLABELEDIT in any case, but with null text if it's the same.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: 899a53eda508b71a5f8366f95a8c7640f0d9dc45 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=899a53eda508b71a5f8366f95…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sat Nov 21 14:37:01 2009 +0300 comctl32/listview: Send LVN_ENDLABELEDIT in any case, but with null text if it's the same. --- dlls/comctl32/listview.c | 14 +++++++------- dlls/comctl32/tests/listview.c | 21 ++++++++++++++++++++- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 40804b5..cd924de 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -5585,16 +5585,11 @@ static BOOL LISTVIEW_EndEditLabelT(LISTVIEW_INFO *infoPtr, BOOL storeText, BOOL bSame = (lstrcmpW(dispInfo.item.pszText, tmp) == 0); textfreeT(tmp, FALSE); } - if (bSame) - { - res = TRUE; - goto cleanup; - } /* add the text from the edit in */ dispInfo.item.mask |= LVIF_TEXT; - dispInfo.item.pszText = pszText; - dispInfo.item.cchTextMax = textlenT(pszText, isW); + dispInfo.item.pszText = bSame ? NULL : pszText; + dispInfo.item.cchTextMax = bSame ? 0 : textlenT(pszText, isW); /* Do we need to update the Item Text */ if (!notify_dispinfoT(infoPtr, LVN_ENDLABELEDITW, &dispInfo, isW)) @@ -5608,6 +5603,11 @@ static BOOL LISTVIEW_EndEditLabelT(LISTVIEW_INFO *infoPtr, BOOL storeText, BOOL goto cleanup; } if (!pszText) return TRUE; + if (bSame) + { + res = TRUE; + goto cleanup; + } if (!(infoPtr->dwStyle & LVS_OWNERDATA)) { diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 99c25da..7bf2b03 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -272,7 +272,7 @@ static const struct message lvs_ex_transparentbkgnd_seq[] = { }; static const struct message edit_end_nochange[] = { - { WM_NOTIFY, sent|id, 0, 0, LVN_ENDLABELEDITA }, /* todo */ + { WM_NOTIFY, sent|id, 0, 0, LVN_ENDLABELEDITA }, { WM_NOTIFY, sent|id, 0, 0, NM_CUSTOMDRAW }, /* todo */ { WM_NOTIFY, sent|id, 0, 0, NM_SETFOCUS }, { 0 } @@ -321,8 +321,12 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP return blockEdit; case LVN_ENDLABELEDIT: + { /* always accept new item text */ + NMLVDISPINFO *di = (NMLVDISPINFO*)lParam; + trace("LVN_ENDLABELEDIT: text=%s\n", di->item.pszText); return TRUE; + } case LVN_BEGINSCROLL: case LVN_ENDSCROLL: { @@ -3426,9 +3430,24 @@ static void test_editbox(void) r = SendMessage(hwnd, LVM_GETITEMTEXTA, 0, (LPARAM)&item); expect(lstrlen(item.pszText), r); ok(strcmp(buffer, testitem1A) == 0, "Expected item text to change\n"); + ok(!IsWindow(hwndedit), "Expected Edit window to be freed\n"); /* end edit without saving */ + SetFocus(hwnd); + hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); + flush_sequences(sequences, NUM_MSG_SEQUENCES); r = SendMessage(hwndedit, WM_KEYDOWN, VK_ESCAPE, 0); expect(0, r); + ok_sequence(sequences, PARENT_SEQ_INDEX, edit_end_nochange, + "edit box - end edit, no change, escape", TRUE); + /* end edit with saving */ + SetFocus(hwnd); + hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); + flush_sequences(sequences, NUM_MSG_SEQUENCES); + r = SendMessage(hwndedit, WM_KEYDOWN, VK_RETURN, 0); + expect(0, r); + ok_sequence(sequences, PARENT_SEQ_INDEX, edit_end_nochange, + "edit box - end edit, no change, return", TRUE); + memset(&item, 0, sizeof(item)); item.pszText = buffer; item.cchTextMax = 10;
1
0
0
0
Nikolay Sivov : comctl32/listview: Don't forward WM_COMMAND (EN_KILLFOCUS) from Edit to parent window.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: f5f076382770b6dd5d39b0c356d4f8a797c361b7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f5f076382770b6dd5d39b0c35…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sat Nov 21 12:23:05 2009 +0300 comctl32/listview: Don't forward WM_COMMAND (EN_KILLFOCUS) from Edit to parent window. --- dlls/comctl32/listview.c | 1 + dlls/comctl32/tests/listview.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 594db6e..40804b5 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -11409,6 +11409,7 @@ static LRESULT LISTVIEW_Command(LISTVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lP case EN_KILLFOCUS: { LISTVIEW_CancelEditLabel(infoPtr); + break; } default: diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 6b3ebff..99c25da 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -271,6 +271,13 @@ static const struct message lvs_ex_transparentbkgnd_seq[] = { { 0 } }; +static const struct message edit_end_nochange[] = { + { WM_NOTIFY, sent|id, 0, 0, LVN_ENDLABELEDITA }, /* todo */ + { WM_NOTIFY, sent|id, 0, 0, NM_CUSTOMDRAW }, /* todo */ + { WM_NOTIFY, sent|id, 0, 0, NM_SETFOCUS }, + { 0 } +}; + static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { static LONG defwndproc_counter = 0; @@ -3473,6 +3480,16 @@ static void test_editbox(void) ok_sequence(sequences, EDITBOX_SEQ_INDEX, editbox_create_pos, "edit box create - sizing", FALSE); + /* WM_COMMAND with EN_KILLFOCUS isn't forwared to parent */ + SetFocus(hwnd); + hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); + ok(IsWindow(hwndedit), "Expected Edit window to be created\n"); + flush_sequences(sequences, NUM_MSG_SEQUENCES); + r = SendMessage(hwnd, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)hwndedit); + expect(0, r); + ok_sequence(sequences, PARENT_SEQ_INDEX, edit_end_nochange, + "edit box WM_COMMAND (EN_KILLFOCUS)", TRUE); + DestroyWindow(hwnd); }
1
0
0
0
Nikolay Sivov : comctl32/listview: Do nothing on LVM_CANCELEDITLABEL if there's no label.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: c39268967d07f41b67a47fcea003a59a98a6dd41 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c39268967d07f41b67a47fcea…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sat Nov 21 11:59:33 2009 +0300 comctl32/listview: Do nothing on LVM_CANCELEDITLABEL if there's no label. --- dlls/comctl32/listview.c | 11 +++++++---- dlls/comctl32/tests/listview.c | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index d59a984..594db6e 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -5081,11 +5081,14 @@ static DWORD LISTVIEW_ApproximateViewRect(const LISTVIEW_INFO *infoPtr, INT nIte */ static LRESULT LISTVIEW_CancelEditLabel(LISTVIEW_INFO *infoPtr) { - /* handle value will be lost after LISTVIEW_EndEditLabelT */ - HWND edit = infoPtr->hwndEdit; + if (infoPtr->hwndEdit) + { + /* handle value will be lost after LISTVIEW_EndEditLabelT */ + HWND edit = infoPtr->hwndEdit; - LISTVIEW_EndEditLabelT(infoPtr, TRUE, IsWindowUnicode(infoPtr->hwndEdit)); - SendMessageW(edit, WM_CLOSE, 0, 0); + LISTVIEW_EndEditLabelT(infoPtr, TRUE, IsWindowUnicode(infoPtr->hwndEdit)); + SendMessageW(edit, WM_CLOSE, 0, 0); + } return TRUE; } diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 44c5eb2..6b3ebff 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -3720,8 +3720,11 @@ static void test_canceleditlabel(void) insert_item(hwnd, 0); /* try without edit created */ + flush_sequences(sequences, NUM_MSG_SEQUENCES); ret = SendMessage(hwnd, LVM_CANCELEDITLABEL, 0, 0); expect(TRUE, ret); + ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, + "cancel edit label without edit", FALSE); /* cancel without data change */ SetFocus(hwnd);
1
0
0
0
André Hentschel : winemaker: Replace whitespaces in projectnames.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: 5f059edcdf96277ce0b17416d4020c052696c766 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5f059edcdf96277ce0b17416d…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sat Nov 21 18:13:44 2009 +0100 winemaker: Replace whitespaces in projectnames. --- tools/winemaker | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/winemaker b/tools/winemaker index e077db2..4cd46ff 100755 --- a/tools/winemaker +++ b/tools/winemaker @@ -582,6 +582,7 @@ sub source_scan_project_file($$$) if (/^\# Microsoft Developer Studio Project File - Name=\"([^\"]+)/) { $prj_name="$1"; + $prj_name=~s/\s+/_/g; #print $prj_name; next; } elsif (/^# TARGTYPE/) { @@ -852,6 +853,7 @@ sub source_scan_project_file($$$) foreach my $vc_project_attr ($vc_project->attributes) { if ($vc_project_attr->getName eq "Name") { $prj_name=$vc_project_attr->getValue; + $prj_name=~s/\s+/_/g; last; } }
1
0
0
0
Eric Pouech : dbghelp: Correctly compute offsets in line number information .
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: ed786fbae495d59473508f41f0ef902968b0e598 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ed786fbae495d59473508f41f…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat Nov 21 16:35:01 2009 +0100 dbghelp: Correctly compute offsets in line number information. --- dlls/dbghelp/msc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 34de916..b314602 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -1410,7 +1410,7 @@ static void codeview_snarf_linetab2(const struct msc_debug_info* msc_dbg, const { symt_add_func_line(msc_dbg->module, func, source, lines_blk->l[i].lineno ^ 0x80000000, - lines_blk->l[i].offset - lines_blk->start); + lines_blk->l[i].offset); } break; case LT2_FILES_BLOCK: /* skip */
1
0
0
0
Eric Pouech : dbghelp: Revisit array len description for debug format parsers.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: 9d80b19e8390ec52d8f45a7636e589f4f47064fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9d80b19e8390ec52d8f45a763…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat Nov 21 16:35:10 2009 +0100 dbghelp: Revisit array len description for debug format parsers. One can now pass -1 as array len so that its size will be computed later on (useful for dealing with forward declarations where size is not known at array definition). --- dlls/dbghelp/dbghelp_private.h | 2 +- dlls/dbghelp/msc.c | 9 +-------- dlls/dbghelp/type.c | 21 +++++++++++++++++---- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index 0a01409..4faae4d 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -246,7 +246,7 @@ struct symt_array { struct symt symt; int start; - int end; + int end; /* end index if > 0, or -array_len (in bytes) if < 0 */ struct symt* base_type; struct symt* index_type; }; diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index d31dd71..34de916 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -586,15 +586,8 @@ static struct symt* codeview_add_type_array(struct codeview_type_parse* ctp, { struct symt* elem = codeview_fetch_type(ctp, elemtype, FALSE); struct symt* index = codeview_fetch_type(ctp, indextype, FALSE); - DWORD arr_max = 0; - if (elem) - { - DWORD64 elem_size; - symt_get_info(elem, TI_GET_LENGTH, &elem_size); - if (elem_size) arr_max = arr_len / (DWORD)elem_size; - } - return &symt_new_array(ctp->module, 0, arr_max, elem, index)->symt; + return &symt_new_array(ctp->module, 0, -arr_len, elem, index)->symt; } static int codeview_add_type_enum_field_list(struct module* module, diff --git a/dlls/dbghelp/type.c b/dlls/dbghelp/type.c index 947eb49..3955815 100644 --- a/dlls/dbghelp/type.c +++ b/dlls/dbghelp/type.c @@ -304,6 +304,21 @@ struct symt_array* symt_new_array(struct module* module, int min, int max, return sym; } +static inline DWORD symt_array_count(const struct symt_array* array) +{ + if (array->end < 0) + { + DWORD64 elem_size; + /* One could want to also set the array->end field in array, but we won't do it + * as long as all the get_type() helpers use const objects + */ + if (symt_get_info(array->base_type, TI_GET_LENGTH, &elem_size) && elem_size) + return -array->end / (DWORD)elem_size; + return 0; + } + return array->end - array->start + 1; +} + struct symt_function_signature* symt_new_function_signature(struct module* module, struct symt* ret_type, enum CV_call_e call_conv) @@ -597,8 +612,7 @@ BOOL symt_get_info(const struct symt* type, IMAGEHLP_SYMBOL_TYPE_INFO req, switch (type->tag) { case SymTagArrayType: - X(DWORD) = ((const struct symt_array*)type)->end - - ((const struct symt_array*)type)->start + 1; + X(DWORD) = symt_array_count((const struct symt_array*)type); break; case SymTagFunctionType: /* this seems to be wrong for (future) C++ methods, where 'this' parameter @@ -643,8 +657,7 @@ BOOL symt_get_info(const struct symt* type, IMAGEHLP_SYMBOL_TYPE_INFO req, if (!symt_get_info(((const struct symt_array*)type)->base_type, TI_GET_LENGTH, pInfo)) return FALSE; - X(DWORD64) *= ((const struct symt_array*)type)->end - - ((const struct symt_array*)type)->start + 1; + X(DWORD64) *= symt_array_count((const struct symt_array*)type); break; case SymTagPublicSymbol: X(DWORD64) = ((const struct symt_public*)type)->size;
1
0
0
0
Hans Leidekker : usp10: Add a stub implementation of ScriptJustify.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: d974a4b29fcca4220da472511c5d632a595e620d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d974a4b29fcca4220da472511…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Sat Nov 21 13:08:08 2009 +0100 usp10: Add a stub implementation of ScriptJustify. --- dlls/usp10/usp10.c | 11 +++++++++++ dlls/usp10/usp10.spec | 2 +- 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 16f575b..aefe6cc 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1828,3 +1828,14 @@ HRESULT WINAPI ScriptApplyLogicalWidth(const int *dx, int num_chars, int num_gly for (i = 0; i < num_chars; i++) justify[i] = advance[i]; return S_OK; } + +HRESULT WINAPI ScriptJustify(const SCRIPT_VISATTR *sva, const int *advance, + int num_glyphs, int dx, int min_kashida, int *justify) +{ + int i; + + FIXME("(%p, %p, %d, %d, %d, %p)\n", sva, advance, num_glyphs, dx, min_kashida, justify); + + for (i = 0; i < num_glyphs; i++) justify[i] = advance[i]; + return S_OK; +} diff --git a/dlls/usp10/usp10.spec b/dlls/usp10/usp10.spec index 54137f2..5e35870 100644 --- a/dlls/usp10/usp10.spec +++ b/dlls/usp10/usp10.spec @@ -12,7 +12,7 @@ @ stdcall ScriptGetProperties(ptr long) @ stdcall ScriptIsComplex(wstr long long) @ stdcall ScriptItemize(wstr long long ptr ptr ptr ptr) -@ stub ScriptJustify +@ stdcall ScriptJustify(ptr ptr long long long ptr) @ stdcall ScriptLayout(long ptr ptr ptr) @ stdcall ScriptPlace(ptr ptr ptr long ptr ptr ptr ptr ptr) @ stdcall ScriptRecordDigitSubstitution(ptr ptr)
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
91
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Results per page:
10
25
50
100
200