Commit graph

31 commits

Author SHA1 Message Date
Katayama Hirofumi MZ b1de3bfb2b
[SHELL32] Fix ParseDisplayName Part 4 (#6747)
Follow-up to #6746. Reduce SHParseDisplayName
failures.
JIRA issue: CORE-19495
- Re-implement CDrivesFolder::ParseDisplayName
  method.
2024-04-15 03:25:20 +09:00
Oleg Dubinskiy f9a5344254
[SHELL32] Allow using custom desktop/folders/drives icons (#6421)
Implement proper reading the current user's icons from registry.

CORE-14758

- Load the icons specified by user in registry in the following keys:
  "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}\DefaultIcon"
  (virtual namespace folders)
  "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons"
  (filesystem folders and drives)
- Implement two functions HCU/HLM_GetIconW for reading the icons
  from mentioned HKCU and HKLM keys accordingly.
- Use HCR_RegGetIconW for falling back to default icons.
  This function always loads only default icons, even when
  the custom ones are specified by user.
- Refactor SIC_LoadOverlayIcon to use newly implemented HLM_GetIconW.

These changes apply to:
- virtual namespace folders and other desktop items (like My Computer,
  My Documents, Network Places, Recycle Bin, Web Browser (aka Internet
  Explorer), Control Panel and some of its items);
- normal filesystem directories;
- all types of drives (fixed disk drives, removable drives, CD-ROMs,
  RamDisks and network drives). Handle invalid drives, setting blank
  icon for them, since they cannot be recognized or mounted correctly.
  Also, load the autorun icons first to avoid overriding them by the
  icons defined in registry.

I've rechecked twice: excluding Start Menu icons, Desktop Workspace icon
and some FS folder icons that have their own desktop.ini configuration
files (we probably should write the custom icons we load to these configs,
as Windows does it, perhaps with WritePrivateProfileStringW), all other
icons can be changed now (only ones that can be changed on XP SP3 / 2003
SP2) via built-in system tools (like Desktop icons in desk.cpl) or any
3rd-party tools without modifying system resources.

Also all icons for the known file types can be changed,
same as before my changes.

Regarding Start Menu icons:
- changing them should be correctly implemented in explorer
  instead of shell32, as the former is responsible for the Start Menu
  and partially for the taskbar;
- in order to actually use all of them, we need to implement modern
  Start Menu first.

Useful reference: http://www.winfaq.de/faq_html/Content/tip0000/onlinefaq.php?h=tip0162.htm
2024-02-29 00:20:47 +03:00
Joachim Henze 6f91b6c0fe [SHELL32] Tweak formatting and logging
Some style-improvements I wanted to apply before a planned backport.
E.g. The biggest source-file CDefView.cpp in [SHELL32] can be shrinked considerably by stripping some outdated
comments from 10 and more years ago, when this class was still non-OOP and named ShellView.
Less excessive line-lengths also here and there.

In case it is not obvious when reviewing: In the beginning of CDevView.cpp in the declaration-part I just
reduced the indentation-level by 4 spaces for a big block.

Some shell classes were touched during 0.4.15-dev'ing for fixes like the 'unkown'-typo in
0.4.15-dev-6323-g 3854a5d8e9 for example
or missing \n were added to dbgprints like in
0.4.15-dev-4492-g 03422451b3
Touched again here, because I want to port those improvements back,
but don't intend to increase the size in older releases.

The commit looks big, but does consist solely of trivialities.
There is no functional change in this commit, aside the logging ofc.
2024-02-20 02:08:56 +01:00
Katayama Hirofumi MZ 62eaad1811
[SHELL32] CD-ROM drive shouldn't be renamed (#5461)
- Add _ILGetDriveType helper function.
- Use _ILGetDrive and GetDriveType functions to determine the drive type.
- If it was a CD-ROM drive, then remove SFGAO_CANRENAME flag.
CORE-18272
2023-07-20 16:53:04 +09:00
Doug Lyons 035790dda5
[SHELL32] Fix detail view in My Computer showing Comment in 'Total Size' column (#5438) CORE-19000
Fixes the regression of 0.4.15-dev-5526-g 4c25af5b
2023-07-15 18:14:35 +02:00
Hermès Bélusca-Maïto 3854a5d8e9
[CODEBASE] Fix "uknown" / "unkown" etc. typos.
Only done in our own code, not in 3rd-party or in PSDK headers
(official ones also have such typos in defines...)

(NOTE: apparent "Uknown" typo in dll/cpl/sysdm/smbios.c is on-purpose:
typo by the manufacturer.)
2023-07-15 14:19:04 +02:00
Egor Ananyin d1718366de
[SHELL32] Read the label for a CD from autorun.inf (#4945)
Some CDs may set a custom label using autorun.inf.
Read the label from the file, and if it succeeds, show it to the user.

CORE-18567
2022-12-20 22:30:09 +03:00
Jose Carlos Jesus 685728bc24
[SHELL32] Prevent a second call to Drive Properties dialog (#4888)
CDefaultContextMenu::DoProperties provides a fallback call
to the property sheet testing the return value of the _DoCallback method,
which is ultimately the return value of SH_ShowDriveProperties().

SH_ShowDriveProperties() sometimes returns an HRESULT, however it is marked
as returning a BOOL. Then, DrivesContextMenuCallback() always handles this
result as an HRESULT.

Fix SH_ShowDriveProperties() to always return a BOOL as it is intended,
and in DrivesContextMenuCallback() handle the result accordingly.

CORE-18537
2022-11-20 21:10:11 +03:00
Stanislav Motylkov a09e903398
[SHELL32] CDrivesFolder: Unhardcode pqcminfo->idCmdFirst value
DFM_MERGECONTEXTMENU handler works better now. However there is difference
between ours and Windows' menu building systems, which has to be fixed.

Addendum to 64657051c3. CORE-13841 CORE-18577
2022-11-14 21:56:01 +03: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
Thomas Csovcsity 860d3544af
[SHELL32] Folders: Adjust column sequence in details view (#4279)
Adjust column sequence in folder view to match WinXP and Win2k3 order.
CORE-11846
2022-05-05 17:05:18 +02: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
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 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
Katayama Hirofumi MZ 1d1bb53321
[SHELL32] Fix regression #2703 CORE-17041 (trial) (#3046)
CORE-17041
2020-08-16 11:16:44 +09:00
Charles Ambrye e978ec6125
[SHELL32] Return ERROR_INVALID_DRIVE if the drive type is unknown or there is no volume mounted (#2703)
Return ERROR_INVALID_DRIVE if the drive is either unknown or unmounted.
2020-05-09 21:54:15 +09:00
Katayama Hirofumi MZ 1f3cb13fb9
[SHELL32] Distinguish floppy and removable drives (#2645)
Distinguish floppy drive and non-floppy removable drive in icon and description. CORE-10221
2020-05-06 00:35:01 +09:00
Katayama Hirofumi MZ aedba8441a
[SHELL32] Improve UI of drive formatting (#2048)
- Add stub window (StubWindow32) to the drive formatting dialog to avoid locked.
- Separate the thread of drive formatting.
- Move CStubWindow32 codes.
CORE-12756
2019-11-20 10:00:26 +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
Thomas Faber a66bee2837
[SHELLFOLDERS] Gracefully handle NULL pidl in CDrivesFolder::BindToObject. CORE-16403
Fixes one of many crashes in shell32_winetest:shlfolder.
2019-09-29 12:42:26 +02:00
Thomas Faber 6b0d2c2a2c
[SHELL] Fix more IPersistFolder::Initialize prototypes. CORE-16385
Addendum to c2b476bd77.
2019-09-29 12:07:43 +02:00
Thomas Faber b90c24d640
[SHELL] IPersistFolder2::GetCurFolder takes a PIDLIST_ABSOLUTE*. CORE-16385 2019-09-22 16:19:09 +02:00
Serge Gautherie cb77f1701f [SHELL32][STOBJECT] Enforce ShellExecuteW(..., file, parameters, ...)
CORE-16299
2019-08-19 13:01:08 +02:00
Katayama Hirofumi MZ 55469633cf [SHELL32] Add 'Properties' menu item in My Computer (#647)
- Add a Shell_DefaultContextMenuCallBack() helper function.
- Implement the IContextMenuCB interface in CDrivesFolder.
CORE-12509
2018-07-08 17:01:12 +02:00
Katayama Hirofumi MZ c74bd5d662 [SHELL32] Enable custom CD/DVD icons (#639)
Properly show the custom icon specified in "autorun.inf" file in CDs/DVDs.
CORE-14766
2018-06-27 23:06:54 +02:00
Giannis Adamopoulos 730d81b9f7 [SHELL32] Fix some test failures 2018-02-20 10:15:23 +02:00
Giannis Adamopoulos 6d9a0d0fd4 [SHELL32] CDrivesFolder: Fix showing the drive capacity. CORE-14201 2018-01-13 21:27:57 +02:00
Katayama Hirofumi MZ 87d276f05d [SHELL32] Don't show error when closing disk prop sheet (#144)
CORE-14035
2017-11-25 11:27:20 +02:00
Pierre Schweitzer 45b543202d
[SHELL32] Drop slash when dismounting a remote drive. MPR and NP are expecting a drive letter.
This fixes dismounting a network drive using explorer.
2017-11-18 21:27:30 +01:00
Katayama Hirofumi MZ 64657051c3 [SHELL32] CDrivesFolder: Implement the eject and disconnect menu items. CORE-13841
- The items are shown only for the drives where they are applicable.
- May not work fully yet due to bugs in the drivers.
2017-11-18 16:55:08 +02:00
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
Renamed from reactos/dll/win32/shell32/folders/CDrivesFolder.cpp (Browse further)