Improve customization of Start Menu.
JIRA issue: CORE-19494
- Add SmallStartMenu flag to TW_STRUCKRECTS2
structure.
- Add IDS_ADVANCED_SMALL_START_MENU
resource string.
- Update g_TaskbarSettings.sr.SmallStartMenu via
a callback function.
- Check g_TaskbarSettings.sr.SmallStartMenu
when Start Menu is updated.
Simplify code and reduce binary size.
JIRA issue: CORE-19363
- Use shlwapi!QISearch for QueryInterface
implementation.
- Add delay link to shlwapi.
- Define QITABENT macro in <shlwapi.h>.
Add transparent 16x16 icon (just small picec of transparent background) as resource and use it for 50, 51, 52, 53 resource IDs.
Define it as IDI_SHELL_NONE_XX for all four IDs appropriately (since the icon displays nothing).
These resources are not used by anything yet, but they are confirmed to exist as resources with 50, 51, 52, 53 IDs in shell32.dll from Windows XP/Server 2003.
This allows to correct the ordering of all other resources those come starting from index 54, and hence it fixes the following icons displayed incorrectly after restoring to default system icon set via Stardock IconPackager 5.1:
- Control Panel folder icon;
- Folder Options item icon in Control Panel;
- My Music special folder in My Documents;
- several File extensions icons (.ini, .txt etc).
The icons are fixed as in the preview of IconPackager app, same in ReactOS itself.
Now only Web Browser item icon on the Desktop remains invalid. All other icons are restored correctly.
CORE-19471
Fix a minor UI problem. IDC_SEARCH_COMBOBOX was border-less.
It was wrong.
JIRA issue: N/A
- Add WS_BORDER window style to IDC_SEARCH_COMBOBOX
combo box in IDD_SEARCH_DLG dialog resource.
Fix checkboxed treeview selection display.
JIRA issue: CORE-19480
- Make the first argument of TREEVIEW_ToggleItemState non-const.
- Select the item by calling TREEVIEW_SelectItem in TREEVIEW_ToggleItemState.
Improve Start Menu usability.
JIRA issue: CORE-19477
- Add CSIDLFromID helper function.
- Return a context menu interface at CShellMenuCallback::OnGetContextMenu.
FIXME: CSIDL_CONTROLS, CSIDL_NETWORK, and CSIDL_PRINTERS context menu
wrongly open My Computer.
Correct the details of Start Menu customization.
JIRA issue: CORE-16956
- Hide the setting item if the item is restricted.
- Don't change restriction in Explorer.
- Fix Start Menu settings for restriction and registry.
- Fix and simplify code.
Follow-up to #6594. Improve Start Menu customization.
JIRA issue: CORE-16956
- Add IDS_ADVANCED_EXPAND_CONTROL_PANEL, IDS_ADVANCED_EXPAND_PRINTERS,
and IDS_ADVANCED_EXPAND_NET_CONNECTIONS resource strings.
- Check the "CascadeControlPanel", "CascadeNetworkConnections", and "CascadePrinters"
registry values.
- Modify Start Menu by using AddOrSetMenuItem and AddStartMenuItems helper
functions in CShellMenuCallback::OnGetSubMenu.
shell32!SHRestricted is necessary to make shell working well.
JIRA issue: CORE-11515
- Add dll/win32/shell32/wine/PolicyData.h to define the shell policy data.
- Define POLICYDATA structure and SHELL_NO_POLICY constant
in <shlwapi_undoc.h>.
- Fix shell32!SHRestricted, shell32!SHSettingsChanged,
shlwapi!SHGetRestriction, and shlwapi!SHRestrictionLookup functions.
Implementing the back-end of
the Language bar...
JIRA issue: CORE-19361
- Rename GetLocaleInfoString
as GetHKLName.
- Implement GetHKLSubstitute
helper function.
- Fix GetHKLDesctription function.
Unify the private IMM32 macro
definitions. Refactoring...
JIRA issue: CORE-19361
- Define IS_SPECIAL_HKL macro
in <imm32_undoc.h>.
- Use IS_IME_HKL and
IS_SPECIAL_HKL macros of
<imm32_undoc.h>,
in kbswitch and input modules.
Implementing the back-end of
the Language bar...
JIRA issue: CORE-19361
- Add mlng.cpp and mlng.h.
- Modify msctf.spec.
- Implement MLNGINFO
structure and CStaticIconList
class.
- Implement TF_InitMlngInfo,
TF_MlngInfoCount,
TF_InatExtractIcon,
TF_GetMlngIconIndex, and
TF_GetMlngHKL functions.
Additionally:
- Reuse printers and fonts folder icons from shell32,
the same way as it was done in c0dbde0436.
The printers folder icon was missing here though.
- Fix "look_key" => "lock_key" typos.
This fixes Administrative Tools and Fonts Folder icons in Control Panel
when being restored to defaults with Stardock IconPackager 5.1.
CORE-19471
Add "My Documents" and "My Pictures" icons, with 100 and 101 identifiers
accordingly. They are duplicating the icons from shell32.
This fixes My Documents desktop icon becoming blank when reverting back
to the system default icons after applying 3rd party icon set in Stardock
IconPackager 5.1, and also fixes icons of some items in the application
preview dialog.
It's confirmed that mydocs.dll on Windows XP SP3 and Server 2003 SP2
includes these two icon resources with the said identifiers.
The icons there are being an exact copy from shell32 as well.
CORE-19471 CORE-14758
Display correct menu on right-dragging
an item in Folder explorer bar to Desktop.
JIRA issue: CORE-19474
In CExplorerBand::OnTreeItemDragging
method:
- Use GetAttributesOf to get the
attributes of a folder item.
- Use correct dwEffect value for
DoDragDrop call.
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).
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.
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.
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
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.
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.
Follow-up to #6550. Avoid same name
overwriting.
JIRA issue: CORE-5866
- Rename the filename if there was duplicate.
- Simplify CreateShortcut function.
- Rename IDC_SHORTCUT_LOCATION as
IDC_LINK_LOCATION to resolve name conflict
with shell32/shresdef.h.
proper accelerators for en-US (like english 2k3sp2)
proper accelerators for de-DE (like german XPSP3)
slightly improved accelerators for fr-FR
and mark existing accelerator collisions for all other languages with FIXME-comments.
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com> for ukrainian header
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org> for fr-FR
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
JIRA issue: CORE-17453, CORE-12328
In CMenuBand::_TrackContextMenu method:
- Use 100 for idCmdFirst, instead of zero.
- Use uCommand - idCmdFirst for cmi.lpVerb.
Zero is an invalid command ID.
Now we can open special folder shortcut, thanks to #6546.
Let's allow users to create various shortcut files.
JIRA issue: CORE-5866
- Remove BIF_RETURNONLYFSDIRS flag because
the system can open special folder shortcuts now.
- Add LPITEMIDLIST pidlTarget to CREATE_LINK_CONTEXT
structure.
- Use pidlTarget if the target is a special folder.
- Fix CShellLink::DoOpen for arguments.
pszDisplayName is for display name, not for full path.
JIRA issue: CORE-5866
- If lpBrowseInfo->pszDisplayName is valid,
use SHGetFileInfoW to get display name.
- Don't use SHGetPathFromIDListW to get
display name. It's wrong.
Retrial of #5052. Improve keyboard
interface usability.
JIRA issue: CORE-18823
- Add GetAddressBarAccessKey
helper function to get the
accelerator of Address bar from
resource string
IDS_ADDRESSBANDLABEL.
- Implement Alt+D (or something)
accelerator in CAddressBand::
TranslateAcceleratorIO method by
handling WM_SYSKEYDOWN and
WM_SYSCHAR messages.
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.
Improve code flexibility. 3700+
lines of msctfime.cpp was too long.
JIRA issue: CORE-19360
- Split msctfime.cpp code to some
source files and header files.
Supporting the Language bar...
JIRA issue: CORE-19363
- Delete TFInitLib and TFUninitLib
calls from ctfmon.exe.
- Delete TFUninitLib from Cicero
library.
- Implement InitDisplayAttrbuteLib
in msctfime.ime.
- Improve CIC_LIBTHREAD structure.
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.
Refactoring and reduce binary size.
JIRA issue: CORE-19268
- Add cicero static library in sdk/lib/cicero folder.
- Delete sdk/include/reactos/cicero folder.
- Adapt the dependencies to these changes.
- Make ctfmon, msutb, and msctf modules UNICODE.
- Adapt SetWindowResourceText() function from
`msconfig_new/utils.c` LoadResourceStringEx() function.
- Drop `version.rc` in favor of `uxtheme.rc` since we have forked uxtheme.
Addendum to 118869f69. CORE-5991
CRAM_MAGIC is being used to validate the info context structure contents
when the driver routines are being called, so partially revert 8be912147.
Just report "MSVC" as the main FourCC handler in CRAM_GetInfo() instead.
CORE-19453 CORE-15382
Improve header compatibility and
code quality.
JIRA issue: CORE-19268
- Improve <imm.h> and <immdev.h>
compatibility by correctly choosing
the items.
- Use <immdev.h> instead of
<ddk/immdev.h>.
- Move INPUTCONTEXTDX, IMEINFOEX,
IMEDPI, and CLIENTIMC into
<imm32_undoc.h>.
- Adapt to these changes.