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
October 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
1207 discussions
Start a n
N
ew thread
Nikolay Sivov : comctl32/monthcal: Fix a nice typo in test message.
by Alexandre Julliard
07 Oct '09
07 Oct '09
Module: wine Branch: master Commit: 9e75962ec51eeee9a3b6ff8e48a7beaf055203b2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9e75962ec51eeee9a3b6ff8e4…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Wed Oct 7 01:02:10 2009 +0400 comctl32/monthcal: Fix a nice typo in test message. --- dlls/comctl32/tests/monthcal.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c index 8234126..57142a6 100644 --- a/dlls/comctl32/tests/monthcal.c +++ b/dlls/comctl32/tests/monthcal.c @@ -383,7 +383,7 @@ static void test_monthcal(void) expect(1200, st[1].wMilliseconds); ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "No limits should be set\n"); - ok(st1[0].wYear != 2000, "Lover limit changed\n"); + ok(st1[0].wYear != 2000, "Lower limit changed\n"); /* invalid timestamp should be replaced with today data, except msecs */ expect(today.wHour, st1[1].wHour); expect(today.wMinute, st1[1].wMinute); @@ -407,10 +407,10 @@ static void test_monthcal(void) st[1].wMonth = 0; ok(!SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st), "Should have failed to set limits\n"); ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "No limits should be set\n"); - ok(st1[0].wYear != 2000, "Lover limit changed\n"); + ok(st1[0].wYear != 2000, "Lower limit changed\n"); ok(!SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Should have failed to set MAX limit\n"); ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "No limits should be set\n"); - ok(st1[0].wYear != 2000, "Lover limit changed\n"); + ok(st1[0].wYear != 2000, "Lower limit changed\n"); GetSystemTime(&st[0]); st[0].wDay = 20;
1
0
0
0
Nikolay Sivov : comctl32/monthcal: Use a timer to auto update today date memory.
by Alexandre Julliard
07 Oct '09
07 Oct '09
Module: wine Branch: master Commit: 6b5c6645b91922c846ab4df8b3835e95a824822a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6b5c6645b91922c846ab4df8b…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Wed Oct 7 00:58:22 2009 +0400 comctl32/monthcal: Use a timer to auto update today date memory. --- dlls/comctl32/monthcal.c | 67 ++++++++++++++++++++++++++++++++++++++------- 1 files changed, 56 insertions(+), 11 deletions(-) diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 34528f6..a2c7aaa 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -63,10 +63,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(monthcal); #define MC_SEL_LBUTDOWN 2 /* Left button pressed in calendar */ #define MC_PREVPRESSED 4 /* Prev month button pressed */ #define MC_NEXTPRESSED 8 /* Next month button pressed */ -#define MC_NEXTMONTHDELAY 350 /* when continuously pressing `next */ - /* month', wait 500 ms before going */ - /* to the next month */ +#define MC_PREVNEXTMONTHDELAY 350 /* when continuously pressing `next/prev + month', wait 500 ms before going + to the next/prev month */ +#define MC_TODAYUPDATEDELAY 120000 /* time between today check for update (2 min) */ + #define MC_PREVNEXTMONTHTIMER 1 /* Timer ID's */ +#define MC_TODAYUPDATETIMER 2 #define countof(arr) (sizeof(arr)/sizeof(arr[0])) @@ -98,6 +101,7 @@ typedef struct int monthRange; MONTHDAYSTATE *monthdayState; SYSTEMTIME todaysDate; + BOOL todaySet; /* Today was forced with MCM_SETTODAY */ int status; /* See MC_SEL flags */ SYSTEMTIME firstSel; /* first selected day */ INT maxSelCount; @@ -1380,22 +1384,46 @@ MONTHCAL_GetToday(const MONTHCAL_INFO *infoPtr, SYSTEMTIME *today) return TRUE; } +/* Internal helper for MCM_SETTODAY handler and auto update timer handler + * + * RETURN VALUE + * + * TRUE - today date changed + * FALSE - today date isn't changed + */ +static BOOL +MONTHCAL_UpdateToday(MONTHCAL_INFO *infoPtr, const SYSTEMTIME *today) +{ + RECT new_r, old_r; + + if(MONTHCAL_IsDateEqual(today, &infoPtr->todaysDate)) return FALSE; + MONTHCAL_CalcPosFromDay(infoPtr, infoPtr->todaysDate.wDay, + infoPtr->todaysDate.wMonth, &old_r); + MONTHCAL_CalcPosFromDay(infoPtr, today->wDay, today->wMonth, &new_r); + + infoPtr->todaysDate = *today; + + /* only two days need redrawing */ + InvalidateRect(infoPtr->hwndSelf, &old_r, FALSE); + InvalidateRect(infoPtr->hwndSelf, &new_r, FALSE); + return TRUE; +} + +/* MCM_SETTODAT handler */ static LRESULT -MONTHCAL_SetToday(MONTHCAL_INFO *infoPtr, SYSTEMTIME *today) +MONTHCAL_SetToday(MONTHCAL_INFO *infoPtr, const SYSTEMTIME *today) { TRACE("%p\n", today); if(!today) return FALSE; - if(MONTHCAL_IsDateEqual(today, &infoPtr->todaysDate)) return TRUE; + /* remember if date was set successfully */ + if(MONTHCAL_UpdateToday(infoPtr, today)) infoPtr->todaySet = TRUE; - infoPtr->todaysDate = *today; - InvalidateRect(infoPtr->hwndSelf, NULL, FALSE); return TRUE; } - static LRESULT MONTHCAL_HitTest(const MONTHCAL_INFO *infoPtr, MCHITTESTINFO *lpht) { @@ -1678,14 +1706,14 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam) case MCHT_TITLEBTNNEXT: MONTHCAL_GoToNextMonth(infoPtr); infoPtr->status = MC_NEXTPRESSED; - SetTimer(infoPtr->hwndSelf, MC_PREVNEXTMONTHTIMER, MC_NEXTMONTHDELAY, 0); + SetTimer(infoPtr->hwndSelf, MC_PREVNEXTMONTHTIMER, MC_PREVNEXTMONTHDELAY, 0); InvalidateRect(infoPtr->hwndSelf, NULL, FALSE); return 0; case MCHT_TITLEBTNPREV: MONTHCAL_GoToPrevMonth(infoPtr); infoPtr->status = MC_PREVPRESSED; - SetTimer(infoPtr->hwndSelf, MC_PREVNEXTMONTHTIMER, MC_NEXTMONTHDELAY, 0); + SetTimer(infoPtr->hwndSelf, MC_PREVNEXTMONTHTIMER, MC_PREVNEXTMONTHDELAY, 0); InvalidateRect(infoPtr->hwndSelf, NULL, FALSE); return 0; @@ -1834,6 +1862,20 @@ MONTHCAL_Timer(MONTHCAL_INFO *infoPtr, WPARAM id) if(infoPtr->status & MC_PREVPRESSED) MONTHCAL_GoToPrevMonth(infoPtr); InvalidateRect(infoPtr->hwndSelf, NULL, FALSE); break; + case MC_TODAYUPDATETIMER: + { + SYSTEMTIME st; + + if(infoPtr->todaySet) return 0; + + GetLocalTime(&st); + MONTHCAL_UpdateToday(infoPtr, &st); + + /* notification sent anyway */ + MONTHCAL_NotifySelectionChange(infoPtr); + + return 0; + } default: ERR("got unknown timer %ld\n", id); break; @@ -2211,7 +2253,10 @@ MONTHCAL_Create(HWND hwnd, LPCREATESTRUCTW lpcs) /* call MONTHCAL_UpdateSize to set all of the dimensions */ /* of the control */ MONTHCAL_UpdateSize(infoPtr); - + + /* today auto update timer, to be freed only on control destruction */ + SetTimer(infoPtr->hwndSelf, MC_TODAYUPDATETIMER, MC_TODAYUPDATEDELAY, 0); + OpenThemeData (infoPtr->hwndSelf, themeClass); return 0;
1
0
0
0
Nikolay Sivov : comctl32/monthcal: Use a single timer for auto month scroll with prev/next buttons.
by Alexandre Julliard
07 Oct '09
07 Oct '09
Module: wine Branch: master Commit: 70eb6c0385cf8e2c9cd2d9303a32bd20bdb5a57b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=70eb6c0385cf8e2c9cd2d9303…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Tue Oct 6 23:23:55 2009 +0400 comctl32/monthcal: Use a single timer for auto month scroll with prev/next buttons. --- dlls/comctl32/monthcal.c | 43 ++++++++++++++----------------------------- 1 files changed, 14 insertions(+), 29 deletions(-) diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 42710c0..34528f6 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -66,8 +66,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(monthcal); #define MC_NEXTMONTHDELAY 350 /* when continuously pressing `next */ /* month', wait 500 ms before going */ /* to the next month */ -#define MC_NEXTMONTHTIMER 1 /* Timer ID's */ -#define MC_PREVMONTHTIMER 2 +#define MC_PREVNEXTMONTHTIMER 1 /* Timer ID's */ #define countof(arr) (sizeof(arr)/sizeof(arr[0])) @@ -1679,14 +1678,14 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam) case MCHT_TITLEBTNNEXT: MONTHCAL_GoToNextMonth(infoPtr); infoPtr->status = MC_NEXTPRESSED; - SetTimer(infoPtr->hwndSelf, MC_NEXTMONTHTIMER, MC_NEXTMONTHDELAY, 0); + SetTimer(infoPtr->hwndSelf, MC_PREVNEXTMONTHTIMER, MC_NEXTMONTHDELAY, 0); InvalidateRect(infoPtr->hwndSelf, NULL, FALSE); return 0; case MCHT_TITLEBTNPREV: MONTHCAL_GoToPrevMonth(infoPtr); infoPtr->status = MC_PREVPRESSED; - SetTimer(infoPtr->hwndSelf, MC_PREVMONTHTIMER, MC_NEXTMONTHDELAY, 0); + SetTimer(infoPtr->hwndSelf, MC_PREVNEXTMONTHTIMER, MC_NEXTMONTHDELAY, 0); InvalidateRect(infoPtr->hwndSelf, NULL, FALSE); return 0; @@ -1767,14 +1766,9 @@ MONTHCAL_LButtonUp(MONTHCAL_INFO *infoPtr, LPARAM lParam) TRACE("\n"); - if(infoPtr->status & MC_NEXTPRESSED) { - KillTimer(infoPtr->hwndSelf, MC_NEXTMONTHTIMER); - infoPtr->status &= ~MC_NEXTPRESSED; - redraw = TRUE; - } - if(infoPtr->status & MC_PREVPRESSED) { - KillTimer(infoPtr->hwndSelf, MC_PREVMONTHTIMER); - infoPtr->status &= ~MC_PREVPRESSED; + if(infoPtr->status & (MC_PREVPRESSED | MC_NEXTPRESSED)) { + KillTimer(infoPtr->hwndSelf, MC_PREVNEXTMONTHTIMER); + infoPtr->status &= ~(MC_PREVPRESSED | MC_NEXTPRESSED); redraw = TRUE; } @@ -1830,30 +1824,21 @@ MONTHCAL_LButtonUp(MONTHCAL_INFO *infoPtr, LPARAM lParam) static LRESULT -MONTHCAL_Timer(MONTHCAL_INFO *infoPtr, WPARAM wParam) +MONTHCAL_Timer(MONTHCAL_INFO *infoPtr, WPARAM id) { - BOOL redraw = FALSE; - - TRACE("%ld\n", wParam); + TRACE("%ld\n", id); - switch(wParam) { - case MC_NEXTMONTHTIMER: - redraw = TRUE; - MONTHCAL_GoToNextMonth(infoPtr); - break; - case MC_PREVMONTHTIMER: - redraw = TRUE; - MONTHCAL_GoToPrevMonth(infoPtr); + switch(id) { + case MC_PREVNEXTMONTHTIMER: + if(infoPtr->status & MC_NEXTPRESSED) MONTHCAL_GoToNextMonth(infoPtr); + if(infoPtr->status & MC_PREVPRESSED) MONTHCAL_GoToPrevMonth(infoPtr); + InvalidateRect(infoPtr->hwndSelf, NULL, FALSE); break; default: - ERR("got unknown timer\n"); + ERR("got unknown timer %ld\n", id); break; } - /* redraw only if necessary */ - if(redraw) - InvalidateRect(infoPtr->hwndSelf, NULL, FALSE); - return 0; }
1
0
0
0
Jacek Caban : jscript: Call SetSite on created ActiveX object.
by Alexandre Julliard
07 Oct '09
07 Oct '09
Module: wine Branch: master Commit: 06f26f53f73636feebd97e6c94c6ca86b17d6336 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=06f26f53f73636feebd97e6c9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 6 21:23:14 2009 +0200 jscript: Call SetSite on created ActiveX object. --- dlls/jscript/activex.c | 13 +++++- dlls/jscript/jscript.c | 99 ++++++++++++++++++++++++++++++++++++++++++ dlls/jscript/jscript.h | 2 + dlls/jscript/tests/activex.c | 91 +++++++++++++++++++++++++++++++++++++- 4 files changed, 202 insertions(+), 3 deletions(-) diff --git a/dlls/jscript/activex.c b/dlls/jscript/activex.c index 027a2e2..8af4eb7 100644 --- a/dlls/jscript/activex.c +++ b/dlls/jscript/activex.c @@ -117,8 +117,19 @@ static IUnknown *create_activex_object(script_ctx_t *ctx, const WCHAR *progid) hres = IUnknown_QueryInterface(obj, &IID_IObjectWithSite, (void**)&obj_site); if(SUCCEEDED(hres)) { - FIXME("Set object site\n"); + IUnknown *ax_site; + + ax_site = create_ax_site(ctx); + if(ax_site) { + hres = IObjectWithSite_SetSite(obj_site, ax_site); + IUnknown_Release(ax_site); + } IObjectWithSite_Release(obj_site); + if(!ax_site || FAILED(hres)) { + IObjectWithSite_Release(obj_site); + IUnknown_Release(obj); + return NULL; + } } return obj; diff --git a/dlls/jscript/jscript.c b/dlls/jscript/jscript.c index 90a5b47..eb41835 100644 --- a/dlls/jscript/jscript.c +++ b/dlls/jscript/jscript.c @@ -159,6 +159,105 @@ static HRESULT set_ctx_site(JScript *This) return S_OK; } +typedef struct { + const IServiceProviderVtbl *lpIServiceProviderVtbl; + + LONG ref; + + IServiceProvider *sp; +} AXSite; + +#define SERVPROV(x) ((IServiceProvider*) &(x)->lpIServiceProviderVtbl) + +#define SERVPROV_THIS(iface) DEFINE_THIS(AXSite, IServiceProvider, iface) + +static HRESULT WINAPI AXSite_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv) +{ + AXSite *This = SERVPROV_THIS(iface); + + if(IsEqualGUID(&IID_IUnknown, riid)) { + TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); + *ppv = SERVPROV(This); + }else if(IsEqualGUID(&IID_IServiceProvider, riid)) { + TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv); + *ppv = SERVPROV(This); + }else { + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI AXSite_AddRef(IServiceProvider *iface) +{ + AXSite *This = SERVPROV_THIS(iface); + LONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + return ref; +} + +static ULONG WINAPI AXSite_Release(IServiceProvider *iface) +{ + AXSite *This = SERVPROV_THIS(iface); + LONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + if(!ref) + heap_free(This); + + return ref; +} + +static HRESULT WINAPI AXSite_QueryService(IServiceProvider *iface, + REFGUID guidService, REFIID riid, void **ppv) +{ + AXSite *This = SERVPROV_THIS(iface); + + TRACE("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv); + + return IServiceProvider_QueryService(This->sp, guidService, riid, ppv); +} + +#undef SERVPROV_THIS + +static IServiceProviderVtbl AXSiteVtbl = { + AXSite_QueryInterface, + AXSite_AddRef, + AXSite_Release, + AXSite_QueryService +}; + +IUnknown *create_ax_site(script_ctx_t *ctx) +{ + IServiceProvider *sp; + AXSite *ret; + HRESULT hres; + + hres = IActiveScriptSite_QueryInterface(ctx->site, &IID_IServiceProvider, (void**)&sp); + if(FAILED(hres)) { + ERR("Could not get IServiceProvider iface: %08x\n", hres); + return NULL; + } + + ret = heap_alloc(sizeof(AXSite)); + if(!ret) { + IServiceProvider_Release(sp); + return NULL; + } + + ret->lpIServiceProviderVtbl = &AXSiteVtbl; + ret->ref = 1; + ret->sp = sp; + + return (IUnknown*)SERVPROV(ret); +} + #define ACTSCRIPT_THIS(iface) DEFINE_THIS(JScript, IActiveScript, iface) static HRESULT WINAPI JScript_QueryInterface(IActiveScript *iface, REFIID riid, void **ppv) diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 4451669..cde1e1b 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -309,6 +309,8 @@ HRESULT create_object_constr(script_ctx_t*,DispatchEx*,DispatchEx**); HRESULT create_regexp_constr(script_ctx_t*,DispatchEx*,DispatchEx**); HRESULT create_string_constr(script_ctx_t*,DispatchEx*,DispatchEx**); +IUnknown *create_ax_site(script_ctx_t*); + typedef struct { const WCHAR *str; DWORD len; diff --git a/dlls/jscript/tests/activex.c b/dlls/jscript/tests/activex.c index cd7b5a0..4826910 100644 --- a/dlls/jscript/tests/activex.c +++ b/dlls/jscript/tests/activex.c @@ -67,6 +67,7 @@ DEFINE_EXPECT(reportSuccess); DEFINE_EXPECT(Host_QS_SecMgr); DEFINE_EXPECT(Caller_QS_SecMgr); DEFINE_EXPECT(QI_IObjectWithSite); +DEFINE_EXPECT(SetSite); static const WCHAR testW[] = {'t','e','s','t',0}; @@ -78,6 +79,7 @@ static HRESULT QueryCustomPolicy_hres; static DWORD QueryCustomPolicy_psize; static DWORD QueryCustomPolicy_policy; static HRESULT QI_IDispatch_hres; +static HRESULT SetSite_hres; #define TESTOBJ_CLSID "{178fc163-f585-4e24-9c13-4bb7faf80646}" @@ -123,6 +125,56 @@ static int strcmp_wa(LPCWSTR strw, const char *stra) return lstrcmpA(buf, stra); } +static HRESULT WINAPI ObjectWithSite_QueryInterface(IObjectWithSite *iface, REFIID riid, void **ppv) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static ULONG WINAPI ObjectWithSite_AddRef(IObjectWithSite *iface) +{ + return 2; +} + +static ULONG WINAPI ObjectWithSite_Release(IObjectWithSite *iface) +{ + return 1; +} + +static HRESULT WINAPI ObjectWithSite_SetSite(IObjectWithSite *iface, IUnknown *pUnkSite) +{ + IServiceProvider *sp; + HRESULT hres; + + + CHECK_EXPECT(SetSite); + ok(pUnkSite != NULL, "pUnkSite == NULL\n"); + + hres = IUnknown_QueryInterface(pUnkSite, &IID_IServiceProvider, (void**)&sp); + ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres); + IServiceProvider_Release(sp); + + return SetSite_hres; +} + +static HRESULT WINAPI ObjectWithSite_GetSite(IObjectWithSite *iface, REFIID riid, void **ppvSite) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static const IObjectWithSiteVtbl ObjectWithSiteVtbl = { + ObjectWithSite_QueryInterface, + ObjectWithSite_AddRef, + ObjectWithSite_Release, + ObjectWithSite_SetSite, + ObjectWithSite_GetSite +}; + +static IObjectWithSite ObjectWithSite = { &ObjectWithSiteVtbl }; + +static IObjectWithSite *object_with_site; + static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) { *ppv = NULL; @@ -135,12 +187,12 @@ static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, *ppv = iface; }else if(IsEqualGUID(&IID_IObjectWithSite, riid)) { CHECK_EXPECT(QI_IObjectWithSite); - return E_NOINTERFACE; + *ppv = object_with_site; }else { return E_NOINTERFACE; } - return S_OK; + return *ppv ? S_OK : E_NOINTERFACE; } static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface) @@ -663,6 +715,7 @@ static IActiveScriptParse *create_script(void) QueryCustomPolicy_psize = sizeof(DWORD); QueryCustomPolicy_policy = URLPOLICY_ALLOW; QI_IDispatch_hres = S_OK; + SetSite_hres = S_OK; hres = CoCreateInstance(&CLSID_JScript, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IActiveScript, (void**)&script); @@ -925,6 +978,40 @@ static void test_ActiveXObject(void) CHECK_CALLED(QueryCustomPolicy); IUnknown_Release(parser); + + parser = create_script(); + object_with_site = &ObjectWithSite; + + SET_EXPECT(Host_QS_SecMgr); + SET_EXPECT(ProcessUrlAction); + SET_EXPECT(CreateInstance); + SET_EXPECT(QueryCustomPolicy); + SET_EXPECT(QI_IObjectWithSite); + SET_EXPECT(SetSite); + SET_EXPECT(reportSuccess); + parse_script_a(parser, "(new ActiveXObject('Wine.Test')).reportSuccess();"); + CHECK_CALLED(Host_QS_SecMgr); + CHECK_CALLED(ProcessUrlAction); + CHECK_CALLED(CreateInstance); + CHECK_CALLED(QueryCustomPolicy); + CHECK_CALLED(QI_IObjectWithSite); + CHECK_CALLED(SetSite); + CHECK_CALLED(reportSuccess); + + SetSite_hres = E_FAIL; + SET_EXPECT(ProcessUrlAction); + SET_EXPECT(CreateInstance); + SET_EXPECT(QueryCustomPolicy); + SET_EXPECT(QI_IObjectWithSite); + SET_EXPECT(SetSite); + parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);"); + CHECK_CALLED(ProcessUrlAction); + CHECK_CALLED(CreateInstance); + CHECK_CALLED(QueryCustomPolicy); + CHECK_CALLED(QI_IObjectWithSite); + CHECK_CALLED(SetSite); + + IUnknown_Release(parser); } static BOOL init_key(const char *key_name, const char *def_value, BOOL init)
1
0
0
0
Damjan Jovanovic : sti: Allow CoCreateInstance aggregation and fix a broken test.
by Alexandre Julliard
07 Oct '09
07 Oct '09
Module: wine Branch: master Commit: 0dea7326c333078e02b99d618002f1d21e0244b8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0dea7326c333078e02b99d618…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Tue Oct 6 19:15:40 2009 +0200 sti: Allow CoCreateInstance aggregation and fix a broken test. --- dlls/sti/sti_main.c | 3 --- dlls/sti/tests/sti.c | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dlls/sti/sti_main.c b/dlls/sti/sti_main.c index 15c946d..4e91698 100644 --- a/dlls/sti/sti_main.c +++ b/dlls/sti/sti_main.c @@ -97,9 +97,6 @@ static HRESULT WINAPI sti_cf_CreateInstance( IClassFactory *iface, LPUNKNOWN pOu *ppobj = NULL; - if (pOuter) - return CLASS_E_NOAGGREGATION; - r = This->pfnCreateInstance( riid, pOuter, (LPVOID *)&punk ); if (FAILED(r)) return r; diff --git a/dlls/sti/tests/sti.c b/dlls/sti/tests/sti.c index 9a1aeee..0575d29 100644 --- a/dlls/sti/tests/sti.c +++ b/dlls/sti/tests/sti.c @@ -218,7 +218,9 @@ static void test_stillimage_aggregation(void) if (SUCCEEDED(hr)) IStillImage_Release(pStiW); hr = CoCreateInstance(&CLSID_Sti, &aggregator, CLSCTX_ALL, &IID_IUnknown, (void**)&pUnknown); - ok(FAILED(hr), "CoCreateInstance unexpectedly succeeded when querying for IUnknown during aggregation\n"); + ok(SUCCEEDED(hr) || + broken(hr == CLASS_E_NOAGGREGATION), /* Win 2000 */ + "CoCreateInstance unexpectedly failed when querying for IUnknown during aggregation, hr = 0x%x\n", hr); if (SUCCEEDED(hr)) IUnknown_Release(pUnknown); }
1
0
0
0
Aurimas Fišeras : jscript: Update Lithuanian translation.
by Alexandre Julliard
07 Oct '09
07 Oct '09
Module: wine Branch: master Commit: 50b8c47d197661fdff85e6c2a9cd9895d3c9de8e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=50b8c47d197661fdff85e6c2a…
Author: Aurimas Fišeras <aurimas(a)gmail.com> Date: Tue Oct 6 18:53:15 2009 +0300 jscript: Update Lithuanian translation. --- dlls/jscript/jscript_Lt.rc | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/jscript/jscript_Lt.rc b/dlls/jscript/jscript_Lt.rc index 83c0680..4d39895 100644 --- a/dlls/jscript/jscript_Lt.rc +++ b/dlls/jscript/jscript_Lt.rc @@ -27,6 +27,7 @@ STRINGTABLE DISCARDABLE { IDS_TO_PRIMITIVE "Klaida keičiant objektą į primityvų tipą" IDS_INVALID_CALL_ARG "Netinkamas kreipinys į procedūrą ar argumentas" + IDS_CREATE_OBJ_ERROR "Automatizacijos serveriui nepavyko sukurti objekto" IDS_NO_PROPERTY "Objektas nepalaiko šios savybės ar metodo" IDS_ARG_NOT_OPT "Argumentas nėra neprivalomas" IDS_SYNTAX_ERROR "Sintaksės klaida"
1
0
0
0
Aric Stewart : comctl32/tests: LISTVIEW_ApproximateViewRect tests for LV_VIEW_ICON.
by Alexandre Julliard
07 Oct '09
07 Oct '09
Module: wine Branch: master Commit: c885bd16c7be1d40007f68cae259dba6dc293872 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c885bd16c7be1d40007f68cae…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon Oct 5 20:42:08 2009 -0500 comctl32/tests: LISTVIEW_ApproximateViewRect tests for LV_VIEW_ICON. --- dlls/comctl32/tests/listview.c | 75 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 75 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 31b09a3..c9551a1 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -4021,6 +4021,80 @@ static void test_LVS_EX_TRANSPARENTBKGND(void) DestroyWindow(hwnd); } +void test_ApproximateViewRect(void) +{ + HWND hwnd; + DWORD ret; + INT cx, cy; + HIMAGELIST himl; + HBITMAP hbmp; + LVITEMA itema; + static CHAR test[] = "abracadabra, a very long item label"; + + cx = GetSystemMetrics(SM_CXICONSPACING) - GetSystemMetrics(SM_CXICON); + cy = GetSystemMetrics(SM_CYICONSPACING) - GetSystemMetrics(SM_CYICON); + + hwnd = create_custom_listview_control(LVS_ICON); + himl = ImageList_Create(40, 40, 0, 4, 4); + ok(himl != NULL, "failed to create imagelist\n"); + hbmp = CreateBitmap(40, 40, 1, 1, NULL); + ok(hbmp != NULL, "failed to create bitmap\n"); + ret = ImageList_Add(himl, hbmp, 0); + expect(0, ret); + ret = SendMessage(hwnd, LVM_SETIMAGELIST, 0, (LPARAM)himl); + expect(0, ret); + + itema.mask = LVIF_IMAGE; + itema.iImage = 0; + itema.iItem = 0; + itema.iSubItem = 0; + ret = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM)&itema); + expect(0, ret); + + ret = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(75, 75)); + if (ret == 0) + { + /* version 4.0 */ + win_skip("LVM_SETICONSPACING unimplemented. Skipping.\n"); + return; + } + + ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 11, MAKELPARAM(100,100)); + ok(MAKELONG(77,827)==ret,"Incorrect Approximate rect\n"); + + ret = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(50, 50)); + ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 11, MAKELPARAM(100,100)); + ok(MAKELONG(102,302)==ret,"Incorrect Approximate rect\n"); + + ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, -1, MAKELPARAM(100,100)); + ok(MAKELONG(52,52)==ret,"Incorrect Approximate rect\n"); + + itema.pszText = test; + ret = SendMessage(hwnd, LVM_SETITEMTEXT, 0, (LPARAM)&itema); + expect(TRUE, ret); + ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, -1, MAKELPARAM(100,100)); + ok(MAKELONG(52,52)==ret,"Incorrect Approximate rect\n"); + + ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 0, MAKELPARAM(100,100)); + ok(MAKELONG(52,2)==ret,"Incorrect Approximate rect\n"); + ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 1, MAKELPARAM(100,100)); + ok(MAKELONG(52,52)==ret,"Incorrect Approximate rect\n"); + ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 2, MAKELPARAM(100,100)); + ok(MAKELONG(102,52)==ret,"Incorrect Approximate rect\n"); + ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 3, MAKELPARAM(100,100)); + ok(MAKELONG(102,102)==ret,"Incorrect Approximate rect\n"); + ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 4, MAKELPARAM(100,100)); + ok(MAKELONG(102,102)==ret,"Incorrect Approximate rect\n"); + ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 5, MAKELPARAM(100,100)); + ok(MAKELONG(102,152)==ret,"Incorrect Approximate rect\n"); + ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 6, MAKELPARAM(100,100)); + ok(MAKELONG(102,152)==ret,"Incorrect Approximate rect\n"); + ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 7, MAKELPARAM(160,100)); + ok(MAKELONG(152,152)==ret,"Incorrect Approximate rect\n"); + + DestroyWindow(hwnd); +} + START_TEST(listview) { HMODULE hComctl32; @@ -4077,6 +4151,7 @@ START_TEST(listview) test_indentation(); test_getitemspacing(); test_getcolumnwidth(); + test_ApproximateViewRect(); if (!load_v6_module(&ctx_cookie)) {
1
0
0
0
Aric Stewart : comctl32: Implement LISTVIEW_ApproximateViewRect for icon.
by Alexandre Julliard
07 Oct '09
07 Oct '09
Module: wine Branch: master Commit: 8e8c5130f7a4eecaa185137f2ed5f842c4d53f42 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8e8c5130f7a4eecaa185137f2…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon Oct 5 20:41:43 2009 -0500 comctl32: Implement LISTVIEW_ApproximateViewRect for icon. --- dlls/comctl32/listview.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 files changed, 38 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 2f30e9a..e1e8f96 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -4857,10 +4857,46 @@ static DWORD LISTVIEW_ApproximateViewRect(const LISTVIEW_INFO *infoPtr, INT nIte dwViewRect = MAKELONG(wWidth, wHeight); } + else if (infoPtr->uView == LV_VIEW_ICON) + { + UINT rows,cols; + UINT nItemWidth; + UINT nItemHeight; + + nItemWidth = infoPtr->iconSpacing.cx; + nItemHeight = infoPtr->iconSpacing.cy; + + if (nItemCount == -1) + nItemCount = infoPtr->nItemCount; + + if (wWidth == 0xffff) + wWidth = infoPtr->rcList.right - infoPtr->rcList.left; + + if (wWidth < nItemWidth) + wWidth = nItemWidth; + + cols = wWidth / nItemWidth; + if (cols > nItemCount) + cols = nItemCount; + if (cols < 1) + cols = 1; + + if (nItemCount) + { + rows = nItemCount / cols; + if (nItemCount % cols) + rows++; + } + else + rows = 0; + + wHeight = (nItemHeight * rows)+2; + wWidth = (nItemWidth * cols)+2; + + dwViewRect = MAKELONG(wWidth, wHeight); + } else if (infoPtr->uView == LV_VIEW_SMALLICON) FIXME("uView == LV_VIEW_SMALLICON: not implemented\n"); - else if (infoPtr->uView == LV_VIEW_ICON) - FIXME("uView == LV_VIEW_ICON: not implemented\n"); return dwViewRect; }
1
0
0
0
Alexandre Julliard : T-shirts announcement.
by Alexandre Julliard
06 Oct '09
06 Oct '09
Module: website Branch: master Commit: 16de2d5363fb3c91776003ac69f34811251c0d4a URL:
http://source.winehq.org/git/website.git/?a=commit;h=16de2d5363fb3c91776003…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 6 18:05:21 2009 +0200 T-shirts announcement. --- news/en/2009100601.xml | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/news/en/2009100601.xml b/news/en/2009100601.xml new file mode 100644 index 0000000..6483ab1 --- /dev/null +++ b/news/en/2009100601.xml @@ -0,0 +1,9 @@ +<news> +<date>October 6, 2009</date> +<title>Wine T-Shirts Available</title> +<body> +<p><a href="
http://www.freewear.org
">
FreeWear.org
</a> recently +<a href="
http://www.winehq.org/pipermail/wine-devel/2009-September/078366.html
">announced</a> +their first <a href="
http://www.freewear.org/?page=list_items&org=Wine
">Wine T-shirt</a>. +For each T-shirt sold they will donate 3€ to the Wine project. +</p></body></news>
1
0
0
0
Alexandre Julliard : advapi32: Retrieve the current user SID from the server in lookup_user_account_name.
by Alexandre Julliard
06 Oct '09
06 Oct '09
Module: wine Branch: master Commit: 07ec73fcaa80c754591e13e02bccff06fee742fc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=07ec73fcaa80c754591e13e02…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 6 16:49:22 2009 +0200 advapi32: Retrieve the current user SID from the server in lookup_user_account_name. --- dlls/advapi32/security.c | 30 +++++++++++++----------------- 1 files changed, 13 insertions(+), 17 deletions(-) diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index 9bb76d5..bff68a3 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -2555,30 +2555,28 @@ LookupAccountNameA( static BOOL lookup_user_account_name(PSID Sid, PDWORD cbSid, LPWSTR ReferencedDomainName, LPDWORD cchReferencedDomainName, PSID_NAME_USE peUse ) { - /* Default implementation: Always return a default SID */ - SID_IDENTIFIER_AUTHORITY identifierAuthority = {SECURITY_NT_AUTHORITY}; + char buffer[sizeof(TOKEN_USER) + sizeof(SID) + sizeof(DWORD)*SID_MAX_SUB_AUTHORITIES]; + DWORD len = sizeof(buffer); + HANDLE token; BOOL ret; PSID pSid; static const WCHAR dm[] = {'D','O','M','A','I','N',0}; DWORD nameLen; LPCWSTR domainName; - ret = AllocateAndInitializeSid(&identifierAuthority, - 2, - SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_ADMINS, - 0, 0, 0, 0, 0, 0, - &pSid); - - if (!ret) - return FALSE; - - if (!RtlValidSid(pSid)) + if (!OpenThreadToken(GetCurrentThread(), TOKEN_READ, TRUE, &token)) { - FreeSid(pSid); - return FALSE; + if (GetLastError() != ERROR_NO_TOKEN) return FALSE; + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &token)) return FALSE; } + ret = GetTokenInformation(token, TokenUser, buffer, len, &len); + CloseHandle( token ); + + if (!ret) return FALSE; + + pSid = ((TOKEN_USER *)buffer)->User.Sid; + if (Sid != NULL && (*cbSid >= GetLengthSid(pSid))) CopySid(*cbSid, Sid, pSid); if (*cbSid < GetLengthSid(pSid)) @@ -2605,8 +2603,6 @@ static BOOL lookup_user_account_name(PSID Sid, PDWORD cbSid, LPWSTR ReferencedDo if (ret) *peUse = SidTypeUser; - FreeSid(pSid); - return ret; }
1
0
0
0
← Newer
1
...
93
94
95
96
97
98
99
...
121
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Results per page:
10
25
50
100
200