Commit graph

79 commits

Author SHA1 Message Date
Whindmar Saksit 8841e3d7ba
[SHELL32] Handle the Progman Folder options message and tab switching support (#5574)
* Handle the "OnShowOptionsDlg" message
* Support switching tabs
* Update dll/win32/shell32/dialogs/folder_options.cpp
* Update dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
* ShowFolderOptionsDialog workaround
* Added Vista pages, define for magic message

---------

Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
Co-authored-by: Thamatip Chitpong <weedgamer131@gmail.com>
2024-04-04 18:53:57 -07:00
Katayama Hirofumi MZ 5daab33c59
[EXPLORER][SHELL32][SDK] Show/hide 'Run' menu item (#6592)
Improve Start Menu customization.
JIRA issue: CORE-16956
- Add SHSettingsChanged prototype to
  <undocshell.h>.
- Add SetRestriction helper function.
- Implement showing/hiding Run menu
  item of Start Menu.
2024-03-11 10:54:12 +09:00
Katayama Hirofumi MZ 49b2b1dab1
[SHELL32] Use STDMETHOD macro and keyword override (#6570)
For simplicity and short typing.
JIRA issue: CORE-19469
- Replace "virtual HRESULT STDMETHODCALLTYPE
  m" with "STDMETHOD(m)" (m is a method name).
- Replace "virtual t STDMETHODCALLTYPE m" with
  "STDMETHOD_(t, m)" (t is a type. m is a method
  name).
- Use "override" keyword as possible.
- CDefView should inherit IShellView3 due to
  override CreateViewWindow3 method.
- Fix CDefView::CreateViewWindow3 (parameter
  prcView is const RECT *, not LPRECT).
2024-03-05 08:43:39 +09:00
Oleg Dubinskiy eb96d377d1
[SHELL32] Allow custom shortcut overlay icon (#6419)
Use correct icon index in SIC_OverlayShortcutImage() to properly load
shortcut overlay icon from registry instead of always using default icon.
This allows to use custom shortcut icon set by user, in case it was
specified there.

As FIXME comment stated, the icon indexes were not implemented in the far
past, so this workaround was badly required. But now they are implemented,
so no need to always use default resource from shell32, enable the correct
code instead.

Also adapt this to CShellLink::CreateShortcutIcon() when the shortcut icon
is being changed in its properties dialog, as well as in CNewMenu class
when displaying menu items for creating a new folder or a shortcut.

Addendum to f9a5344254. CORE-14758
2024-03-04 16:30:43 +03:00
Joachim Henze a08b83a90b
[SHELL32] Fix 2 compiler warnings for the rls-cfg 'unused variable' (#6539)
I noticed it on releases/0.4.10 with the RosBEWin2.1.6 GCC4.7.2 *rls* configuration:

C:/0410rls/reactos/dll/win32/shell32/dialogs/filetypes.cpp: In function 'BOOL FileTypesDlg_InsertToLV(HWND, LPCWSTR, INT, LPCWSTR)':
C:/0410rls/reactos/dll/win32/shell32/dialogs/filetypes.cpp:663:9: warning: variable 'iLargeImage' set but not used [-Wunused-but-set-variable]
C:/0410rls/reactos/dll/win32/shell32/dialogs/filetypes.cpp: In function 'BOOL EditTypeDlg_UpdateEntryIcon(HWND, PEDITTYPE_DIALOG, LPCWSTR, INT)':
C:/0410rls/reactos/dll/win32/shell32/dialogs/filetypes.cpp:1040:9: warning: unused variable 'iLargeImage' [-Wunused-variable]

But I do assume, that MSVC compilers would also complain about that in *rls* cfg.

Please notice that before 0.4.10-dev-202-g 698cbc6184 which did splitup and restructure the code
this function was placed within the file folder_options.cpp and was named
InsertFileType(HWND hDlgCtrl, WCHAR * szName, PINT iItem, WCHAR * szFile)
and not yet within file_types.cpp with the new name
FileTypesDlg_InsertToLV(HWND hListView, LPCWSTR szName, INT iItem, LPCWSTR szFile)
Back then it did not have the iLargeImage variable yet, and it also didn't warn upon rls-cfg-compilation.
Therefore 0.4.10-dev-202-g 698cbc6184 from (#582) is indeed the *guilty revision* (2018-06-06).
It was done in the very first commit of that PR 2fe0eab721
It's bad practice to move and refactor/extend code in functionality within the very same commit, as it makes reviewing the changes much harder.

That assert never fired for the last 6 years, therefore it would have been okay also to strip it together with the variable, but using DBG_UNREFERENCED_LOCAL_VARIABLE(iLargeImage); allows to keep the assert for master.
2024-02-26 13:42:13 +01: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 edaeef9418
[SHELL32] Fix exception on modifying deleted file type (#5996)
Based on KRosUser's filetypes.patch. Check NULL for pEntry.
CORE-19324
2023-11-20 09:27:06 +09:00
Katayama Hirofumi MZ f95c789f2b
[SHELL32] Select 1st item after deletion of file type (#6007)
Based on KRosUser's filestypedel.patch.
- Select the first item after the user deleted a
  file type.
CORE-19325
2023-11-19 22:16:03 +09:00
Katayama Hirofumi MZ 00f192fa94
[SHELL32] Improve file properties dialog (#5852)
Based on KRosUser's patches.
- Add missing version strings "Comments" and
  "LegalTrademarks".
- Add version strings "PrivateBuild" and
  "SpecialBuild" if necessary.
- Trim the version string for pretty display.
CORE-19270, CORE-19114, CORE-19275
2023-10-30 15:34:03 +09:00
Arnav Bhatt 79e4efe04e
[MSGINA] Convert shutdown/logoff boxes back to modal dialog boxes (#5114)
- Convert all modeless dialog boxes back to modal dialog boxes.
- Use WM_TIMER to detect SHIFT key press instead, as you can't
  directly intercept messages on modal dialog boxes.
- Remove some unused functions.

Fixes explorer crash on shutdown cancel. CORE-17749
2023-07-14 15:02:40 +03:00
Tom Brogan a5bff2457a
[SHELL32] Improve disk properties pie chart (#5239)
CORE-18906

- Increase the vertical height of the disk space pie chart and center
  the "Drive %c" label below it.
- Add a 1 pixel outline at the sides and bottom of the disk properties
  pie chart.
- Explicitly set the outline pen instead of relying on the DC's default pen.
- Widen "Disk Cleanup" button on ja-JP locale, to prevent the text from
  being clipped due to the larger font size and spacing.
2023-05-05 13:35:32 +02: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
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
Kyle Katarn 32c20ab112
[SHELL32] Fix property sheets that can't be closed due to failed init (#4709)
When a PropertySheet fails to init, that fact is being logged
and it shows an empty page, but it can't be closed.

Handle second failure properly by using FAILED_UNEXPECTEDLY macro.

CORE-18333
2022-09-19 04:06:47 +03: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
Jose Carlos Jesus 7a83e0a145
[SHELL32] Remove horizontal scrollbar in File Types property page (#4412)
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2022-04-07 16:10:50 +03:00
Mark Jansen af33607a27
[SHELL32] Do not reopen the drive properties dialog on cancel (#4383)
CORE-18073
2022-03-12 15:25:48 +01:00
Stanislav Motylkov e105aefc1c
[SHELL32] List CD-ROM drives in the "Hardware" tab of disk properties
CORE-17397
2022-01-17 21:04:04 +03:00
Hermès Bélusca-Maïto 48d1a7bf4d
[SHELL32] Use the already existing g_pszShell32 instead of re-defining a new variable holding the very same string. 2022-01-09 22:44:21 +01: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
Joachim Henze 2cbb3ebdcb [SHELL32] EOL-white-space-fixes dialogs.cpp
Exclusively touching code that was recently
added during 0.4.15-dev'ing.
2021-07-06 23:27:32 +02:00
Doug Lyons 33c7c91b36
[SHELL32] Improve Start-Run Dialog Box Features (#3797) CORE-17351 CORE-16898
Improve performance of Start-Run Dialog Box Options

This will fix:
CORE-17351 'RunDlg fails calling URL without http'
and
CORE-16898 'RunCommand "iexplore" fails to open Wine IE'
Both regressed by 0.4.10-dev-419-g bfcbda227f
2021-07-06 19:36:15 +02:00
George Bișoc 2ae526a039
[SHELL32] Do not format the partition if it's a system drive
Implement a sanity check helper which determines if the partition is a system drive or not based on the %SystemDrive% environment variable, preventing the user from nuking accidentally the partition with ReactOS system files installed. :P

NOTE: This code serves as a temporary measure to prevent accidental formatting of the system drive. In the future most of this code has to be totally rewritten (and stopping syncing with WINE altogether) as well as FMIFS library code so that we're on par in terms of compatibility with Windows.
2021-04-10 17:38:23 +02:00
Katayama Hirofumi MZ bebdfda8b7
[NOTEPAD][WORDPAD][MSPAINT]... Use newer file open dialog (#3571)
Use new-style file open/save-as dialog.
- Add OFN_EXPLORER flag to OPENFILENAME structure in notepad, wordpad, mspaint, clipbrd, mmc, mplay32, mscutils, regedit, winhlp32, progman, shellbtrfs, cryptui, shell32, setupapi, vgafontedit, infinst, and vfdlib modules.
2021-04-01 22:50:32 +09:00
Katayama Hirofumi MZ a63213272a
[SHELL32] Enable auto-completion on 'Folder Options' > 'Change Icon' (#3522)
CORE-9281
2021-03-10 21:00:36 +09:00
George Bișoc 5fbf5e78e1
[SHELL32] Avoid code duplication on FAT and EXT2/BtrFS related FSs insertion (#3505)
This is a slight refactor of InsertDefaultClusterSizeForFs() code with the goal to avoid having the same code for FAT-related and EXT2/BtrFS filesystems.
2021-03-09 16:17:23 +01:00
Arnav Bhatt 06f57e1696
initial commit (#3506) 2021-03-06 19:13:05 +01:00
George Bișoc 9536f44c81
[SHELL32] Determine if the FS is of type FATX (#3398)
FATX is listed as a filesystem for format within the list but it's classed out from current proposed filesystems, thus spamming the debug output and not allowing to actually format a storage drive with this FS.
CORE-17272
2021-03-02 19:37:31 +01:00
Arnav Bhatt fd39a292af
[MSGINA][SHELL32] Rework friendly UI shutdown dialog box and implement friendly UI log off dialog box (#3399)
Implement the re-worked shut down dialog box as well as implementing fancy log off dialog box.
- Fancy shut down dialog box has been redesigned to be more comparable to of XP.
- Implement features that were missing earlier.
- Implement the fancy log off dialog which is more comparable to of XP.
2021-02-28 20:03:35 +09:00
Katayama Hirofumi MZ a822eadce6 [SHELL32] CoUninitialize only if CoInitialize* is successful
Technically CoUninitialize should be called only if CoInitializeEx succeeded (including S_FALSE).
CORE-1419
2020-09-28 20:13:28 +09:00
Katayama Hirofumi MZ 6b6f971939
[BROWSEUI][SHELL32] Enable Ctrl+Backspace in AutoComplete edit boxes (#3242)
The key combination Ctrl+Back is well working in auto-completion edit boxes. CORE-1419
2020-09-28 09:27:01 +09:00
Katayama Hirofumi MZ ed02f41af5 [SHELL32] Call SHAutoComplete on 'Run' dialog
CORE-9281
2020-09-25 15:59:30 +09:00
Kyle Katarn 6d4b853b8a
[SHELL32] Improve Format dialog debug log (trivial) (#3176)
- Logging of name for unknown filesystem.
- Fix some trace content as not only HDD could be affected.
2020-09-13 23:05:04 +02:00
Kyle Katarn 7d44c1cb07
[SHELL32] Show "size on disk" in file/folder properties (#3107)
Co-authored-by: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Co-authored-by: Adam Stachowicz <saibamenppl@gmail.com>
2020-09-10 20:48:40 +02: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
Jared Smudde 5b7be1572b
[SHELL32] Set the Run dialog to use the newer style browse for file dialog. (#2728)
Apply the OFN_EXPLORER flag to the Run dialog so the dialog uses the newer style browse dialog.
2020-05-04 12:53:35 +09:00
Jared Smudde 30e0c2430d [SHELL32] Disable all controls during format and re-enable after format is complete. (#2098) 2019-11-27 09:18:50 +01:00
Katayama Hirofumi MZ bd25333e24
[SHELL32] Make SHFormatDrive multi-thread (#2080)
CORE-12756
2019-11-26 18:26:25 +09:00
Serge Gautherie 0f92924a99 [REACTOS] Use explicit StringCb*W() (#2069) 2019-11-21 00:47:06 +01: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 f9d3c2c608
[SHELL32] Mark an unexpected failure as unexpected 2019-10-20 17:10:11 +02:00
Thomas Faber b2992e7a5e
[SHELL] IShellExtInit::Initialize uses PCIDLIST_ABSOLUTE. CORE-16385 2019-09-29 12:09:02 +02:00
Bișoc George 019e3ffe5f
[SHELL32] Recycle-Bin: Validate the MaxCapacity value with respect to the available disk space. (#1688)
CORE-12313

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2019-07-07 19:01:09 +02:00
Hermès Bélusca-Maïto 8a30801516
[SHELL32] Recycle-Bin: Minor code enhancements.
- Use _countof() and ZeroMemory().
- Fix case of 'BitBucket' registry key (Windows-compatible).
- Simplify code.
- Minor code formatting.
2019-07-07 17:56:51 +02:00
Bișoc George 818d660868 [SHELL32] Enable the "Apply" button when user takes action on the edit box control (#1720)
CORE-12312
2019-07-07 14:47:44 +02:00
Maxim Smirnov 39c0fd5722 [SHELL32] Fix version info in the file dialog 2019-04-03 00:51:24 +02:00
Jared Smudde 6707efc534 [SHELL32] Disable the Hardware tab in the properties dialog for Network drives (#1249)
This matches Windows behaviour.
2019-03-16 15:37:56 +01:00
Timo Kreuzer cfd1647914
[REACTOS] Fix misc 64 bit issues (#783)
* [WIN32K] Fix handle calculation in DbgGdiHTIntegrityCheck
* [NOTEPAD] Fix MSVC warnings
* [PSDK] Simplify *PROC definitions in windef.h
* [VIDEOPRT] Don't try to use NtVdmControl on x64
* [FREELDR] Fix some macros
* [CRT] Make qsort 64 bit compatible
* [NTOS] Use #ifndef _WIN64 instead of #ifdef _M_IX86 around C_ASSERTs
* [FAST486] Fix 64 bit warnings and change DWORD to ULONG, so it can be used in kernel mode
* [APPHELP_APITEST] Fix 64 bit issue
2019-01-05 10:50:11 +01:00
Katayama Hirofumi MZ 235042a16c
[CPL][SHELL32] Add icons to input, joy, sysdm, folder options (#1138)
CORE-15445
2018-12-16 08:40:47 +09:00