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
March 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
2 participants
834 discussions
Start a n
N
ew thread
Nikolay Sivov : comctl32/listview: Some tests for LVM_GETSUBITEMRECT.
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: bdd1206ca5ea4e73e73df3f876dd07c37f94f255 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bdd1206ca5ea4e73e73df3f87…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Mar 23 16:12:51 2009 -0400 comctl32/listview: Some tests for LVM_GETSUBITEMRECT. --- dlls/comctl32/tests/listview.c | 57 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 57 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 4562f2e..813d9bb 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -1222,6 +1222,62 @@ static void test_multiselect(void) DestroyWindow(hwnd); } +static void test_subitem_rect(void) +{ + HWND hwnd; + DWORD r; + LVCOLUMN col; + RECT rect; + + /* test LVM_GETSUBITEMRECT for header */ + hwnd = create_listview_control(); + ok(hwnd != NULL, "failed to create a listview window\n"); + /* add some columns */ + memset(&col, 0, sizeof(LVCOLUMN)); + col.mask = LVCF_WIDTH; + col.cx = 100; + r = -1; + r = SendMessage(hwnd, LVM_INSERTCOLUMN, 0, (LPARAM)&col); + expect(0, r); + col.cx = 150; + r = -1; + r = SendMessage(hwnd, LVM_INSERTCOLUMN, 1, (LPARAM)&col); + expect(1, r); + col.cx = 200; + r = -1; + r = SendMessage(hwnd, LVM_INSERTCOLUMN, 2, (LPARAM)&col); + expect(2, r); + /* item = -1 means header, subitem index is 1 based */ + rect.left = LVIR_BOUNDS; + rect.top = 0; + rect.right = rect.bottom = 0; + r = SendMessage(hwnd, LVM_GETSUBITEMRECT, -1, (LPARAM)&rect); + expect(0, r); + + rect.left = LVIR_BOUNDS; + rect.top = 1; + rect.right = rect.bottom = 0; + r = SendMessage(hwnd, LVM_GETSUBITEMRECT, -1, (LPARAM)&rect); +todo_wine{ + ok(r != 0, "Expected not-null LRESULT\n"); + expect(100, rect.left); + expect(250, rect.right); + expect(3, rect.top); +} + rect.left = LVIR_BOUNDS; + rect.top = 2; + rect.right = rect.bottom = 0; + r = SendMessage(hwnd, LVM_GETSUBITEMRECT, -1, (LPARAM)&rect); +todo_wine{ + ok(r != 0, "Expected not-null LRESULT\n"); + expect(250, rect.left); + expect(450, rect.right); + expect(3, rect.top); +} + + DestroyWindow(hwnd); +} + START_TEST(listview) { HMODULE hComctl32; @@ -1259,4 +1315,5 @@ START_TEST(listview) test_columns(); test_getorigin(); test_multiselect(); + test_subitem_rect(); }
1
0
0
0
Nikolay Sivov : comctl32/ipaddress: Store current IP address text as a window text for IP Address control.
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: 85c03a5a3160814ac21d76b624c98f9b7a935e95 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85c03a5a3160814ac21d76b62…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Mar 23 16:08:02 2009 -0400 comctl32/ipaddress: Store current IP address text as a window text for IP Address control. --- dlls/comctl32/ipaddress.c | 26 +++++++++++ dlls/comctl32/tests/Makefile.in | 1 + dlls/comctl32/tests/ipaddress.c | 89 +++++++++++++++++++++++++++++++++++++++ include/commctrl.h | 2 +- 4 files changed, 117 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c index 15d39f5..e5631a2 100644 --- a/dlls/comctl32/ipaddress.c +++ b/dlls/comctl32/ipaddress.c @@ -77,6 +77,29 @@ static const WCHAR IP_SUBCLASS_PROP[] = static LRESULT CALLBACK IPADDRESS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); +static void IPADDRESS_UpdateText (const IPADDRESS_INFO *infoPtr) +{ + static const WCHAR zero[2] = {'0', 0}; + static const WCHAR dot[2] = {'.', 0}; + WCHAR field[4]; + WCHAR ip[16]; + INT i; + + ip[0] = 0; + + for (i = 0; i < 4; i++) { + if (GetWindowTextW (infoPtr->Part[i].EditHwnd, field, 4)) + strcatW(ip, field); + else + /* empty edit treated as zero */ + strcatW(ip, zero); + if (i != 3) + strcatW(ip, dot); + } + + SetWindowTextW(infoPtr->Self, ip); +} + static LRESULT IPADDRESS_Notify (const IPADDRESS_INFO *infoPtr, UINT command) { HWND hwnd = infoPtr->Self; @@ -219,6 +242,8 @@ static LRESULT IPADDRESS_Create (HWND hwnd, const CREATESTRUCTA *lpCreate) EnableWindow(part->EditHwnd, infoPtr->Enabled); } + IPADDRESS_UpdateText (infoPtr); + return 0; } @@ -561,6 +586,7 @@ IPADDRESS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_COMMAND: switch(wParam >> 16) { case EN_CHANGE: + IPADDRESS_UpdateText(infoPtr); IPADDRESS_Notify(infoPtr, EN_CHANGE); break; case EN_KILLFOCUS: diff --git a/dlls/comctl32/tests/Makefile.in b/dlls/comctl32/tests/Makefile.in index 45bd219..6fe2000 100644 --- a/dlls/comctl32/tests/Makefile.in +++ b/dlls/comctl32/tests/Makefile.in @@ -11,6 +11,7 @@ CTESTS = \ dpa.c \ header.c \ imagelist.c \ + ipaddress.c \ listview.c \ misc.c \ monthcal.c \ diff --git a/dlls/comctl32/tests/ipaddress.c b/dlls/comctl32/tests/ipaddress.c new file mode 100644 index 0000000..32ecdc1 --- /dev/null +++ b/dlls/comctl32/tests/ipaddress.c @@ -0,0 +1,89 @@ +/* Unit test suite for IP Address control. + * + * Copyright 2009 Nikolay Sivov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + + +#include <windows.h> +#include <commctrl.h> +#include <assert.h> + +#include "wine/test.h" + +#define expect(expected, got) ok(expected == got, "expected %d, got %d\n", expected,got) + +static HWND create_ipaddress_control (void) +{ + HWND handle; + + handle = CreateWindowEx(0, WC_IPADDRESS, NULL, + WS_BORDER|WS_VISIBLE, 0, 0, 0, 0, + NULL, NULL, NULL, NULL); + assert(handle); + + return handle; +} + +static void test_get_set_text(void) +{ + HWND hwnd; + CHAR ip[16]; + INT r; + + hwnd = create_ipaddress_control(); + + /* check text just after creation */ + r = GetWindowText(hwnd, ip, sizeof(ip)/sizeof(CHAR)); + expect(7, r); + ok(strcmp(ip, "0.0.0.0") == 0, "Expected null IP address, got %s\n", ip); + + SendMessage(hwnd, IPM_SETADDRESS, 0, MAKEIPADDRESS(127, 0, 0, 1)); + r = GetWindowText(hwnd, ip, sizeof(ip)/sizeof(CHAR)); + expect(9, r); + ok(strcmp(ip, "127.0.0.1") == 0, "Expected 127.0.0.1, got %s\n", ip); + + DestroyWindow(hwnd); +} + +static int init(void) +{ + HMODULE hComctl32; + BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); + INITCOMMONCONTROLSEX iccex; + + hComctl32 = GetModuleHandleA("comctl32.dll"); + pInitCommonControlsEx = (void*)GetProcAddress(hComctl32, "InitCommonControlsEx"); + if (!pInitCommonControlsEx) + { + skip("InitCommonControlsEx() is missing. Skipping the tests\n"); + return 0; + } + + iccex.dwSize = sizeof(iccex); + iccex.dwICC = ICC_USEREX_CLASSES; + pInitCommonControlsEx(&iccex); + + return 1; +} + +START_TEST(ipaddress) +{ + if (!init()) + return; + + test_get_set_text(); +} diff --git a/include/commctrl.h b/include/commctrl.h index b055bee..bebdb27 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -4459,7 +4459,7 @@ typedef struct tagNMIPADDRESS #define MAKEIPRANGE(low,high) \ ((LPARAM)(WORD)(((BYTE)(high)<<8)+(BYTE)(low))) #define MAKEIPADDRESS(b1,b2,b3,b4) \ - ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<16)+((DWORD)(b3)<<8)+((DWORD)(b4)))) + ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4)))) #define FIRST_IPADDRESS(x) (((x)>>24)&0xff) #define SECOND_IPADDRESS(x) (((x)>>16)&0xff)
1
0
0
0
Nikolay Sivov : comctl32/trackbar: Fix reverting to default value for TBM_SETPAGESIZE with lParam = -1.
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: b7d7d589782d49c0285b278d0386162429a610be URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b7d7d589782d49c0285b278d0…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Mar 23 16:05:49 2009 -0400 comctl32/trackbar: Fix reverting to default value for TBM_SETPAGESIZE with lParam = -1. --- dlls/comctl32/tests/trackbar.c | 20 +++++++++++++++++--- dlls/comctl32/trackbar.c | 9 +++++++-- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/dlls/comctl32/tests/trackbar.c b/dlls/comctl32/tests/trackbar.c index d57e28d..e2a3c76 100644 --- a/dlls/comctl32/tests/trackbar.c +++ b/dlls/comctl32/tests/trackbar.c @@ -588,12 +588,26 @@ static void test_page_size(HWND hWndTrackbar){ /* test TBM_GETPAGESIZE */ r = SendMessage(hWndTrackbar, TBM_GETPAGESIZE, 0,0); - todo_wine{ - expect(20, r); - } + expect(20, r); ok_sequence(sequences, TRACKBAR_SEQ_INDEX, page_size_test_seq, "page size test sequence", FALSE); ok_sequence(sequences, PARENT_SEQ_INDEX, parent_empty_test_seq, "parent page size test sequence", FALSE); + + /* check for zero page size */ + r = SendMessage(hWndTrackbar, TBM_SETPAGESIZE, 0, 0); + expect(20, r); + r = SendMessage(hWndTrackbar, TBM_GETPAGESIZE, 0, 0); + expect(0, r); + /* revert to default */ + r = SendMessage(hWndTrackbar, TBM_SETPAGESIZE, 0, -1); + expect(0, r); + r = SendMessage(hWndTrackbar, TBM_GETPAGESIZE, 0, 0); + expect(20, r); + /* < -1 */ + r = SendMessage(hWndTrackbar, TBM_SETPAGESIZE, 0, -2); + expect(20, r); + r = SendMessage(hWndTrackbar, TBM_GETPAGESIZE, 0, 0); + expect(-2, r); } static void test_position(HWND hWndTrackbar){ diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c index 3424333..849ebcd 100644 --- a/dlls/comctl32/trackbar.c +++ b/dlls/comctl32/trackbar.c @@ -81,6 +81,8 @@ typedef struct #define TOOLTIP_OFFSET 2 /* distance from ctrl edge to tooltip */ +#define TB_DEFAULTPAGESIZE 20 + /* Used by TRACKBAR_Refresh to find out which parts of the control need to be recalculated */ @@ -1128,7 +1130,10 @@ TRACKBAR_SetPageSize (TRACKBAR_INFO *infoPtr, LONG lPageSize) { LONG lTemp = infoPtr->lPageSize; - infoPtr->lPageSize = lPageSize; + if (lPageSize != -1) + infoPtr->lPageSize = lPageSize; + else + infoPtr->lPageSize = TB_DEFAULTPAGESIZE; return lTemp; } @@ -1405,7 +1410,7 @@ TRACKBAR_Create (HWND hwnd, const CREATESTRUCTW *lpcs) infoPtr->lRangeMin = 0; infoPtr->lRangeMax = 100; infoPtr->lLineSize = 1; - infoPtr->lPageSize = 20; + infoPtr->lPageSize = TB_DEFAULTPAGESIZE; infoPtr->lSelMin = 0; infoPtr->lSelMax = 0; infoPtr->lPos = 0;
1
0
0
0
Nikolay Sivov : comctl32/tab: Implement TCM_[G, S] ETEXTENDEDSTYLE and TCS_EX_FLATSEPARATORS style.
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: 92b0ad98e128a7281120c3cc92b38e2f11bf3645 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=92b0ad98e128a7281120c3cc9…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Mar 23 16:00:04 2009 -0400 comctl32/tab: Implement TCM_[G,S]ETEXTENDEDSTYLE and TCS_EX_FLATSEPARATORS style. --- dlls/comctl32/tab.c | 49 +++++++++++++++++++++++++++++++++++++------- dlls/comctl32/tests/tab.c | 6 +--- 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index b8f638d..3a0e477 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -40,7 +40,6 @@ * TCIF_RTLREADING * * Extended Styles: - * TCS_EX_FLATSEPARATORS * TCS_EX_REGISTERDROP * * States: @@ -54,8 +53,6 @@ * * Messages: * TCM_DESELECTALL - * TCM_GETEXTENDEDSTYLE - * TCM_SETEXTENDEDSTYLE * * Macros: * TabCtrl_AdjustRect @@ -126,6 +123,9 @@ typedef struct BOOL bUnicode; /* Unicode control? */ HWND hwndUpDown; /* Updown control used for scrolling */ INT cbInfo; /* Number of bytes of caller supplied info per tab */ + + DWORD exStyle; /* Extended style used, currently: + TCS_EX_FLATSEPARATORS, TCS_EX_REGISTERDROP */ } TAB_INFO; /****************************************************************************** @@ -1947,7 +1947,7 @@ static void TAB_DrawItem(const TAB_INFO *infoPtr, HDC hdc, INT iItem) r = itemRect; /* Separators between flat buttons */ - if (lStyle & TCS_FLATBUTTONS) + if ((lStyle & TCS_FLATBUTTONS) && (infoPtr->exStyle & TCS_EX_FLATSEPARATORS)) { r1 = r; r1.right += (FLAT_BTN_SPACINGX -2); @@ -2978,6 +2978,8 @@ static LRESULT TAB_Create (HWND hwnd, LPARAM lParam) dwStyle = GetWindowLongW(hwnd, GWL_STYLE); SetWindowLongW(hwnd, GWL_STYLE, dwStyle|WS_CLIPSIBLINGS); + infoPtr->exStyle = (dwStyle & TCS_FLATBUTTONS) ? TCS_EX_FLATSEPARATORS : 0; + if (dwStyle & TCS_TOOLTIPS) { /* Create tooltip control */ infoPtr->hwndToolTip = @@ -3129,6 +3131,39 @@ static LRESULT TAB_RemoveImage (TAB_INFO *infoPtr, INT image) return 0; } +static LRESULT +TAB_SetExtendedStyle (TAB_INFO *infoPtr, DWORD exMask, DWORD exStyle) +{ + DWORD prevstyle = infoPtr->exStyle; + + /* zero mask means all styles */ + if (exMask == 0) exMask = ~0; + + if (exMask & TCS_EX_REGISTERDROP) + { + FIXME("TCS_EX_REGISTERDROP style unimplemented\n"); + exMask &= ~TCS_EX_REGISTERDROP; + exStyle &= ~TCS_EX_REGISTERDROP; + } + + if (exMask & TCS_EX_FLATSEPARATORS) + { + if ((prevstyle ^ exStyle) & TCS_EX_FLATSEPARATORS) + { + infoPtr->exStyle ^= TCS_EX_FLATSEPARATORS; + TAB_InvalidateTabArea(infoPtr); + } + } + + return prevstyle; +} + +static inline LRESULT +TAB_GetExtendedStyle (TAB_INFO *infoPtr) +{ + return infoPtr->exStyle; +} + static LRESULT WINAPI TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { @@ -3226,12 +3261,10 @@ TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return 0; case TCM_GETEXTENDEDSTYLE: - FIXME("Unimplemented msg TCM_GETEXTENDEDSTYLE\n"); - return 0; + return TAB_GetExtendedStyle (infoPtr); case TCM_SETEXTENDEDSTYLE: - FIXME("Unimplemented msg TCM_SETEXTENDEDSTYLE\n"); - return 0; + return TAB_SetExtendedStyle (infoPtr, wParam, lParam); case WM_GETFONT: return TAB_GetFont (infoPtr); diff --git a/dlls/comctl32/tests/tab.c b/dlls/comctl32/tests/tab.c index daef97f..d24d097 100644 --- a/dlls/comctl32/tests/tab.c +++ b/dlls/comctl32/tests/tab.c @@ -768,12 +768,10 @@ static void test_getters_setters(HWND parent_wnd, INT nTabs) /* Testing Flat Separators */ extendedStyle = SendMessage(hTab, TCM_GETEXTENDEDSTYLE, 0, 0); prevExtendedStyle = SendMessage(hTab, TCM_SETEXTENDEDSTYLE, 0, TCS_EX_FLATSEPARATORS); - expect(extendedStyle, prevExtendedStyle); + expect(extendedStyle, prevExtendedStyle); extendedStyle = SendMessage(hTab, TCM_GETEXTENDEDSTYLE, 0, 0); - todo_wine{ - expect(TCS_EX_FLATSEPARATORS, extendedStyle); - } + expect(TCS_EX_FLATSEPARATORS, extendedStyle); /* Testing Register Drop */ prevExtendedStyle = SendMessage(hTab, TCM_SETEXTENDEDSTYLE, 0, TCS_EX_REGISTERDROP);
1
0
0
0
Nikolay Sivov : comctl32/tab: Fix button background filling on TCS_BUTTONS.
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: b896b92061d1b0f98fe526065e49992e2e9dac60 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b896b92061d1b0f98fe526065…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Mar 23 15:47:16 2009 -0400 comctl32/tab: Fix button background filling on TCS_BUTTONS. --- dlls/comctl32/tab.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index ae4f035..b8f638d 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -1433,7 +1433,6 @@ TAB_EraseTabInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect BOOL deleteBrush = TRUE; RECT rTemp = *drawRect; - InflateRect(&rTemp, -2, -2); if (lStyle & TCS_BUTTONS) { if (iItem == infoPtr->iSelected) @@ -1473,6 +1472,7 @@ TAB_EraseTabInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect } else /* !TCS_BUTTONS */ { + InflateRect(&rTemp, -2, -2); if (!GetWindowTheme (infoPtr->hwnd)) FillRect(hdc, &rTemp, hbr); }
1
0
0
0
Nikolay Sivov : comctl32/tab: Implement TCM_REMOVEIMAGE.
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: 45851485476096c99ee21a43a5eeecfb64abc400 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=45851485476096c99ee21a43a…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Mar 23 15:45:44 2009 -0400 comctl32/tab: Implement TCM_REMOVEIMAGE. --- dlls/comctl32/tab.c | 35 ++++++++++++++++++++++-- dlls/comctl32/tests/tab.c | 64 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index 3880ceb..ae4f035 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -53,7 +53,6 @@ * TCN_KEYDOWN * * Messages: - * TCM_REMOVEIMAGE * TCM_DESELECTALL * TCM_GETEXTENDEDSTYLE * TCM_SETEXTENDEDSTYLE @@ -3099,6 +3098,37 @@ TAB_SetItemExtra (TAB_INFO *infoPtr, INT cbInfo) return TRUE; } +static LRESULT TAB_RemoveImage (TAB_INFO *infoPtr, INT image) +{ + if (!infoPtr) + return 0; + + if (ImageList_Remove (infoPtr->himl, image)) + { + INT i, *idx; + RECT r; + + /* shift indices, repaint items if needed */ + for (i = 0; i < infoPtr->uNumItem; i++) + { + idx = &infoPtr->items[i].iImage; + if (*idx >= image) + { + if (*idx == image) + *idx = -1; + else + (*idx)--; + + /* repaint item */ + if (TAB_InternalGetItemRect (infoPtr, i, &r, NULL)) + InvalidateRect (infoPtr->hwnd, &r, TRUE); + } + } + } + + return 0; +} + static LRESULT WINAPI TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { @@ -3159,8 +3189,7 @@ TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return TAB_SetItemSize (infoPtr, lParam); case TCM_REMOVEIMAGE: - FIXME("Unimplemented msg TCM_REMOVEIMAGE\n"); - return 0; + return TAB_RemoveImage (infoPtr, wParam); case TCM_SETPADDING: return TAB_SetPadding (infoPtr, lParam); diff --git a/dlls/comctl32/tests/tab.c b/dlls/comctl32/tests/tab.c index 4b1c7f4..daef97f 100644 --- a/dlls/comctl32/tests/tab.c +++ b/dlls/comctl32/tests/tab.c @@ -984,6 +984,69 @@ static void test_delete_focus(HWND parent_wnd) DestroyWindow(hTab); } +static void test_removeimage(HWND parent_wnd) +{ + static const BYTE bits[32]; + HWND hwTab; + INT i; + TCITEM item; + HICON hicon; + HIMAGELIST himl = ImageList_Create(16, 16, ILC_COLOR, 3, 4); + + hicon = CreateIcon(NULL, 16, 16, 1, 1, bits, bits); + ImageList_AddIcon(himl, hicon); + ImageList_AddIcon(himl, hicon); + ImageList_AddIcon(himl, hicon); + + hwTab = create_tabcontrol(TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE); + SendMessage(hwTab, TCM_SETIMAGELIST, 0, (LPARAM)himl); + + memset(&item, 0, sizeof(TCITEM)); + item.mask = TCIF_IMAGE; + + for(i = 0; i < 3; i++) { + SendMessage(hwTab, TCM_GETITEM, i, (LPARAM)&item); + expect(i, item.iImage); + } + + /* remove image middle image */ + SendMessage(hwTab, TCM_REMOVEIMAGE, 1, 0); + expect(2, ImageList_GetImageCount(himl)); + item.iImage = -1; + SendMessage(hwTab, TCM_GETITEM, 0, (LPARAM)&item); + expect(0, item.iImage); + item.iImage = 0; + SendMessage(hwTab, TCM_GETITEM, 1, (LPARAM)&item); + expect(-1, item.iImage); + item.iImage = 0; + SendMessage(hwTab, TCM_GETITEM, 2, (LPARAM)&item); + expect(1, item.iImage); + /* remove first image */ + SendMessage(hwTab, TCM_REMOVEIMAGE, 0, 0); + expect(1, ImageList_GetImageCount(himl)); + item.iImage = 0; + SendMessage(hwTab, TCM_GETITEM, 0, (LPARAM)&item); + expect(-1, item.iImage); + item.iImage = 0; + SendMessage(hwTab, TCM_GETITEM, 1, (LPARAM)&item); + expect(-1, item.iImage); + item.iImage = -1; + SendMessage(hwTab, TCM_GETITEM, 2, (LPARAM)&item); + expect(0, item.iImage); + /* remove the last one */ + SendMessage(hwTab, TCM_REMOVEIMAGE, 0, 0); + expect(0, ImageList_GetImageCount(himl)); + for(i = 0; i < 3; i++) { + item.iImage = 0; + SendMessage(hwTab, TCM_GETITEM, i, (LPARAM)&item); + expect(-1, item.iImage); + } + + DestroyWindow(hwTab); + ImageList_Destroy(himl); + DestroyIcon(hicon); +} + START_TEST(tab) { HWND parent_wnd; @@ -1021,6 +1084,7 @@ START_TEST(tab) test_insert_focus(parent_wnd); test_delete_focus(parent_wnd); + test_removeimage(parent_wnd); DestroyWindow(parent_wnd); }
1
0
0
0
Alexandre Julliard : winebuild: Make sure main module is properly initialized.
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: e9ef9911d0f348f4af34dd517e3fabc3276ff333 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e9ef9911d0f348f4af34dd517…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 24 11:50:13 2009 +0100 winebuild: Make sure main module is properly initialized. --- tools/winebuild/utils.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index 3a29a4b..ffe44ec 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -465,6 +465,7 @@ DLLSPEC *alloc_dll_spec(void) spec->file_name = NULL; spec->dll_name = NULL; spec->init_func = NULL; + spec->main_module = NULL; spec->type = SPEC_WIN32; spec->base = MAX_ORDINALS; spec->limit = 0;
1
0
0
0
James Hawkins : kernel32: Don't try to load an empty initialization file.
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: 87847b47cd5e4a31a7bbe8ba9f16aa0d70365562 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=87847b47cd5e4a31a7bbe8ba9…
Author: James Hawkins <truiken(a)gmail.com> Date: Sun Mar 22 14:37:54 2009 -0700 kernel32: Don't try to load an empty initialization file. --- dlls/kernel32/profile.c | 2 +- dlls/kernel32/tests/profile.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c index 22cc445..5d563a5 100644 --- a/dlls/kernel32/profile.c +++ b/dlls/kernel32/profile.c @@ -322,7 +322,7 @@ static PROFILESECTION *PROFILE_Load(HANDLE hFile, ENCODING * pEncoding) TRACE("%p\n", hFile); dwFileSize = GetFileSize(hFile, NULL); - if (dwFileSize == INVALID_FILE_SIZE) + if (dwFileSize == INVALID_FILE_SIZE || dwFileSize == 0) return NULL; buffer_base = HeapAlloc(GetProcessHeap(), 0 , dwFileSize); diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index 9f5398c..7b57699 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -865,10 +865,7 @@ static void test_WritePrivateProfileString(void) "key=string\r\n"; ret = WritePrivateProfileStringA("", "key", "string", path); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - todo_wine - { - ok(check_file_data(path, data), "File doesn't match\n"); - } + ok(check_file_data(path, data), "File doesn't match\n"); DeleteFileA(path); /* NULL lpKeyName */
1
0
0
0
James Hawkins : kernel32: Handle writing empty sections and keys in WritePrivateProfileString.
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: 7c3529f1cc6a3ce6f0a403c337926c8fc9fbfc57 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7c3529f1cc6a3ce6f0a403c33…
Author: James Hawkins <truiken(a)gmail.com> Date: Sun Mar 22 14:37:44 2009 -0700 kernel32: Handle writing empty sections and keys in WritePrivateProfileString. --- dlls/kernel32/profile.c | 32 ++++++++++++++++++++------------ dlls/kernel32/tests/profile.c | 5 +---- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c index fea858c..22cc445 100644 --- a/dlls/kernel32/profile.c +++ b/dlls/kernel32/profile.c @@ -202,31 +202,31 @@ static void PROFILE_Save( HANDLE hFile, const PROFILESECTION *section, ENCODING for ( ; section; section = section->next) { - int len = 0; + int len = 4; - if (section->name[0]) len += strlenW(section->name) + 6; + if (section->name[0]) len += strlenW(section->name); for (key = section->key; key; key = key->next) { - len += strlenW(key->name) + 2; - if (key->value) len += strlenW(key->value) + 1; + len += strlenW(key->name); + if (key->value && key->value[0]) len += strlenW(key->value); + len += 3; /* '=' and "\r\n" */ } buffer = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); if (!buffer) return; p = buffer; + *p++ = '['; if (section->name[0]) { - *p++ = '\r'; - *p++ = '\n'; - *p++ = '['; strcpyW( p, section->name ); p += strlenW(p); - *p++ = ']'; - *p++ = '\r'; - *p++ = '\n'; } + *p++ = ']'; + *p++ = '\r'; + *p++ = '\n'; + for (key = section->key; key; key = key->next) { strcpyW( p, key->name ); @@ -587,12 +587,20 @@ static PROFILEKEY *PROFILE_Find( PROFILESECTION **section, LPCWSTR section_name, int seclen, keylen; while (PROFILE_isspaceW(*section_name)) section_name++; - p = section_name + strlenW(section_name) - 1; + if (*section_name) + p = section_name + strlenW(section_name) - 1; + else + p = section_name; + while ((p > section_name) && PROFILE_isspaceW(*p)) p--; seclen = p - section_name + 1; while (PROFILE_isspaceW(*key_name)) key_name++; - p = key_name + strlenW(key_name) - 1; + if (*key_name) + p = key_name + strlenW(key_name) - 1; + else + p = key_name; + while ((p > key_name) && PROFILE_isspaceW(*p)) p--; keylen = p - key_name + 1; diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index 0ba3fd1..9f5398c 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -930,10 +930,7 @@ static void test_WritePrivateProfileString(void) "key=string\r\n"; ret = WritePrivateProfileStringA("App", "key", "string", "win1.tmp"); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - todo_wine - { - ok(check_file_data(path, data), "File doesn't match\n"); - } + ok(check_file_data(path, data), "File doesn't match\n"); DeleteFileA(path); GetTempPathA(MAX_PATH, temp);
1
0
0
0
James Hawkins : kernel32: Set last error to ERROR_FILE_NOT_FOUND if lpAppName is NULL.
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: f1308f9b40d65e795e8d15f14fd8be7defcb4ed0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f1308f9b40d65e795e8d15f14…
Author: James Hawkins <truiken(a)gmail.com> Date: Sun Mar 22 14:37:31 2009 -0700 kernel32: Set last error to ERROR_FILE_NOT_FOUND if lpAppName is NULL. --- dlls/kernel32/profile.c | 3 +-- dlls/kernel32/tests/profile.c | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c index 8b77aaa..fea858c 100644 --- a/dlls/kernel32/profile.c +++ b/dlls/kernel32/profile.c @@ -1446,8 +1446,7 @@ BOOL WINAPI WritePrivateProfileStringW( LPCWSTR section, LPCWSTR entry, else if (PROFILE_Open( filename, TRUE )) { if (!section) { - FIXME("(NULL?,%s,%s,%s)?\n", - debugstr_w(entry), debugstr_w(string), debugstr_w(filename)); + SetLastError(ERROR_FILE_NOT_FOUND); } else { ret = PROFILE_SetString( section, entry, string, FALSE); PROFILE_FlushFile(); diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index 6000ffb..0ba3fd1 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -855,11 +855,8 @@ static void test_WritePrivateProfileString(void) SetLastError(0xdeadbeef); ret = WritePrivateProfileStringA(NULL, "key", "string", path); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - todo_wine - { - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - } + ok(GetLastError() == ERROR_FILE_NOT_FOUND, + "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); ok(check_file_data(path, data), "File doesn't match\n"); DeleteFileA(path);
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
84
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
Results per page:
10
25
50
100
200