Commit graph

55 commits

Author SHA1 Message Date
Katayama Hirofumi MZ 99b52df014
[SHELL32][INCLUDE] Improve CheckEscapesA/W (#2795)
Fix and improve shell32!CheckEscapesA/W functions.
Add a testcase for shell32!CheckEscapesA/W to shell32_apitest.
2020-05-28 10:58:26 +09:00
Katayama Hirofumi MZ b70232d416 [SHELL32] Half-implement SHWinHelp 2020-05-14 09:38:38 +09:00
Katayama Hirofumi MZ 771457f37f
[SHELL32] Implement VK_DELETE on SHBrowseForFolder (#2661)
Enable Del/Delete key to delete the selected folder in "Browse for Folder" dialog.
You can use https://jira.reactos.org/secure/attachment/40118/getfolder.zip as a test program.
CORE-7592
2020-04-26 22:06:19 +09:00
Serge Gautherie a7e4d66be5 [SHELL32] DoGetProductType(): Use RegGetValueW()
instead of RegQueryValueExW(), to enforce a null terminator.

Addendum to 9f4e8ef25b.
2020-04-26 14:16:59 +02:00
Katayama Hirofumi MZ 2727245c86
[SHELL32] Shell notify rework for simplicity and readability (#2539)
Shell change notification has been implemented in #2432. But as @yagoulas said, source code structure is in mess. We improved simplicity and human readability of our source code.
- Move wine/changenotify.c code into changenotify.c and shelldesktop/CChangeNotify.cpp.
- Simplify code and rename the identifiers and add many comments. CORE-13950
2020-04-13 10:36:24 +09:00
Serge Gautherie 745cb1cbda
[SHELL32] Fix SHCNE_UPDATEITEM number of items (#2409)
Import
83acbb79c1

Related to CORE-13950
2020-04-09 19:42:00 +02:00
Katayama Hirofumi MZ 296192685b
[SHELL32] Implement shell change notification (#2432)
- Rewrite SHChangeNotify, SHChangeNotifyRegister, SHChangeNotify_Lock, SHChangeNotify_Unlock and SHChangeNotifyDeregister functions.
- Fix SHSimpleIDListFromPathA/W functions.
CORE-13950
2020-04-09 07:30:14 +09:00
Serge Gautherie 07efa2ef53
[SHELL32] HCR_GetIconA(): Properly use icon_idx (#2482)
CORE-11713

Import
7cc2806e0e
2020-03-30 12:24:59 +02:00
jimtabor 10d1afea18 [Explorer|Shell32]
Fix SHAppBarMessage (not perfect) by adapting wine code. See CORE-14439.
More work is required. Kept the original code for reference.
Example : SetWindowPos should be called via Post Message.
Code commit is to wake up other developers.
2020-03-21 19:13:55 -05:00
Robert Naumann fc4c4d4911
Sync brsfolder.c with keyboard shortcut code from wine (#2290)
* [SHELL32] Add shortcut to rename folders with the F2 key.

Sync Wine Commit 2e25a43f3fb6230460447bae6fb5db2edbd4a42f by Fabian Maurer

* [SHELL32] Add shortcut to delete folders with the delete key.

Sync Wine Commit 43f44ffb3779ff23c863d9b3297f92720e7e3733 by Fabian Maurer

* Disable the code for file deletion. The Wine way doesn't work on ROS. Add an explaining comment why we can't use the Wine code, as requested by Amine
2020-03-18 21:57:10 +01:00
Katayama Hirofumi MZ 3c5b10f4e6
[SHELL32] Fix SHChangeNotify for one item events (#2386)
Windows sends notification even if two parameters are provided for notification of one parameter. CORE-13950
2020-02-26 10:59:28 +09:00
Katayama Hirofumi MZ 0a626dedf8
[SHELL32] Set read-only for some shell folders and delete Desktop.ini of Desktop and Program Files (#2385)
Set read-only attribute instead of system attribute for some shell folders that has a folder icon.
Delete desktop.ini files in Desktop and Program Files. CORE-16711
2020-02-25 10:07:58 +09:00
Bișoc George 6ce72ba172
[SHELL32] Better fix for the "Version" string in the About-dialog (#2349)
The version string kernel number and the localized "version" word were too near in translation files. The patch fixes the problem introduced by #2276.
Addendum to commit a57f7b50.
2020-02-14 22:17:48 +01:00
Katayama Hirofumi MZ 358f947975
[SHELL32] Rewrite SHAddToRecentDocs (#2333)
Rewrite shell32!SHAddToRecentDocs and use it in some applications.
Wine's SHAddToRecentDocs was not Unicode supported and unusable. I will dare to rewrite.
CORE-3588
2020-02-14 11:05:21 +09:00
Katayama Hirofumi MZ bc1519dd87
Shell Folders: Reject invalid characters (#2328)
Reject invalid input filename characters by using shell32!SHLimitInputEdit function and IItemNameLimits interface. Improve SHLimitInputEdit to sanitize paste.
CORE-11701
2020-02-12 09:18:24 +09:00
Serge Gautherie 9f4e8ef25b
[SHELL32] DoGetProductType(): Check RegQueryValueExW() dwType (#2331) 2020-02-11 17:36:12 +01:00
Katayama Hirofumi MZ ea8a6d6fb7 [SHELL32] Fix and improve SHLimitInputEdit
Use CallWindowProcW to call the subclass window procedure.
Use Wide functions explicitly.
CORE-11701
2020-02-11 14:10:38 +09:00
Katayama Hirofumi MZ 9e53e7cd5b [SHELL32] DoGetProductType should check "LanmanNT" value.
CORE-13795
2020-02-11 13:11:58 +09:00
Katayama Hirofumi MZ c6ed215eef [SHELL32] Initial implement SHLimitInputEdit (#2323)
Popup balloon window is not implemented yet.
CORE-11701
2020-02-10 15:57:30 +09:00
Katayama Hirofumi MZ 48160c74b7
[SHELL32][SYSSETUP] Add Product Options page to ReactOS Setup (#2315)
- Add "Product Options" wizard page into ReactOS Setup.
- Implement CSIDL_Type_InMyDocuments CSIDL type.
- If the product type is workstation, then some special folders will be in My Documents.
CORE-13795
2020-02-10 11:10:42 +09:00
Bișoc George a57f7b50c0
[SHELL32] Display the ReactOS version to the About dialog programmatically (#2276)
The current control parameters don't fit well with the version string since ReactOS migrated from SVN to Git. However, modifying the resource parameters doesn't fix the problem as well because the string itself is dynamic (as it can change in words specially the build architecture if the version build is AMD64 or x86 for example).

CORE-16571
2020-02-01 22:47:32 +01:00
Suraj K Suresh fbc14d52cd
[PSDK] Support STRICT_TYPED_ITEMIDS in shdeprecated.idl. CORE-16385 2020-01-03 22:42:35 +01:00
Suraj K Suresh ecb3ee5427
[PSDK] Support STRICT_TYPED_ITEMIDS in shlobj.h. CORE-16385 2020-01-03 22:42:34 +01:00
Katayama Hirofumi MZ b582d6ff45
[SHELL32] Improve and fix SendTo (#2122)
Because of timing of SendTo folder initialization, SendTo My Documents didn't work well.
Now My Documents item is working well. CORE-12562
2019-12-02 04:06:20 +09:00
Katayama Hirofumi MZ f1bc04d7e6
[SHELL32][ZIPFLDR] Implement SendTo ZIP folder (#2118)
Follow-up of #2114.
- s/Creater/Creator/
- Add an empty file in the SendTo folder.
- Trick.
CORE-16495
2019-12-02 02:26:34 +09:00
Katayama Hirofumi MZ 79d21f7664 [SHELL32] Fix regression of DoCreateSendToFiles
CoInitializeEx/CoUninitialize added.
CORE-12562
2019-12-01 13:55:43 +09:00
Katayama Hirofumi MZ 2c272a9017
[SHELL32] Add desktop.ini more to some folders (#2101)
Provides special icons for special folders by adding desktop.ini. CORE-10045
2019-11-29 14:40:04 +09:00
Katayama Hirofumi MZ 5538facfdd
[SHELL32] Add SendTo DeskLink (Retry) (#2099)
CORE-12562
2019-11-27 20:09:19 +09:00
Katayama Hirofumi MZ a4deb3f8f1
[SHELL32] Change icon of SendTo My Documents (#2083)
Follow-up of #2027. CORE-16496
2019-11-23 14:10:13 +09:00
Katayama Hirofumi MZ d037003511
[SHELL32] Add SendTo My Documents (#2027)
If SendTo folder is empty in SHGetFolderPathAndSubDirW function, then add a shortcut file linked to My Documents. CORE-16496
2019-11-12 16:54:28 +09:00
Mark Jansen c31327114b
[SDK][SHELL32] Augment the internally used IDataObject with some extra formats
This is needed because our code seems to use CF_HDROP a lot, instead of HIDA...
2019-10-20 17:10:12 +02:00
Brock Mammen e7e551afda [SHELL32] Make SHFindFiles open the search results folder 2019-09-15 19:46:36 +03:00
Yaroslav Kibysh a30e644dc4 [EXPLORER][SHPOLICY] Implement "NoSimpleStartMenu" policy (#1258)
- Enable "New Start Menu" control for all languages.
- Implement the "NoSimpleStartMenu" policy in shpolicy.c and its usage in explorer.
- Hide controls instead of disabling (as in Win XP/Vista).
2019-03-24 14:56:43 +01:00
Stanislav Motylkov cc99d3ad5f [SHELL32] Add line bar to About dialog for consistence
Addendum to f9d2931. CORE-15215
2019-03-23 19:11:28 +01:00
Yaroslav Kibysh 3999e875be [SHPOLICY] Fix the missing backslash in SHRestricted. CORE-15666 (#1267)
Import Wine commit https://source.winehq.org/git/wine.git/?a=commit;h=dbbfa481539acd29de47ff6cd5cc2d24a2e01871

Original patch from Yaroslav Kibysh, reported to Wine and committed there by Fabian Maurer.
Thank you all!
2019-03-23 18:28:39 +01:00
Ged Murphy 0649f25b48 [SHELL32] Implement SHTestTokenMembership and forward IsUserAnAdmin to it
Moved to the bottom of the file with the other ros functions to help keep wine syncs easier.
2019-03-04 11:54:43 +00:00
Mark Jansen d766391231
[SHELL32] Abort change notifications on a nullptr
CORE-15703
2019-02-18 23:00:31 +01:00
Hermès Bélusca-Maïto 7ee298bbfc
[SHELL32] In _SHExpandEnvironmentStrings(), fall back to SHExpandEnvironmentStringsForUserW() if the simplified code paths failed.
This allows the code to give a last chance for expanding the string.
And if it still fails, we bail out as expected and the caller will
take appropriate actions.

As a by-product, this commit (together with the previous one e2960914)
fixes the regression CORE-14981 (Quick-Launch bar couldn't be opened
in LiveCD).
2018-09-23 00:18:57 +02:00
Hermès Bélusca-Maïto e29609147b
[SHELL32] In _SHGetUserShellFolderPath(), check the return value of _SHExpandEnvironmentStrings()
and bail out if it failed. That way we won't use and cache in the registry an invalid-expanded string.

CORE-14981
2018-09-23 00:16:06 +02:00
Hermès Bélusca-Maïto 41a5b11fcd
[SHELL32] Partially synchronize wine/shellpath.c with Wine.
- Adjust the code with respect to:
  "shell32: Re-add support for expanding ALLUSERSPROFILE for backward compatibility."
  4a6855a575c02aa1569aab8b2e96720fc02f3f26 (Alexandre Julliard)

- "shell32: Avoid infinite loop in _SHExpandEnvironmentStrings."
  ceea5bda14ecf4c8ce262fc7ab88df49e500bc38 (Alexandre Julliard)

- "shell32: Assume that system directory always contains a drive letter."
  54530bc4933ae1014c3697c95e22b8ca5a275bc4 (Alexandre Julliard)

- "shell32: Use ARRAY_SIZE macro."
  612a1941331485725952d34f3dcd5866fc318dc2 (Nikolay Sivov)

- "shell32: Fix a trace message."
  bb09bb5750d617047aa23635731519a2f9486159 (Nikolay Sivov)

- "shell32: Fix SHGetFolderPathAndSubDir() trace message."
  f75d5625966933562b974540a3f29dfcd720ad50 (Nikolay Sivov)

- "shell32: Pass correct buffer length to RegQueryValueExW()."
  0bfb97dcba29552b51d8609fcc6e7bbc04bb8320 (Nikolay Sivov)

- "shell32: Remove unused string (Clang)."
  8d50a8a246960749afba21eac117b4fcbbf2c79d (André Hentschel)

- "shell32: Use E_NOT_SUFFICIENT_BUFFER definition."
  730e744e3bd6b706612fe0f90a7efb2e600f114f (Nikolay Sivov)
2018-09-23 00:16:02 +02:00
Hermès Bélusca-Maïto 74adcadbd0
[SHELL32] Silence a noisy DPRINT. 2018-07-29 17:39:09 +02:00
Hermès Bélusca-Maïto 2afb483a9e
[SHELL32] Shell Profile Folders fixes.
- Fix a regression introduced in r65415 (1795a3bf) where the directory
  paths stored in "Windows\CurrentVersion\Explorer\User Shell Folders"
  were stored in expanded format instead of in unexpanded format:
  _SHGetDefaultValue() *MUST* return unexpanded paths by design!!

- Augment _SHExpandEnvironmentStrings() and _SHGetUserShellFolderPath()
  to take a user token handle to be able to correctly resolve/expand
  user-specific directory paths.

- Fix _SHExpandEnvironmentStrings() so that it always retrieve the
  correct current user / all-users directory paths by calling userenv
  functions, instead of hardcoding a broken logic. As a result this
  removes the "C:\Documents and Settings\SYSTEM" ghost directory we got
  during ReactOS installation.

- Delimit the changes with respect to Wine by #if(n)def __REACTOS__ .
2018-06-30 18:20:08 +02:00
Katayama Hirofumi MZ 3189ec9428 [SHELL32] Add missing desktop.ini files (#640)
Add the "desktop.ini" files to the special folders to realize their custom icons.
CORE-10045
2018-06-27 23:11:31 +02:00
Mark Jansen b569195ecf
[SHELL32] Partially sync SHGetFileInfo with wine to improve folder type names.
CORE-14542
2018-04-22 17:38:44 +02:00
Pierre Schweitzer da8a41b97b
[SHELL32] Fix a directory handle leak when browsing folders
A bit of history: in r71528, I tried to fix our explorer often
crashing while browsing directories. It was linked to the fact
that a notification result may arrive while the notification
structure had already been deleted.

The fix for this was actually broken and was leading to a double
leak: the notification structure was leaked. But also the handle
to the directory that had been browsed!
This means that the directory couldn't be modified anymore as
a leaked handle to it was still open.

Actually, when notifications are cancel, the kernel properly
calls the notification routine, but with a specific error code.
So the correct fix is to stop handling that notification when
we receive this error code. This is the correct fix with no leaks.

This commit is a complete r71528 revert with the appropriate fix.

CORE-10941
CORE-12843
2018-03-06 20:30:21 +01:00
Giannis Adamopoulos 3263303844 [SHELL32] CShellItem: Fix GetDisplayName and Compare
The two methods were completely broken because they passed a full pidl to the parent folder (and not desktop folder).
Compile SHGetNameFromIDList to use it in CShellItem but don't export it.
2018-02-20 16:59:00 +02:00
Giannis Adamopoulos ac950ea01d [SHELL32] shellpath: sync a part of _SHGetDefaultValue with wine
on 32bit builds CSIDL_PROGRAM_FILESX86 is treated as CSIDL_PROGRAM_FILES and on wow64 builds CSIDL_PROGRAM_FILES gets treated as CSIDL_PROGRAM_FILESX86
2018-02-20 10:58:14 +02:00
Katayama Hirofumi MZ 338799bf8b improve SHGetFileInfo (#118)
This patch reduces failures of SHGetFileInfo function. CORE-7159
* improve WideByteToWideChar calls
* fix bugs related to file attributes and SHGFI_EXETYPE
* SHGFI_USEFILEATTRIBUTES and SHGFI_ICON fix
* s/sizeof(temppsfi)/0/
2018-02-16 11:00:08 +00:00
Amine Khaldi e83592920b [SHELL32] Remove unused debug channels and comment out unused variables. Silences some clang-cl warnings. 2017-12-07 23:54:22 +01:00
Serge Gautherie 57aa1f1fc6
[SHELL32] shellpath.c: it is _WIN32_WINNT, not WIN32_WINNT. We even need to use __REACTOS__ instead here. CORE-12580 2017-12-03 21:52:37 +01:00