Commit graph

60 commits

Author SHA1 Message Date
Jose Carlos Jesus b8c4d589b1
[SHELL32] Give opportunity to rename file/folder on its creation (#5139)
* [SHELL32] Fix issue when creating a new file or folder. No chance to rename the displayed name.

The CNewMenu::SelectNewItem method starts with a request to notify the View object about a new item by calling SHChangeNotify.
After creating and obtaining the new PIDL by calling ILFindLastID, the CDefView::SelectItem method is called.
This method fails right from the start when calling LV_FindItemByPidl which returns -1, thus preventing the user from being given the opportunity to change the name displayed by default.

This failure is due to the fact that this object has not yet been added to the CDefView::m_ListView list. This is caused by the asynchronous nature of SHChangeNotify.

Thanks to Giannis Adamopoulos for the big help.
2023-03-14 22:27:14 +01:00
Jose Carlos Jesus ed4b16b7ff
[SHELL32] Give a chance to rename new file or folder when created (#4950) 2023-02-25 23:38:42 +01:00
Timo Kreuzer 7d4de5f8ea [SHELL32] Check for valid listview in CDefView::_PidlByItem and CDefView::RemoveObject
This fixes failing ATLASSERTs in shell32_winetest:shlview
2023-01-04 10:32:28 +01:00
Mark Jansen 2567a66399
[SHELL32] Fix CDefView UAF 2022-11-04 23:01:31 +01:00
Mark Jansen b448fbdf59
[SHELL32] Fix using the wrong context menu 2022-10-15 11:09:25 +02:00
Mark Jansen 6a1f287820
[SHELL32] Show file / drive properties at the position where the mouse was.
CORE-18386
2022-10-14 21:02:33 +02:00
Mark Jansen 544b734498
[SHELL32] CDefView: Rework context menu handling
Previously, we would share one object between a multitude of options.
Now, the only two options that need to store something for later use each have their own space for it.
The context menu always cleans up after itself, the File menu does not.
CORE-18345
CORE-18361
CORE-18366
2022-10-02 00:36:42 +02:00
Kyle Katarn 86addae3cc
[SHELL32] Fix Assertion when opening "File" menu in MyComputer twice (#4675)
ReactOS explorer shell asserts when opening the "File" menu in MyComputer for the second time.
This is due to the cached copy of IContextMenu not being released before attempting to cache it again.

Fix based on the patch proposed by JIRA user I_Kill_Bugs

CORE-18353

Signed-off by: I_Kill_Bugs (original patch author)
2022-09-10 15:59:00 +02:00
Serge Gautherie 03422451b3 [REACTOS] Add '\n' to debug logs
on TRACE, WARN, FIXME and ERR calls.

Plus a few nit picks.
2022-05-04 03:28:38 +03:00
Russell Johnson 3e2df36561
[SHELL32] Add multiple status bar parts to the file browser (#4401)
The file browser now has a status bar like Windows Server 2003 does.
This includes the sizes of the files, as well as the location.
In certain folders (Network, Desktop, etc.) the status bar is hidden.

Currently it does not handle this in the same way as Windows Shell does,
however it's a good first step to make it work properly.

CORE-17603

Signed-off-by: Russell Johnson <russell.johnson@superdark.net>
Reviewed-by: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Reviewed-by: Mark Jansen <mark.jansen@reactos.org>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>	
Reviewed-by: Giannis Adamopoulos <gadamopoulos@reactos.org>	
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-05-03 16:52:23 +03:00
Katayama Hirofumi MZ c199edda45
[SHELL32] Enable _DEBUG and fix assertion failures (#4307)
Improve debuggability. Fix "WorkerW" window class conflict.
- Enable _DEBUG macro if debugging, in order to enable ATLASSERT macro.
- Fix assertion failures.
- Add SHCreateDefaultWorkerWindow helper function and CWorkerTraits, then use them.
- Don't create the broker and server windows by themselves, but subclass.
CORE-17505, CORE-13950
2022-01-25 03:42:46 +09:00
Hermès Bélusca-Maïto 83be315abf
[SHELL32] Use wide char string literals.
Import parts of Wine commit b215536852dc5a132108db92c90a41c70b738e50
shell32: Use wide char string literals.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-09 22:39:29 +01:00
Hermès Bélusca-Maïto a6bf77e7b9
[SDK:REACTOS] Move our ROS-specific header-only UI libraries into a "ui" sub-folder. (#4205) 2022-01-06 02:17:25 +01:00
Doug Lyons cee171f5d2
[SHELL32] Bypass OpenWith for Delete and F2 (Rename) Keys (#4032) CORE-17810
Logspam started during 0.4.9-dev'ing when zipfldr got committed, logspam became much worse by
0.4.10-dev-599-g 932df378bf
But the actual bug of 'calling those functions when not needed' is much older than that.

I do intend to port this improvement back into older rls-branches.
2021-10-14 23:03:53 +02:00
Katayama Hirofumi MZ 9078e34f3c
[SHELL32] Don't smartass-renaming on LNK files (#4020)
Renaming .LNK files had a bug that the selection won't include the extension-like filename part.
CORE-17807
2021-10-11 13:33:43 +09:00
Katayama Hirofumi MZ 5da934e34d
[SHELL32] Don't smartass-renaming on folders (#3993)
Selection on renaming folders shouldn't select the extension-like part of filename.
CORE-17793
2021-10-07 08:16:35 +09:00
Hermès Bélusca-Maïto 9393fc320e
[FORMATTING] Remove trailing whitespace. Addendum to 34593d93.
Excluded: 3rd-party code (incl. wine) and most of the win32ss.
2021-09-13 03:52:22 +02:00
Mark Jansen d039653959
[SHELL32] CDefView: Respect item attributes 2021-07-23 22:10:36 +02:00
Mark Jansen f0bee6c4bc
[SHELL32] CDefView: Prevent use after free
While updating the item, the LVIF_STATE would be requested,
for which the old lParam would be accessed.
2021-05-26 22:57:43 +02:00
Katayama Hirofumi MZ 8c87489a43
[COMCTL32][SHELL32] Fix arrow keys and reordering on ListView (#3162)
- Disable special auto-arrange codes in LISTVIEW_GetNextItem function.
- Add auto-arrange reordering codes on CDefView.
CORE-16875
2020-09-17 22:18:34 +09:00
Katayama Hirofumi MZ 7c134e4d14
[SHELL32] Big fix for change notification (#3048)
- Reduced the failures of SHChangeNotify testcase.
- Simplified change notification mechanism.
- Realized PIDL aliasing.
CORE-13950
2020-09-03 13:36:31 +09:00
Katayama Hirofumi MZ 46ff964e22
[SHELL32] Implement Move To Folder (#3056)
- Add context menu item "Mo&ve to folder..." and implement the action.
- Implement the "Mo&ve to folder..." menu item of "Edit" menu of Explorer.
CORE-11132
2020-08-18 05:30:54 +09:00
Katayama Hirofumi MZ 85fdcdf2cc
[SHELL32] Implement Copy To Folder (retrial) (#3044)
- Add context menu item "Copy to &folder..." and implement the action.
- Implement the "Copy to &folder..." menu item of "Edit" menu of Explorer.
CORE-11132
2020-08-16 08:04:07 +09:00
Katayama Hirofumi MZ ee231d00b9
[SHELL32] Improve callbacking of CDefView (#3031)
- Delete DefMessageSFVCB method.
- Add some callbacking.
2020-08-11 16:00:16 +09:00
Katayama Hirofumi MZ 5c589b5537
[SHELL32] Notify filesystem changes (#2659)
Notify filesystem change notifications by using ReadDirectoryChangesW function. Creating/Deleting files/folders will be responsive in Explorer. CORE-13950
2020-05-04 14:53:23 +09:00
Katayama Hirofumi MZ c04010c9ad [SHELL32] Update name in CDefView::LV_RenameItems 2020-04-26 13:21:14 +03:00
Charles Ambrye 8c4bd09518 [SHELL32] Fix a bug that caused Auto Arrange to always be highlighted in the file explorer
This occurred in the file explorer because the menu isn't destroyed and recreated each time, so the menu item, once checked, will stay checked forever.  We must call CheckMenuItem with MF_UNCHECKED to clear the check when necessary
2020-04-20 23:13:09 +03:00
Charles Ambrye c82ba3485e [SHELL32] Modify context menu to include Align To Grid, and remove Line Up Icons
Implement support for using Align To Grid, which itself simply sets the LVS_EX_SNAPTOGRID extended style of the list view control
2020-04-20 23:13:09 +03:00
Charles Ambrye 1bee97358e [SHELL32] Pass LVA_SNAPTOGRID to listview when 'Line up Icons' is selected 2020-04-17 13:23:29 +03:00
Katayama Hirofumi MZ 1c706d7483
[SHELL32] Watch for common desktop and SHCNE_CREATE for IShellLink::Save (#2515)
- On desktop view, we have to watch both the common desktop and the private desktop.
- In Windows, IShellLink::Save (shortcut creation) sends SHCNE_CREATE or SHCNE_UPDATEITEM notification.
- Simplify CChangeNotify::ShouldNotify.
CORE-10391
2020-04-09 16:56:54 +09: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
Katayama Hirofumi MZ 4df9355d0c
[SHELL32][BOOTDATA] Unselect filename extension upon renaming (#2398)
You can disable unselecting by setting TRUE to SelectExtOnRename value of HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer. CORE-15242
2020-02-29 08:08:26 +09:00
Katayama Hirofumi MZ 1cf564c25f [SHELL32] Use background context if no item selected on File menu
CORE-9467
2020-02-12 12:14:15 +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
Katayama Hirofumi MZ 5734570a15
[BOOT][SHELL32][INCLUDE] Support 'SuperHidden' files (#2102)
PR #2101 shows desktop.ini files on Desktop. I want to hide them.
- Add "ShowSuperHidden" setting to Explorer.
- Add SHCONTF_INCLUDESUPERHIDDEN flag.
- Support SHCONTF_INCLUDESUPERHIDDEN in Explorer.
CORE-10045
2019-11-29 15:14:18 +09:00
Katayama Hirofumi MZ 79b030219f
[SHELL32] Improve icon selection upon right click (#2063)
If the Right-Clicked item is not being selected, then reset the selection and select the Right-Clicked item. CORE-16519
2019-11-20 20:37:57 +09:00
Joachim Henze dc047f9630 [BROWSEUI][SHELL32] Fix scroll to selection CORE-16504
A patch by Katayama Hirofumi MZ

The bug was unhidden by
0.4.14-dev-312-g
b931f643e3
2019-11-17 02:04:27 +01:00
Katayama Hirofumi MZ 8f129932dd
[SHELL32] Simply return S_OK if *pdwEffect is none (#2039)
IDropTarget::DragEnter must simply return S_OK if *pdwEffect == DROPEFFECT_NONE. CORE-11238
2019-11-15 18:02:06 +09:00
Brock Mammen 957a604b36 [SHELL32] Implement CDefView::AddObject() 2019-09-15 19:46:36 +03:00
Mark Jansen c96ba1aff2
[SHELL32] CDefView: Improve the context menu positioning
Previously we would always show a menu on the focused item, but
this should only be done when it is also selected.
2019-08-15 11:28:31 +02:00
Serge Gautherie 8a8453494f [SHELL32] SHCreateShellFolderView(): Fix parameter validation order. (#1632)
Fixes one modification from commit ae2a85d0.
CORE-16098
2019-06-09 15:57:45 +02:00
Hermès Bélusca-Maïto ae2a85d003
[SHELL32] Fix some NULL-pointers validation.
- In the exported SHCreateDefaultContextMenu() and
  IDataObject_Constructor() functions (called amongst others by
  the exported CIDLData_CreateFromIDArray() function).

- In the exported SHCreateShellFolderView() function.

- In CDefView::GetItemObject(), where data was written to *ppvOut before
  ppvOut was being checked for NULL.
2019-06-08 19:43:02 +02:00
Katayama Hirofumi MZ f762aa3dd2 [SHELL32] Fix explorer file item label background CORE-15937 2019-04-07 21:38:00 +09:00
Katayama Hirofumi MZ d04b4e65d6
[SHELL32] Implement Explorer background image (Retrial of #801) (#1463)
IconArea_Image, IconArea_Text and IconArea_TextBackground values in desktop.ini in a folder will be supported. It denies network paths. CORE-5516
2019-04-05 07:59:35 +09:00
Serge Gautherie 6f2aa0cbf9 [SHELL32] CDefView: Remove a remnant string part (#1250)
Addendum to 9ae373a.
2019-01-16 12:51:49 +01:00
Mark Jansen 9ae373a023 [SHELL32] CDefView: Find a reasonable place to show a context menu
Previously, we would treat the input as unsigned coordinates, this is wrong!
If the coordinates are invalid, we try to find a focused or selected item.
The center of this item is where we'll show the menu.
When there is no item, we default to 0,0
2019-01-15 14:34:53 +02:00
Katayama Hirofumi MZ 5525c81b2f
[SHELL32] Add CDefView::DefMessageSFVCB (Retrial of #1145) (#1151)
CORE-14976
2018-12-17 19:22:31 +09:00
Giannis Adamopoulos bcd309cb7a [SHELL32] CDefView: Don't assume that SetNameOf always works properly so initialize pidlNew to NULL before
CORE-14116
2018-11-11 20:28:27 +02:00
Giannis Adamopoulos c69ef281c0 [rosctrls.h] CListView: Add Arrange method
[SHELL32] CDefView: Start implementing Auto arrange.
So far its effect is only shown when the browser window resizes.
2018-10-22 23:51:37 +03:00
Giannis Adamopoulos 410cfbfe15 [SHELL32] CDefView: Disable auto arrange in list and details view mode.
This supersedes PR #927 and does it correctly.
2018-10-22 19:18:28 +03:00