ReactOS.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
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
List overview
Download
Ros-diffs
November 2007
----- 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
ros-diffs@reactos.org
20 participants
888 discussions
Start a n
N
ew thread
[janderwald] 30039: - fix a bug in IntGetMenuDefaultItem
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Nov 1 17:20:43 2007 New Revision: 30039 URL:
http://svn.reactos.org/svn/reactos?rev=30039&view=rev
Log: - fix a bug in IntGetMenuDefaultItem Modified: trunk/reactos/subsystems/win32/win32k/ntuser/menu.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/menu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/menu.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/menu.c Thu Nov 1 17:20:43 2007 @@ -1262,7 +1262,7 @@ if(!(gmdiFlags & GMDI_USEDISABLED) && (MenuItem->fState & MFS_DISABLED)) break; - if(fByPos & MF_BYPOSITION) + if(fByPos) res = x; else res = MenuItem->wID;
17 years, 1 month
1
0
0
0
[janderwald] 30038: - silence debug
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Nov 1 16:35:30 2007 New Revision: 30038 URL:
http://svn.reactos.org/svn/reactos?rev=30038&view=rev
Log: - silence debug Modified: trunk/reactos/dll/win32/shell32/she_ocmenu.c Modified: trunk/reactos/dll/win32/shell32/she_ocmenu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/she_ocme…
============================================================================== --- trunk/reactos/dll/win32/shell32/she_ocmenu.c (original) +++ trunk/reactos/dll/win32/shell32/she_ocmenu.c Thu Nov 1 16:35:30 2007 @@ -23,7 +23,7 @@ #define COBJMACROS #define NONAMELESSUNION #define NONAMELESSSTRUCT -#define YDEBUG +//#define YDEBUG #include "winerror.h" #include "wine/debug.h"
17 years, 1 month
1
0
0
0
[janderwald] 30037: - dont show Open With shell extension when a selected item is a folder or a shortcut - add the "explore" verb only if folder has a subfolder - always add open verb
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Nov 1 16:33:18 2007 New Revision: 30037 URL:
http://svn.reactos.org/svn/reactos?rev=30037&view=rev
Log: - dont show Open With shell extension when a selected item is a folder or a shortcut - add the "explore" verb only if folder has a subfolder - always add open verb Modified: trunk/reactos/dll/win32/shell32/she_ocmenu.c trunk/reactos/dll/win32/shell32/shv_item_cmenu.c Modified: trunk/reactos/dll/win32/shell32/she_ocmenu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/she_ocme…
============================================================================== --- trunk/reactos/dll/win32/shell32/she_ocmenu.c (original) +++ trunk/reactos/dll/win32/shell32/she_ocmenu.c Thu Nov 1 16:33:18 2007 @@ -23,7 +23,7 @@ #define COBJMACROS #define NONAMELESSUNION #define NONAMELESSSTRUCT -//#define YDEBUG +#define YDEBUG #include "winerror.h" #include "wine/debug.h" @@ -588,6 +588,7 @@ LPCITEMIDLIST pidl; WCHAR szPath[MAX_PATH]; LPWSTR szPtr; + static const WCHAR szShortCut[] = { '.','l','n','k', 0 }; fmt.cfFormat = RegisterClipboardFormatA(CFSTR_SHELLIDLIST); fmt.ptd = NULL; @@ -619,11 +620,18 @@ ERR("no mem\n"); return E_OUTOFMEMORY; } + if (_ILIsFolder(pidl_child)) + { + TRACE("pidl is a folder\n"); + SHFree(pidl); + return E_FAIL; + } + if (!SHGetPathFromIDListW(pidl, szPath)) { SHFree(pidl); ERR("SHGetPathFromIDListW failed\n"); - return FALSE; + return E_FAIL; } SHFree(pidl); @@ -632,6 +640,12 @@ szPtr = wcschr(szPath, '.'); if (szPtr) { + if (!_wcsicmp(szPtr, szShortCut)) + { + TRACE("pidl is a shortcut\n"); + return E_FAIL; + } + SHEOW_LoadItemFromHKCU(This, szPtr); SHEOW_LoadItemFromHKCR(This, szPtr); } Modified: trunk/reactos/dll/win32/shell32/shv_item_cmenu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_item…
============================================================================== --- trunk/reactos/dll/win32/shell32/shv_item_cmenu.c (original) +++ trunk/reactos/dll/win32/shell32/shv_item_cmenu.c Thu Nov 1 16:33:18 2007 @@ -382,19 +382,18 @@ _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_OPEN, MFT_STRING, "&Select", MFS_ENABLED); TRACE("rfg %x\n", This->rfg); - if (This->rfg & SFGAO_BROWSABLE) + + if (This->rfg & SFGAO_HASSUBFOLDER) { - if(This->bAllValues) - { - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_OPEN, MFT_STRING, "&Open", MFS_ENABLED); - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_EXPLORE, MFT_STRING, "&Explore", MFS_ENABLED); - } - else - { - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_EXPLORE, MFT_STRING, "&Explore", MFS_ENABLED); - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_OPEN, MFT_STRING, "&Open", MFS_ENABLED); - } + /* FIXME + * check if folder hasnt already been extended + * use reduce verb then + */ + + _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_EXPLORE, MFT_STRING, "&Explore", MFS_ENABLED); } + + _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_OPEN, MFT_STRING, "&Open", MFS_ENABLED); SetMenuDefaultItem(hmenu, 0, MF_BYPOSITION); @@ -669,7 +668,7 @@ HRESULT DoShellExtensions(ItemCmImpl *This, LPCMINVOKECOMMANDINFO lpcmi) { - HRESULT hResult; + HRESULT hResult = NOERROR; UINT i; TRACE("DoShellExtensions %p verb %x count %u\n",This, LOWORD(lpcmi->lpVerb), This->ecount); @@ -679,9 +678,12 @@ hResult = cmenu->lpVtbl->InvokeCommand(cmenu, lpcmi); if (SUCCEEDED(hResult)) - return hResult; - } - return NOERROR; + { + break; + } + } + TRACE("DoShellExtensions result %x\n", hResult); + return hResult; } @@ -873,7 +875,7 @@ cmobj->lpVtbl->Release(cmobj); return FALSE; } - hr = shext->lpVtbl->Initialize(shext, pidlFolder, pDataObj, hKey); + hr = shext->lpVtbl->Initialize(shext, NULL, pDataObj, hKey); if (hr != S_OK) { TRACE("Failed to initialize shell extension\n");
17 years, 1 month
1
0
0
0
[dreimer] 30036: Remove cut and grep dependency from config. byebye for two other external tools. Still TBD : SED
by dreimer@svn.reactos.org
Author: dreimer Date: Thu Nov 1 16:30:03 2007 New Revision: 30036 URL:
http://svn.reactos.org/svn/reactos?rev=30036&view=rev
Log: Remove cut and grep dependency from config. byebye for two other external tools. Still TBD : SED Modified: trunk/tools/RosBE-Windows/Root/Config.cmd Modified: trunk/tools/RosBE-Windows/Root/Config.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/Config.cm…
============================================================================== --- trunk/tools/RosBE-Windows/Root/Config.cmd (original) +++ trunk/tools/RosBE-Windows/Root/Config.cmd Thu Nov 1 16:30:03 2007 @@ -106,8 +106,9 @@ echo Sub-Architecture to build for. echo Default is: none echo. -echo Right now: -grep \"SARCH\" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d "\"" -f 4 +for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "SARCH" | find "property name""`) do set SARCH=%%i +set SARCH=%SARCH:~7,-1% +echo Right now: %SARCH% set /p X="(), (xbox)" sed "s/\"SARCH\" value=\"\"/\"SARCH\" value=\"%X%\"/g;s/\"SARCH\" value=\"xbox\"/\"SARCH\" value=\"%X%\"/g" "%_ROSBE_BASEDIR%\config.rbuild" > "%TEMP%\config2.rbuild" cls @@ -119,8 +120,9 @@ echo See GCC manual for more CPU names and which CPUs GCC can optimize for. echo Default is: pentium echo. -echo Right now: -grep \"OARCH\" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d "\"" -f 4 +for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "OARCH" | find "property name""`) do set OARCH=%%i +set OARCH=%OARCH:~7,-1% +echo Right now: %OARCH% set /p XX= if "%XX%" == "" ( set XX=pentium @@ -135,8 +137,9 @@ echo official release builds and debug builds. echo warning : 2,3,4,5 is not tested on ReactOS. Change at own risk. echo. -echo Right now: -grep \"OPTIMIZE\" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d "\"" -f 4 +for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "OPTIMIZE" | find "property name""`) do set OPTIMIZE=%%i +set OPTIMIZE=%OPTIMIZE:~7,-1% +echo Right now: %OPTIMIZE% set /p Y="(0), (1), (2), (3), (4), (5)" if "%Y%" == "" ( set Y=1 @@ -147,8 +150,9 @@ echo Whether to compile for an uniprocessor or multiprocessor machine. echo Default is: 0 echo. -echo Right now: -grep \"MP\" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d "\"" -f 4 +for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "MP" | find "property name""`) do set MP=%%i +set MP=%MP:~7,-1% +echo Right now: %MP% set /p Z="(0), (1)" if "%Z%" == "" ( set Z=0 @@ -159,8 +163,9 @@ echo Whether to compile in the integrated kernel debugger. echo Default is: 0 echo. -echo Right now: -grep \"KDBG\" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d "\"" -f 4 +for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "KDBG" | find "property name""`) do set KDBG=%%i +set KDBG=%KDBG:~7,-1% +echo Right now: %KDBG% set /p A="(0), (1)" if "%A%" == "" ( set A=0 @@ -172,8 +177,9 @@ echo performed. echo Default is: 1 echo. -echo Right now: -grep \"DBG\" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d "\"" -f 4 +for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "DBG" | find "property name" | find /V "KDBG""`) do set DBG=%%i +set DBG=%DBG:~7,-1% +echo Right now: %DBG% set /p B="(0), (1)" if "%B%" == "" ( set B=1 @@ -185,8 +191,9 @@ echo don't enable this. echo Default is: 0 echo. -echo Right now: -grep \"GDB\" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d "\"" -f 4 +for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "GDB" | find "property name""`) do set GDB=%%i +set GDB=%GDB:~7,-1% +echo Right now: %GDB% set /p C="(0), (1)" if "%C%" == "" ( set C=0 @@ -200,8 +207,9 @@ echo from the patent owner). echo Default is: 0 echo. -echo Right now: -grep \"NSWPAT\" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d "\"" -f 4 +for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "NSWPAT" | find "property name""`) do set NSWPAT=%%i +set NSWPAT=%NSWPAT:~7,-1% +echo Right now: %NSWPAT% set /p D="(0), (1)" if "%D%" == "" ( set D=0 @@ -217,8 +225,9 @@ echo unless you know what you're doing. echo Default is: 0 echo. -echo Right now: -grep \"_WINKD_\" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d "\"" -f 4 +for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "_WINKD_" | find "property name""`) do set WINKD=%%i +set WINKD=%WINKD:~7,-1% +echo Right now: %WINKD% set /p F="(0), (1)" if "%F%" == "" ( set F=0
17 years, 1 month
1
0
0
0
[ekohl] 30035: Expand an environment variable only if its value got at least two percent characters.
by ekohl@svn.reactos.org
Author: ekohl Date: Thu Nov 1 14:45:14 2007 New Revision: 30035 URL:
http://svn.reactos.org/svn/reactos?rev=30035&view=rev
Log: Expand an environment variable only if its value got at least two percent characters. Modified: trunk/reactos/dll/cpl/sysdm/environment.c Modified: trunk/reactos/dll/cpl/sysdm/environment.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/environment.…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/environment.c (original) +++ trunk/reactos/dll/cpl/sysdm/environment.c Thu Nov 1 14:45:14 2007 @@ -56,6 +56,8 @@ dwValueLength = (DWORD)SendDlgItemMessage(hwndDlg, IDC_VARIABLE_VALUE, WM_GETTEXTLENGTH, 0, 0); if (dwNameLength > 0 && dwValueLength > 0) { + LPTSTR p; + if (VarData->lpName == NULL) { VarData->lpName = GlobalAlloc(GPTR, (dwNameLength + 1) * sizeof(TCHAR)); @@ -84,7 +86,8 @@ VarData->lpCookedValue = NULL; } - if (_tcschr(VarData->lpRawValue, _T('%'))) + p = _tcschr(VarData->lpRawValue, _T('%')); + if (p && _tcschr(++p, _T('%'))) { VarData->dwType = REG_EXPAND_SZ; VarData->lpCookedValue = GlobalAlloc(GPTR, 2 * MAX_PATH * sizeof(TCHAR)); @@ -115,7 +118,7 @@ static VOID -SetEnvironmentVariables(HWND hwndListView, +GetEnvironmentVariables(HWND hwndListView, HKEY hRootKey, LPTSTR lpSubKeyName) { @@ -276,7 +279,7 @@ SetListViewColumns(hwndListView); - SetEnvironmentVariables(hwndListView, + GetEnvironmentVariables(hwndListView, HKEY_CURRENT_USER, _T("Environment")); @@ -294,7 +297,7 @@ SetListViewColumns(hwndListView); - SetEnvironmentVariables(hwndListView, + GetEnvironmentVariables(hwndListView, HKEY_LOCAL_MACHINE, _T("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment"));
17 years, 1 month
1
0
0
0
[gedmurphy] 30034: Don't lock unnecessarily and don't leak a bitmap object in case of failure
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Thu Nov 1 13:06:11 2007 New Revision: 30034 URL:
http://svn.reactos.org/svn/reactos?rev=30034&view=rev
Log: Don't lock unnecessarily and don't leak a bitmap object in case of failure Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c Thu Nov 1 13:06:11 2007 @@ -39,7 +39,6 @@ UINT BitsPixel, IN OPTIONAL LPBYTE pBits) { - PBITMAPOBJ bmp; HBITMAP hBitmap; SIZEL Size; LONG WidthBytes; @@ -71,24 +70,25 @@ return 0; } - DPRINT("IntGdiCreateBitmap:%dx%d, %d BPP colors returning %08x\n", - Size.cx, Size.cy, BitsPixel, hBitmap); - - bmp = BITMAPOBJ_LockBitmap( hBitmap ); - if (bmp == NULL) - { - /* FIXME should we free the hBitmap or return it ?? */ - return 0; - } - - bmp->flFlags = BITMAPOBJ_IS_APIBITMAP; - if (NULL != pBits) { - IntSetBitmapBits(bmp, bmp->SurfObj.cjBits, pBits); + PBITMAPOBJ bmp = BITMAPOBJ_LockBitmap( hBitmap ); + if (bmp == NULL) + { + NtGdiDeleteObject(hBitmap); + return NULL; + } + + bmp->flFlags = BITMAPOBJ_IS_APIBITMAP; + + IntSetBitmapBits(bmp, bmp->SurfObj.cjBits, pBits); + + + BITMAPOBJ_UnlockBitmap( bmp ); } - BITMAPOBJ_UnlockBitmap( bmp ); + DPRINT("IntGdiCreateBitmap : %dx%d, %d BPP colors, topdown %d, returning %08x\n", + Size.cx, Size.cy, BitsPixel, (Height < 0 ? 1 : 0), hBitmap); return hBitmap; }
17 years, 1 month
1
0
0
0
[jimtabor] 30033: Fix structure storage types.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Thu Nov 1 04:59:05 2007 New Revision: 30033 URL:
http://svn.reactos.org/svn/reactos?rev=30033&view=rev
Log: Fix structure storage types. Modified: trunk/reactos/include/reactos/win32k/ntgdityp.h Modified: trunk/reactos/include/reactos/win32k/ntgdityp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntgdityp.h (original) +++ trunk/reactos/include/reactos/win32k/ntgdityp.h Thu Nov 1 04:59:05 2007 @@ -225,7 +225,7 @@ ULONG ulBackgroundClr; ULONG ulBrushClr; POINTL ptlViewportOrg; - PATRECT pRect; // POLYPATBLT + PATRECT pRect[1]; // POLYPATBLT } GDIBSPPATBLT, *PGDIBSPPATBLT; typedef struct _GDIBSTEXTOUT @@ -246,7 +246,7 @@ HANDLE hlfntNew; FLONG flTextAlign; POINTL ptlViewportOrg; - CHAR String[1]; + WCHAR String[2]; } GDIBSTEXTOUT, *PGDIBSTEXTOUT; typedef struct _GDIBSEXTTEXTOUT
17 years, 1 month
1
0
0
0
[janderwald] 30032: - implement IPersistFolder2 interface for desktop object - add a backslash when required - fixes deleting of objects on desktop
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Nov 1 03:42:06 2007 New Revision: 30032 URL:
http://svn.reactos.org/svn/reactos?rev=30032&view=rev
Log: - implement IPersistFolder2 interface for desktop object - add a backslash when required - fixes deleting of objects on desktop Modified: trunk/reactos/dll/win32/shell32/shfldr_desktop.c trunk/reactos/dll/win32/shell32/shv_item_cmenu.c Modified: trunk/reactos/dll/win32/shell32/shfldr_desktop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_d…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr_desktop.c (original) +++ trunk/reactos/dll/win32/shell32/shfldr_desktop.c Thu Nov 1 03:42:06 2007 @@ -61,6 +61,7 @@ typedef struct { const IShellFolder2Vtbl *lpVtbl; + const IPersistFolder2Vtbl *lpPF2; LONG ref; /* both paths are parsible from the desktop */ @@ -104,7 +105,11 @@ { *ppvObj = This; } - + else if (IsEqualIID (riid, &IID_IPersistFolder) || + IsEqualIID (riid, &IID_IPersistFolder2)) + { + *ppvObj = &This->lpPF2; + } if (*ppvObj) { IUnknown_AddRef ((IUnknown *) (*ppvObj)); @@ -843,6 +848,93 @@ ISF_Desktop_fnMapColumnToSCID }; +static inline IGenericSFImpl *impl_from_IPersistFolder2( IPersistFolder2 *iface ) +{ + return (IGenericSFImpl *)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpPF2)); +} + +static HRESULT WINAPI +ISF_Desktop_PersistFolder2_fnQueryInterface (IPersistFolder2 * iface, REFIID iid, + LPVOID * ppvObj) +{ + IGenericSFImpl *This = impl_from_IPersistFolder2(iface); + + TRACE ("(%p)\n", This); + + return ISF_Desktop_fnQueryInterface ((IShellFolder2*)This, iid, ppvObj); +} + +static ULONG WINAPI +ISF_Desktop_PersistFolder2_fnAddRef (IPersistFolder2 * iface) +{ + IGenericSFImpl *This = impl_from_IPersistFolder2(iface); + + TRACE ("(%p)->(count=%u)\n", This, This->ref); + + return ISF_Desktop_fnAddRef((IShellFolder2*)This); +} + +static ULONG WINAPI +ISF_Desktop_PersistFolder2_fnRelease (IPersistFolder2 * iface) +{ + IGenericSFImpl *This = impl_from_IPersistFolder2(iface); + + TRACE ("(%p)->(count=%u)\n", This, This->ref); + + return ISF_Desktop_fnRelease ((IShellFolder2*)This); +} + +static HRESULT WINAPI +ISF_Desktop_PersistFolder2_fnGetClassID (IPersistFolder2 * iface, CLSID * lpClassId) +{ + static GUID const CLSID_Desktop = + { 0x00021400, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} }; + + IGenericSFImpl *This = impl_from_IPersistFolder2(iface); + + TRACE ("(%p)\n", This); + + if (!lpClassId) + return E_POINTER; + + memcpy(lpClassId, &CLSID_Desktop, sizeof(GUID)); + + return S_OK; +} +static HRESULT WINAPI +ISF_Desktop_PersistFolder2_fnInitialize (IPersistFolder2 * iface, LPCITEMIDLIST pidl) +{ + IGenericSFImpl *This = impl_from_IPersistFolder2(iface); + + TRACE ("(%p)->(%p)\n", This, pidl); + + return E_NOTIMPL; +} + +static HRESULT WINAPI +ISF_Desktop_PersistFolder2_fnGetCurFolder (IPersistFolder2 * iface, + LPITEMIDLIST * pidl) +{ + IGenericSFImpl *This = impl_from_IPersistFolder2(iface); + + TRACE ("(%p)->(%p)\n", This, pidl); + + if (!pidl) return E_POINTER; + *pidl = ILClone (This->pidlRoot); + return S_OK; +} + +static const IPersistFolder2Vtbl vt_FSFldr_PersistFolder2 = +{ + ISF_Desktop_PersistFolder2_fnQueryInterface, + ISF_Desktop_PersistFolder2_fnAddRef, + ISF_Desktop_PersistFolder2_fnRelease, + ISF_Desktop_PersistFolder2_fnGetClassID, + ISF_Desktop_PersistFolder2_fnInitialize, + ISF_Desktop_PersistFolder2_fnGetCurFolder, +}; + + /************************************************************************** * ISF_Desktop_Constructor */ @@ -872,6 +964,7 @@ sf->ref = 1; sf->lpVtbl = &vt_MCFldr_ShellFolder2; + sf->lpPF2 = &vt_FSFldr_PersistFolder2; sf->pidlRoot = _ILCreateDesktop(); /* my qualified pidl */ sf->sPathTarget = SHAlloc( (lstrlenW(szMyPath) + 1)*sizeof(WCHAR) ); lstrcpyW( sf->sPathTarget, szMyPath ); Modified: trunk/reactos/dll/win32/shell32/shv_item_cmenu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_item…
============================================================================== --- trunk/reactos/dll/win32/shell32/shv_item_cmenu.c (original) +++ trunk/reactos/dll/win32/shell32/shv_item_cmenu.c Thu Nov 1 03:42:06 2007 @@ -34,6 +34,7 @@ #include "shlobj.h" #include "objbase.h" +#include "shlwapi.h" #include "shell32_main.h" #include "shellfolder.h" #include "debughlp.h" @@ -513,36 +514,39 @@ */ static void DoDelete(IContextMenu2 *iface, HWND hwnd) { - ItemCmImpl *This = (ItemCmImpl *)iface; WCHAR szPath[MAX_PATH]; WCHAR * szTarget; SHFILEOPSTRUCTW op; - LPSHELLBROWSER lpSB; - LPSHELLVIEW lpSV; - IPersistFolder3 * psf; + LPSHELLBROWSER lpSB; + LPSHELLVIEW lpSV; + IPersistFolder2 * psf; LPITEMIDLIST pidl; STRRET strTemp; - + ItemCmImpl *This = (ItemCmImpl *)iface; + if (IShellFolder2_QueryInterface(This->pSFParent, &IID_IPersistFolder2, (LPVOID*)&psf) != S_OK) { ERR("Failed to get interface IID_IPersistFolder2\n"); return; } + if (IPersistFolder2_GetCurFolder(psf, &pidl) != S_OK) { ERR("IPersistFolder2_GetCurFolder failed\n"); - IShellFolder2_Release(psf); + IPersistFolder2_Release(psf); return; } if (IShellFolder2_GetDisplayNameOf(This->pSFParent, pidl, SHGDN_FORPARSING, &strTemp) != S_OK) { ERR("IShellFolder_GetDisplayNameOf failed\n"); - IShellFolder2_Release(psf); + IPersistFolder2_Release(psf); return; } + szPath[MAX_PATH-1] = 0; StrRetToBufW(&strTemp, pidl, szPath, MAX_PATH); - IShellFolder2_Release(psf); + PathAddBackslashW(szPath); + IPersistFolder2_Release(psf); szTarget = build_paths_list(szPath, This->cidl, This->apidl); @@ -557,6 +561,7 @@ op.fFlags = FOF_ALLOWUNDO; SHFileOperationW(&op); } + ILFree(pidl); } if ((lpSB = (LPSHELLBROWSER)SendMessageA(hwnd, CWM_GETISHELLBROWSER,0,0)))
17 years, 1 month
1
0
0
0
← Newer
1
...
86
87
88
89
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
Results per page:
10
25
50
100
200