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
April 2007
----- 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
4 participants
687 discussions
Start a n
N
ew thread
H. Verbeet : wined3d: Improve IWineD3DVolumeImpl_LoadTexture TRACE output.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: 950014b41fdec2aa99168bb283314c1f4cbab1fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=950014b41fdec2aa99168bb28…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Mon Apr 23 22:03:00 2007 +0200 wined3d: Improve IWineD3DVolumeImpl_LoadTexture TRACE output. --- dlls/wined3d/volume.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index 9033c8a..c50e489 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -264,7 +264,10 @@ static HRESULT WINAPI IWineD3DVolumeImpl_SetContainer(IWineD3DVolume *iface, IWi static HRESULT WINAPI IWineD3DVolumeImpl_LoadTexture(IWineD3DVolume *iface, GLenum gl_level) { IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; - const PixelFormatDesc *formatEntry = getFormatDescEntry(This->resource.format); + WINED3DFORMAT format = This->resource.format; + const PixelFormatDesc *formatEntry = getFormatDescEntry(format); + + TRACE("(%p) : level %u, format %s (0x%08x)\n", This, gl_level, debug_d3dformat(format), format); if(GL_SUPPORT(EXT_TEXTURE3D)) { TRACE("Calling glTexImage3D %x level=%d, intfmt=%x, w=%d, h=%d,d=%d, 0=%d, glFmt=%x, glType=%x, Mem=%p\n",
1
0
0
0
H. Verbeet : wined3d: Actually use the calculated mipmap surface sizes in IWineD3DDeviceImpl_CreateVolumeTexture .
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: af8e6ed14aa0df39e78b08b9316c86bf73225db9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=af8e6ed14aa0df39e78b08b93…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Mon Apr 23 22:02:55 2007 +0200 wined3d: Actually use the calculated mipmap surface sizes in IWineD3DDeviceImpl_CreateVolumeTexture. --- dlls/wined3d/device.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index e878c4a..b6fae75 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -930,7 +930,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa { HRESULT hr; /* Create the volume */ - hr = D3DCB_CreateVolume(This->parent, parent, Width, Height, Depth, Format, Pool, Usage, + hr = D3DCB_CreateVolume(This->parent, parent, tmpW, tmpH, tmpD, Format, Pool, Usage, (IWineD3DVolume **)&object->volumes[i], pSharedHandle); if(FAILED(hr)) {
1
0
0
0
H. Verbeet : wined3d: Output pretty GL errors in checkGLcall and vcheckGLcall.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: b643ab3620010c0b8e7cf760bc551526c07a9b40 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b643ab3620010c0b8e7cf760b…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Mon Apr 23 22:02:50 2007 +0200 wined3d: Output pretty GL errors in checkGLcall and vcheckGLcall. --- dlls/wined3d/utils.c | 18 ++++++++++++++++++ dlls/wined3d/wined3d_private.h | 9 +++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 8817fd0..b39f648 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -714,6 +714,24 @@ const char *debug_fbostatus(GLenum status) { } } +const char *debug_glerror(GLenum error) { + switch(error) { +#define GLERROR_TO_STR(u) case u: return #u + GLERROR_TO_STR(GL_NO_ERROR); + GLERROR_TO_STR(GL_INVALID_ENUM); + GLERROR_TO_STR(GL_INVALID_VALUE); + GLERROR_TO_STR(GL_INVALID_OPERATION); + GLERROR_TO_STR(GL_STACK_OVERFLOW); + GLERROR_TO_STR(GL_STACK_UNDERFLOW); + GLERROR_TO_STR(GL_OUT_OF_MEMORY); + GLERROR_TO_STR(GL_INVALID_FRAMEBUFFER_OPERATION_EXT); +#undef GLERROR_TO_STR + default: + FIXME("Unrecognied GL error 0x%08x\n", error); + return "unrecognized"; + } +} + /***************************************************************************** * Useful functions mapping GL <-> D3D values */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d51e15c..88174ca 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -272,8 +272,8 @@ extern int num_lock; TRACE("%s call ok %s / %d\n", A, __FILE__, __LINE__); \ \ } else do { \ - FIXME(">>>>>>>>>>>>>>>>> %#x from %s @ %s / %d\n", \ - err, A, __FILE__, __LINE__); \ + FIXME(">>>>>>>>>>>>>>>>> %s (%#x) from %s @ %s / %d\n", \ + debug_glerror(err), err, A, __FILE__, __LINE__); \ err = glGetError(); \ } while (err != GL_NO_ERROR); \ } @@ -357,8 +357,8 @@ extern const float identity[16]; VTRACE(("%s call ok %s / %d\n", A, __FILE__, __LINE__)); \ \ } else do { \ - FIXME(">>>>>>>>>>>>>>>>> %#x from %s @ %s / %d\n", \ - err, A, __FILE__, __LINE__); \ + FIXME(">>>>>>>>>>>>>>>>> %s (%#x) from %s @ %s / %d\n", \ + debug_glerror(err), err, A, __FILE__, __LINE__); \ err = glGetError(); \ } while (err != GL_NO_ERROR); \ } @@ -1403,6 +1403,7 @@ const char* debug_d3dtexturestate(DWORD state); const char* debug_d3dtstype(WINED3DTRANSFORMSTATETYPE tstype); const char* debug_d3dpool(WINED3DPOOL pool); const char *debug_fbostatus(GLenum status); +const char *debug_glerror(GLenum error); /* Routines for GL <-> D3D values */ GLenum StencilOp(DWORD op);
1
0
0
0
Mikołaj Zalewski : shlwapi: Fix the handling of overflows in PathCombine[AW].
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: 7370a93b52c1f753fa0e305b688f2c8003b80afa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7370a93b52c1f753fa0e305b6…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Thu Apr 5 23:14:42 2007 +0200 shlwapi: Fix the handling of overflows in PathCombine[AW]. --- dlls/shlwapi/path.c | 51 ++++++++++++++++++---------- dlls/shlwapi/tests/path.c | 80 +++++++++++++++++++++++---------------------- 2 files changed, 74 insertions(+), 57 deletions(-) diff --git a/dlls/shlwapi/path.c b/dlls/shlwapi/path.c index a06198f..0ccda95 100644 --- a/dlls/shlwapi/path.c +++ b/dlls/shlwapi/path.c @@ -131,23 +131,31 @@ BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend) */ LPSTR WINAPI PathCombineA(LPSTR lpszDest, LPCSTR lpszDir, LPCSTR lpszFile) { + WCHAR szDest[MAX_PATH]; + WCHAR szDir[MAX_PATH]; + WCHAR szFile[MAX_PATH]; TRACE("(%p,%s,%s)\n", lpszDest, debugstr_a(lpszDir), debugstr_a(lpszFile)); - if (!lpszDest || (!lpszDir && !lpszFile)) - return NULL; /* Invalid parameters */ - else + /* Invalid parameters */ + if (!lpszDest) + return NULL; + if (!lpszDir && !lpszFile) { - WCHAR szDest[MAX_PATH]; - WCHAR szDir[MAX_PATH]; - WCHAR szFile[MAX_PATH]; - if (lpszDir) - MultiByteToWideChar(CP_ACP,0,lpszDir,-1,szDir,MAX_PATH); - if (lpszFile) - MultiByteToWideChar(CP_ACP,0,lpszFile,-1,szFile,MAX_PATH); - PathCombineW(szDest, lpszDir ? szDir : NULL, lpszFile ? szFile : NULL); - WideCharToMultiByte(CP_ACP,0,szDest,-1,lpszDest,MAX_PATH,0,0); + lpszDest[0] = 0; + return NULL; } - return lpszDest; + + if (lpszDir) + MultiByteToWideChar(CP_ACP,0,lpszDir,-1,szDir,MAX_PATH); + if (lpszFile) + MultiByteToWideChar(CP_ACP,0,lpszFile,-1,szFile,MAX_PATH); + + if (PathCombineW(szDest, lpszDir ? szDir : NULL, lpszFile ? szFile : NULL)) + if (WideCharToMultiByte(CP_ACP,0,szDest,-1,lpszDest,MAX_PATH,0,0)) + return lpszDest; + + lpszDest[0] = 0; + return NULL; } /************************************************************************* @@ -162,8 +170,14 @@ LPWSTR WINAPI PathCombineW(LPWSTR lpszDest, LPCWSTR lpszDir, LPCWSTR lpszFile) TRACE("(%p,%s,%s)\n", lpszDest, debugstr_w(lpszDir), debugstr_w(lpszFile)); - if (!lpszDest || (!lpszDir && !lpszFile)) - return NULL; /* Invalid parameters */ + /* Invalid parameters */ + if (!lpszDest) + return NULL; + if (!lpszDir && !lpszFile) + { + lpszDest[0] = 0; + return NULL; + } if ((!lpszFile || !*lpszFile) && lpszDir) { @@ -194,10 +208,11 @@ LPWSTR WINAPI PathCombineW(LPWSTR lpszDest, LPCWSTR lpszDir, LPCWSTR lpszFile) PathStripToRootW(szTemp); lpszFile++; /* Skip '\' */ } - if (!PathAddBackslashW(szTemp)) - return NULL; - if (strlenW(szTemp) + strlenW(lpszFile) >= MAX_PATH) + if (!PathAddBackslashW(szTemp) || strlenW(szTemp) + strlenW(lpszFile) >= MAX_PATH) + { + lpszDest[0] = 0; return NULL; + } strcatW(szTemp, lpszFile); } diff --git a/dlls/shlwapi/tests/path.c b/dlls/shlwapi/tests/path.c index c91e99f..6f52ac7 100644 --- a/dlls/shlwapi/tests/path.c +++ b/dlls/shlwapi/tests/path.c @@ -952,6 +952,9 @@ static void test_PathMatchSpec(void) static void test_PathCombineW(void) { LPWSTR wszString, wszString2; + WCHAR wbuf[MAX_PATH+1], wstr1[MAX_PATH] = {'C',':','\\',0}, wstr2[MAX_PATH]; + static const WCHAR expout[] = {'C',':','\\','A','A',0}; + int i; wszString2 = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR)); @@ -960,12 +963,32 @@ static void test_PathCombineW(void) ok (wszString == NULL, "Expected a NULL return\n"); /* Some NULL */ + wszString2[0] = 'a'; wszString = pPathCombineW(wszString2, NULL, NULL); ok (wszString == NULL, "Expected a NULL return\n"); - + ok (wszString2[0] == 0, "Destination string not empty\n"); + HeapFree(GetProcessHeap(), 0, wszString2); + + /* overflow test */ + wstr2[0] = wstr2[1] = wstr2[2] = 'A'; + for (i=3; i<MAX_PATH/2; i++) + wstr1[i] = wstr2[i] = 'A'; + wstr1[(MAX_PATH/2) - 1] = wstr2[MAX_PATH/2] = 0; + memset(wbuf, 0xbf, sizeof(wbuf)); + + wszString = pPathCombineW(wbuf, wstr1, wstr2); + ok(wszString == NULL, "Expected a NULL return\n"); + ok(wbuf[0] == 0, "Buffer contains data\n"); + + /* PathCombineW can be used in place */ + wstr1[3] = 0; + wstr2[2] = 0; + ok(PathCombineW(wstr1, wstr1, wstr2) == wstr1, "Expected a wstr1 return\n"); + ok(StrCmpW(wstr1, expout) == 0, "Unexpected PathCombine output\n"); } + #define LONG_LEN (MAX_PATH * 2) #define HALF_LEN (MAX_PATH / 2 + 1) @@ -1039,10 +1062,7 @@ static void test_PathCombineA(void) lstrcpyA(dest, "control"); str = PathCombineA(dest, NULL, NULL); ok(str == NULL, "Expected str == NULL, got %p\n", str); - todo_wine - { - ok(lstrlenA(dest) == 0, "Expected 0 length, got %i\n", lstrlenA(dest)); - } + ok(lstrlenA(dest) == 0, "Expected 0 length, got %i\n", lstrlenA(dest)); ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); /* try directory without backslash */ @@ -1125,23 +1145,17 @@ static void test_PathCombineA(void) SetLastError(0xdeadbeef); lstrcpyA(dest, "control"); str = PathCombineA(dest, "C:\\", too_long); - todo_wine - { - ok(str == NULL, "Expected str == NULL, got %p\n", str); - ok(lstrlenA(dest) == 0, "Expected 0 length, got %i\n", lstrlenA(dest)); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); - } + ok(str == NULL, "Expected str == NULL, got %p\n", str); + ok(lstrlenA(dest) == 0, "Expected 0 length, got %i\n", lstrlenA(dest)); + todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); /* try a directory longer than MAX_PATH */ SetLastError(0xdeadbeef); lstrcpyA(dest, "control"); str = PathCombineA(dest, too_long, "one\\two\\three"); - todo_wine - { - ok(str == NULL, "Expected str == NULL, got %p\n", str); - ok(lstrlenA(dest) == 0, "Expected 0 length, got %i\n", lstrlenA(dest)); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); - } + ok(str == NULL, "Expected str == NULL, got %p\n", str); + ok(lstrlenA(dest) == 0, "Expected 0 length, got %i\n", lstrlenA(dest)); + todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); memset(one, 'b', HALF_LEN); memset(two, 'c', HALF_LEN); @@ -1152,11 +1166,8 @@ static void test_PathCombineA(void) SetLastError(0xdeadbeef); lstrcpyA(dest, "control"); str = PathCombineA(dest, one, two); - todo_wine - { - ok(str == NULL, "Expected str == NULL, got %p\n", str); - ok(lstrlenA(dest) == 0, "Expected 0 length, got %i\n", lstrlenA(dest)); - } + ok(str == NULL, "Expected str == NULL, got %p\n", str); + ok(lstrlenA(dest) == 0, "Expected 0 length, got %i\n", lstrlenA(dest)); ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); } @@ -1320,12 +1331,9 @@ static void test_PathAppendA(void) too_long[LONG_LEN - 1] = '\0'; SetLastError(0xdeadbeef); res = PathAppendA(too_long, "two\\three"); - todo_wine - { - ok(!res, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok(lstrlen(too_long) == 0, "Expected length of too_long to be zero, got %i\n", lstrlen(too_long)); - } + ok(!res, "Expected failure\n"); + todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(lstrlen(too_long) == 0, "Expected length of too_long to be zero, got %i\n", lstrlen(too_long)); /* pszMore is too long */ lstrcpy(path, "C:\\one"); @@ -1333,12 +1341,9 @@ static void test_PathAppendA(void) too_long[LONG_LEN - 1] = '\0'; SetLastError(0xdeadbeef); res = PathAppendA(path, too_long); - todo_wine - { - ok(!res, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok(lstrlen(path) == 0, "Expected length of path to be zero, got %i\n", lstrlen(path)); - } + ok(!res, "Expected failure\n"); + todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(lstrlen(path) == 0, "Expected length of path to be zero, got %i\n", lstrlen(path)); /* both params combined are too long */ memset(one, 'a', HALF_LEN); @@ -1347,11 +1352,8 @@ static void test_PathAppendA(void) two[HALF_LEN - 1] = '\0'; SetLastError(0xdeadbeef); res = PathAppendA(one, two); - todo_wine - { - ok(!res, "Expected failure\n"); - ok(lstrlen(one) == 0, "Expected length of one to be zero, got %i\n", lstrlen(one)); - } + ok(!res, "Expected failure\n"); + ok(lstrlen(one) == 0, "Expected length of one to be zero, got %i\n", lstrlen(one)); ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); }
1
0
0
0
Mikołaj Zalewski : comctl32: toolbar: In CreateToolbarEx the default bitmap size is also 16x16.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: ca7b0c86f81889af4fad23021121f7013012f0d7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca7b0c86f81889af4fad23021…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Thu Apr 5 12:32:47 2007 +0200 comctl32: toolbar: In CreateToolbarEx the default bitmap size is also 16x16. --- dlls/comctl32/commctrl.c | 11 ++++++----- dlls/comctl32/tests/toolbar.c | 14 +++++++++++++- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index a5796f3..97810b3 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -686,12 +686,13 @@ CreateToolbarEx (HWND hwnd, DWORD style, UINT wID, INT nBitmaps, /* set bitmap and button size */ /*If CreateToolbarEx receives 0, windows sets default values*/ - if (dxBitmap <= 0) + if (dxBitmap < 0) dxBitmap = 16; - if (dyBitmap <= 0) - dyBitmap = 15; - SendMessageW (hwndTB, TB_SETBITMAPSIZE, 0, - MAKELPARAM((WORD)dxBitmap, (WORD)dyBitmap)); + if (dyBitmap < 0) + dyBitmap = 16; + if (dxBitmap == 0 || dyBitmap == 0) + dxBitmap = dyBitmap = 16; + SendMessageW(hwndTB, TB_SETBITMAPSIZE, 0, MAKELPARAM(dxBitmap, dyBitmap)); if (dxButton < 0) dxButton = dxBitmap; diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index be9390c..e2d5095 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -807,7 +807,7 @@ static void test_sizes(void) SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(3, 3)); ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 22), "Unexpected button size\n"); check_sizes(); - /* except for the first size, the default size is bitmap size + padding */ + /* the default size is bitmap size + padding */ SendMessageA(hToolbar, TB_SETPADDING, 0, MAKELONG(1, 1)); SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(3, 3)); ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(17, 17), "Unexpected button size\n"); @@ -922,6 +922,18 @@ static void test_createtoolbarex() CHECK_IMAGELIST(16, 16, 8); compare((int)SendMessage(hToolbar, TB_GETBUTTONSIZE, 0, 0), 0xe0017, "%x"); DestroyWindow(hToolbar); + + hToolbar = CreateToolbarEx(hMainWnd, WS_VISIBLE, 1, 16, GetModuleHandle(NULL), IDB_BITMAP_128x15, btns, + 3, 0, 0, 12, -1, sizeof(TBBUTTON)); + CHECK_IMAGELIST(16, 12, 16); + compare((int)SendMessage(hToolbar, TB_GETBUTTONSIZE, 0, 0), 0x160013, "%x"); + DestroyWindow(hToolbar); + + hToolbar = CreateToolbarEx(hMainWnd, WS_VISIBLE, 1, 16, GetModuleHandle(NULL), IDB_BITMAP_128x15, btns, + 3, 0, 0, 0, 12, sizeof(TBBUTTON)); + CHECK_IMAGELIST(16, 16, 16); + compare((int)SendMessage(hToolbar, TB_GETBUTTONSIZE, 0, 0), 0x160017, "%x"); + DestroyWindow(hToolbar); }
1
0
0
0
Mikołaj Zalewski : comctl32: toolbar: Don' t execute TB_GETBUTTONINFO if cbSize is invalid.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: 3d7a65355edfd3c97f63abb85a814703f30112f5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3d7a65355edfd3c97f63abb85…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Thu Apr 5 12:25:43 2007 +0200 comctl32: toolbar: Don't execute TB_GETBUTTONINFO if cbSize is invalid. --- dlls/comctl32/tests/toolbar.c | 23 +++++++++++++++++++++++ dlls/comctl32/toolbar.c | 10 +++++++++- 2 files changed, 32 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index 08ce4e0..be9390c 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -864,6 +864,28 @@ static void test_sizes(void) DestroyWindow(hToolbar); } +static void test_getbuttoninfo(void) +{ + HWND hToolbar = NULL; + int i; + + rebuild_toolbar_with_buttons(&hToolbar); + for (i = 0; i < 128; i++) + { + TBBUTTONINFO tbi; + int ret; + + tbi.cbSize = i; + tbi.dwMask = TBIF_BYINDEX | TBIF_COMMAND; + ret = (int)SendMessage(hToolbar, TB_GETBUTTONINFO, 0, (LPARAM)&tbi); + if (i == sizeof(TBBUTTONINFO)) { + compare(ret, 0, "%d"); + } else { + compare(ret, -1, "%d"); + } + } + DestroyWindow(hToolbar); +} static void test_createtoolbarex() { @@ -933,6 +955,7 @@ START_TEST(toolbar) test_add_string(); test_hotitem(); test_sizes(); + test_getbuttoninfo(); test_createtoolbarex(); PostQuitMessage(0); diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index dfd97ff..89037c4 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -3364,8 +3364,16 @@ TOOLBAR_GetButtonInfoT(HWND hwnd, WPARAM wParam, LPARAM lParam, BOOL bUnicode) if (lpTbInfo == NULL) return -1; - if (lpTbInfo->cbSize < sizeof(TBBUTTONINFOA)) + + /* MSDN documents a iImageLabel field added in Vista but it is not present in + * the headers and tests shows that even with comctl 6 Vista accepts only the + * original TBBUTTONINFO size + */ + if (lpTbInfo->cbSize != sizeof(TBBUTTONINFOW)) + { + WARN("Invalid button size\n"); return -1; + } nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, lpTbInfo->dwMask & 0x80000000);
1
0
0
0
Mikołaj Zalewski : comctl32: toolbar: Merge TOOLBAR_GetButtonInfoA and TB_GetButtonInfoW.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: 10b1d00113ec6038f0eeac639f4b60b56578777d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=10b1d00113ec6038f0eeac639…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Thu Apr 5 10:18:42 2007 +0200 comctl32: toolbar: Merge TOOLBAR_GetButtonInfoA and TB_GetButtonInfoW. --- dlls/comctl32/toolbar.c | 67 +++++++---------------------------------------- 1 files changed, 10 insertions(+), 57 deletions(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index e08a15f..dfd97ff 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -3354,10 +3354,11 @@ TOOLBAR_GetButton (HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT -TOOLBAR_GetButtonInfoA (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_GetButtonInfoT(HWND hwnd, WPARAM wParam, LPARAM lParam, BOOL bUnicode) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); - LPTBBUTTONINFOA lpTbInfo = (LPTBBUTTONINFOA)lParam; + /* TBBUTTONINFOW and TBBUTTONINFOA have the same layout*/ + LPTBBUTTONINFOW lpTbInfo = (LPTBBUTTONINFOW)lParam; TBUTTON_INFO *btnPtr; INT nIndex; @@ -3388,63 +3389,15 @@ TOOLBAR_GetButtonInfoA (HWND hwnd, WPARAM wParam, LPARAM lParam) if (lpTbInfo->dwMask & TBIF_TEXT) { /* TB_GETBUTTONINFO doesn't retrieve text from the string list, so we can't use TOOLBAR_GetText here */ - LPWSTR lpText; - if (HIWORD(btnPtr->iString) && (btnPtr->iString != -1)) { - lpText = (LPWSTR)btnPtr->iString; - Str_GetPtrWtoA (lpText, lpTbInfo->pszText,lpTbInfo->cchText); - } else - lpTbInfo->pszText[0] = '\0'; - } - return nIndex; -} - - -static LRESULT -TOOLBAR_GetButtonInfoW (HWND hwnd, WPARAM wParam, LPARAM lParam) -{ - TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); - LPTBBUTTONINFOW lpTbInfo = (LPTBBUTTONINFOW)lParam; - TBUTTON_INFO *btnPtr; - INT nIndex; - - if (lpTbInfo == NULL) - return -1; - if (lpTbInfo->cbSize < sizeof(TBBUTTONINFOW)) - return -1; - - nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, - lpTbInfo->dwMask & 0x80000000); - if (nIndex == -1) - return -1; - - btnPtr = &infoPtr->buttons[nIndex]; - - if(!btnPtr) - return -1; - - if (lpTbInfo->dwMask & TBIF_COMMAND) - lpTbInfo->idCommand = btnPtr->idCommand; - if (lpTbInfo->dwMask & TBIF_IMAGE) - lpTbInfo->iImage = btnPtr->iBitmap; - if (lpTbInfo->dwMask & TBIF_LPARAM) - lpTbInfo->lParam = btnPtr->dwData; - if (lpTbInfo->dwMask & TBIF_SIZE) - lpTbInfo->cx = (WORD)(btnPtr->rect.right - btnPtr->rect.left); - if (lpTbInfo->dwMask & TBIF_STATE) - lpTbInfo->fsState = btnPtr->fsState; - if (lpTbInfo->dwMask & TBIF_STYLE) - lpTbInfo->fsStyle = btnPtr->fsStyle; - if (lpTbInfo->dwMask & TBIF_TEXT) { - /* TB_GETBUTTONINFO doesn't retrieve text from the string list, so we - can't use TOOLBAR_GetText here */ - LPWSTR lpText; if (HIWORD(btnPtr->iString) && (btnPtr->iString != -1)) { - lpText = (LPWSTR)btnPtr->iString; - Str_GetPtrW (lpText,lpTbInfo->pszText,lpTbInfo->cchText); + LPWSTR lpText = (LPWSTR)btnPtr->iString; + if (bUnicode) + Str_GetPtrW(lpText, lpTbInfo->pszText, lpTbInfo->cchText); + else + Str_GetPtrWtoA(lpText, (LPSTR)lpTbInfo->pszText, lpTbInfo->cchText); } else lpTbInfo->pszText[0] = '\0'; } - return nIndex; } @@ -6663,10 +6616,10 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return TOOLBAR_GetButton (hwnd, wParam, lParam); case TB_GETBUTTONINFOA: - return TOOLBAR_GetButtonInfoA (hwnd, wParam, lParam); + return TOOLBAR_GetButtonInfoT(hwnd, wParam, lParam, FALSE); case TB_GETBUTTONINFOW: - return TOOLBAR_GetButtonInfoW (hwnd, wParam, lParam); + return TOOLBAR_GetButtonInfoT(hwnd, wParam, lParam, TRUE); case TB_GETBUTTONSIZE: return TOOLBAR_GetButtonSize (hwnd);
1
0
0
0
Mikołaj Zalewski : regedit: Update Polish translation.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: 2fd63d342eba207e995028766ebb3a2d72a063b0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2fd63d342eba207e995028766…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Wed Apr 4 21:08:19 2007 +0200 regedit: Update Polish translation. --- programs/regedit/Pl.rc | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/programs/regedit/Pl.rc b/programs/regedit/Pl.rc index 75aa8d5..006784b 100644 --- a/programs/regedit/Pl.rc +++ b/programs/regedit/Pl.rc @@ -30,9 +30,9 @@ BEGIN BEGIN MENUITEM "Za&ko�cz", ID_REGISTRY_EXIT END - POPUP "&Help" + POPUP "&Pomoc" BEGIN - MENUITEM "&About ...", ID_HELP_ABOUT + MENUITEM "&O programie...", ID_HELP_ABOUT END END @@ -61,6 +61,7 @@ BEGIN MENUITEM "&Dana tekstowa", ID_EDIT_NEW_STRINGVALUE MENUITEM "&Dana binarna", ID_EDIT_NEW_BINARYVALUE MENUITEM "&Dana liczbowa (DWORD)",ID_EDIT_NEW_DWORDVALUE + MENUITEM "&Dana wielotekstowa (MULTISZ)",ID_EDIT_NEW_MULTI_STRINGVALUE END MENUITEM SEPARATOR MENUITEM "U&su�\tDel", ID_EDIT_DELETE @@ -111,6 +112,7 @@ BEGIN MENUITEM "&Dana tekstowa", ID_EDIT_NEW_STRINGVALUE MENUITEM "&Dana binarna", ID_EDIT_NEW_BINARYVALUE MENUITEM "&Dana liczbowa (DWORD)",ID_EDIT_NEW_DWORDVALUE + MENUITEM "&Dana wielotekstowa (MULTISZ)",ID_EDIT_NEW_MULTI_STRINGVALUE END MENUITEM SEPARATOR MENUITEM "U&su�\tDel", ID_EDIT_DELETE @@ -218,6 +220,19 @@ BEGIN PUSHBUTTON "Anuluj",IDCANCEL,175,80,30,11,WS_GROUP END +IDD_EDIT_MULTI_STRING DIALOG DISCARDABLE 22, 17, 210, 175 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Edycja danej wielotekstowej" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Nazwa:",IDC_STATIC,5,5,119,8 + EDITTEXT IDC_VALUE_NAME,5,15,200,12, WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL| WS_DISABLED + LTEXT "Warto��:",IDC_STATIC,5,30,119,8 + EDITTEXT IDC_VALUE_DATA,5,40,200,112, WS_BORDER | WS_TABSTOP | WS_HSCROLL | WS_VSCROLL | ES_MULTILINE | ES_WANTRETURN + DEFPUSHBUTTON "OK",IDOK,140,160,30,11,WS_GROUP + PUSHBUTTON "Anuluj",IDCANCEL,175,160,30,11,WS_GROUP +END + /* * String Table */ @@ -253,6 +268,7 @@ BEGIN ID_EDIT_NEW_STRINGVALUE "Dodaje now� dan� tekstow�" ID_EDIT_NEW_BINARYVALUE "Dodaje now� dan� binarn�" ID_EDIT_NEW_DWORDVALUE "Dodaje now� dan� liczbow�" + ID_EDIT_NEW_MULTI_STRINGVALUE "Dodaj now� dan� wielotekstow� (MULTISZ)" ID_REGISTRY_IMPORTREGISTRYFILE "Importuje plik tekstowy do rejestru" ID_REGISTRY_EXPORTREGISTRYFILE "Eksportuje cz�� lub ca�o�� rejestru do pliku tekstowego"
1
0
0
0
Mikołaj Zalewski : winecfg: Add Polish translation.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: 2f478c1bcc73bb7a26001ec4ccca67197cbc545c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f478c1bcc73bb7a26001ec4c…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Mon Apr 23 19:44:43 2007 +0200 winecfg: Add Polish translation. --- programs/winecfg/Pl.rc | 310 +++++++++++++++++++++++++++++++++++++++++++ programs/winecfg/winecfg.rc | 1 + 2 files changed, 311 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2f478c1bcc73bb7a26001…
1
0
0
0
appdb/. testResults.php
by WineHQ
24 Apr '07
24 Apr '07
ChangeSet ID: 31101 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner(a)winehq.org 2007/04/23 19:37:36 Removed files: . : testResults.php Log message: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Remove testResults.php, the file is unused Patch:
http://cvs.winehq.org/patch.py?id=31101
Old revision New revision Changes Path 1.29 Removed +0 -0 appdb/testResults.php Index: appdb/testResults.php diff -u -p appdb/testResults.php:1.29 /dev/null --- appdb/testResults.php 24 Apr 2007 0:37:36 -0000 +++ /dev/null 24 Apr 2007 0:37:36 -0000 @@ -1,164 +0,0 @@ -<?php -/**************************************************/ -/* code to submit, view and resubmit Test Results */ -/**************************************************/ - -require("path.php"); -require(BASE."include/incl.php"); -require_once(BASE."include/tableve.php"); -require_once(BASE."include/application.php"); -require_once(BASE."include/testData.php"); -require_once(BASE."include/distribution.php"); - -//deny access if not logged on -if(!$_SESSION['current']->isLoggedIn()) - util_show_error_page_and_exit("Insufficient privileges to create test results. Are you sure you are logged in?"); - - -if ($aClean['sSub']) -{ - $oTest = new testData($aClean['iTestingId']); - if($aClean['iVersionId']) - $oTest->iVersionId = $aClean['iVersionId']; - $errors = ""; - - // Submit or Resubmit the new test results - if (($aClean['sSub'] == 'Submit') || ($aClean['sSub'] == 'Resubmit')) - { - $errors = $oTest->CheckOutputEditorInput($aClean); - $oTest->GetOutputEditorValues($aClean); // retrieve the values from the current $aClean - if(empty($errors)) - { - if(!$aClean['iDistributionId']) - { - if(!empty($aClean['sDistribution']) ) - { - $oDistribution = new distribution(); - $oDistribution->sName = $aClean['sDistribution']; - $oDistribution->create(); - $oTest->iDistributionId = $oDistribution->iDistributionId; - } - } - if($aClean['sSub'] == 'Submit') - { - $oTest->create(); - } else if($aClean['sSub'] == 'Resubmit') - { - $oTest->update(true); - $oTest->ReQueue(); - } - util_redirect_and_exit($_SERVER['PHP_SELF']); - } else - { - $aClean['sSub'] = 'view'; - } - } - - // Delete test results - if ($aClean['sSub'] == 'Delete') - { - if($aClean['iTestingId']) - { - $oTest = new testData($aClean['iTestingId']); - $oTest->delete(); - } - - util_redirect_and_exit($_SERVER['PHP_SELF']); - } - - // is this an old test? - if($aClean['iTestingId']) - { - // make sure the user has permission to view this test result - $oVersion = new Version($oTest->iVersionId); - if(!$_SESSION['current']->hasPriv("admin") && - !$_SESSION['current']->hasAppVersionModifyPermission($oVersion)&& - !(($_SESSION['current']->iUserId == $oTest->iSubmitterId) && !($oTest->sQueued == 'false'))) - { - util_show_error_page_and_exit("Insufficient privileges."); - } else - { - $oVersion = new Version($oTest->iVersionId); - } - } else - { - $oTest->iVersionId = $aClean['iVersionId']; - $oVersion = new Version($aClean['iVersionId']); - $oTest->sQueued = "new"; - } - if ($aClean['sSub'] == 'view') - { - $sVersionInfo = version::fullName($oVersion->iVersionId); - - switch($oTest->sQueued) - { - case "new": - apidb_header("Submit new test results for ".$sVersionInfo); - $oTest->sTestedDate = date('Y-m-d H:i:s'); - break; - case "true": - apidb_header("Edit new test results for ".$sVersionInfo); - break; - case "rejected": - apidb_header("Resubmit test results for ".$sVersionInfo); - break; - case "False": - apidb_header("Edit test results for ".$sVersionInfo); - break; - default: - util_show_error_page_and_exit('$oTest->sQueued of \''.$oTest->sQueued."'is invalid"); - break; - } - echo '<form name="sQform" action="'.$_SERVER['PHP_SELF'].'" method="post" enctype="multipart/form-data">',"\n"; - - - //help - $oTest->objectDisplayAddItemHelp(); - - if(!empty($errors)) - { - echo '<font color="red">',"\n"; - echo '<p class="red"> We found the following errors:</p><ul>'.$errors.'</ul>Please correct them.'; - echo '</font><br />',"\n"; - echo '<p></p>',"\n"; - } - - // View Test Details - $oTest->outputEditor($aClean['sDistribution'],true); - - echo '<a href="'.$oVersion->objectMakeUrl().'">Back to Version</a>'; - - echo '<tr valign=top><td class=color3 align=center colspan=2>',"\n"; - - - // Submit Buttons - switch($oTest->sQueued) - { - case "new": - echo '<input name="sSub" type="submit" value="Submit" class="button" > ',"\n"; - break; - case "true": - case "rejected": - case "False": - echo '<input name="sSub" type="submit" value="Resubmit" class="button" > ',"\n"; - echo '<input name="sSub" type="submit" value="Delete" class="button" >',"\n"; - break; - } - echo '</td></tr>',"\n"; - echo "</form>"; - - echo html_frame_end(" "); - } - else - { - // error no sub! - addmsg("Internal Routine Not Found!!", "red"); - util_redirect_and_exit($_SERVER['PHP_SELF']); - } -} -else // if ($aClean['sSub']) is not defined, display the Testing results queue page -{ - util_show_error_page_and_exit("No test id defined!"); -} -apidb_footer(); -?>
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
69
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
Results per page:
10
25
50
100
200