gadamopoulos in reactos

[SHLWAPI] -Addendum to 75533. Pass the id offset to IContextMenu::InvokeCommand. Fixes launching applications from the start menu. CORE-13680
[SHELL32] -Greatly optimize the already hacky implementations of ILIsEqual, ILIsParent and ILFindChild by not using the crappy _ILSimpleGetText but the new one _ILHACKCompareSimpleIds. CORE-13681
    • -21
    • +56
    /trunk/reactos/dll/win32/shell32/wine/pidl.c
[COMCTL32] -DrawShadowText: Don't print an error when GdiAlphaBlend fails. This can happen when the painting is outside the clip region. Some themes tend to move text elements in weird places so as just to hide them so this only causes spam.
    • -2
    • +1
    /trunk/reactos/dll/win32/comctl32/commctrl.c
[SHELL32]

- CDefaultContextMenu: Make it respect the IContextMenu interface and expect menu id offsets instead of real menu ids and actually use the idCmdFirst and idCmdLast parameters in QueryContextMenu. Make the default part use and existed menu from the resources but changed accordingly so the ids of its elements can be adjusted to the next free id of the constructed menu. Rename InsertMenuItemsOfDynamicContextMenuExtension to AddShellExtensionsToMenu, DoDynamicShellExtensions to InvokeShellExt, and DoStaticShellExtensions to InvokeRegVerb. Make AddShellExtensionsToMenu and AddStaticContextMenusToMenu behave like QueryContextMenu to return the number of ids they occupy. Add two helpers SHGetMenuIdFromMenuMsg and SHSetMenuIdInMenuMsg to change the id that is contained in the lparam of WM_DRAWITEM and WM_MEASUREITEM before forwarding them.

- CDefView: When calling QueryContextMenu before using TrackPopupMenu, use 1 as the first id that will filled by the IContextMenu because we want 0 to be used as an indicator that the menu was canceled. Use SHGetMenuIdFromMenuMsg and SHSetMenuIdInMenuMsg to change the lparam of the messages forwarded to the IContextMenu accordingly.

- CDefViewBckgrndMenu: Add a hack so as to keep the code as simple as possible while respecting idCmdFirst and idCmdLast.

- CNewMenu: Remove a hack that was needed because WM_DRAWITEM didn't come with the menu id offset but with the real menu id.

- CDesktopFolder, CFSFolder: Make the callbacks avoid adding an extra separators.

After that shell extensions in menus should work better and callbacks to shell folders should really be able to add several menu items.

    • -8
    • +6
    /trunk/reactos/dll/win32/shell32/lang/it-IT.rc
    • -8
    • +6
    /trunk/reactos/dll/win32/shell32/lang/zh-CN.rc
    • -8
    • +6
    /trunk/reactos/dll/win32/shell32/lang/nl-NL.rc
    • -8
    • +6
    /trunk/reactos/dll/win32/shell32/lang/pl-PL.rc
    • -8
    • +6
    /trunk/reactos/dll/win32/shell32/lang/zh-TW.rc
    • -8
    • +7
    /trunk/reactos/dll/win32/shell32/lang/en-US.rc
    • -8
    • +6
    /trunk/reactos/dll/win32/shell32/lang/es-ES.rc
    • -8
    • +6
    /trunk/reactos/dll/win32/shell32/lang/ro-RO.rc
    • -8
    • +6
    /trunk/reactos/dll/win32/shell32/lang/ru-RU.rc
    • -8
    • +6
    /trunk/reactos/dll/win32/shell32/lang/ca-ES.rc
    • -8
    • +6
    /trunk/reactos/dll/win32/shell32/lang/da-DK.rc
    • -8
    • +6
    /trunk/reactos/dll/win32/shell32/lang/sq-AL.rc
  1. … 24 more files in changeset.
[UXTHEME] -Implement taking into account the flags set by SetThemeAppProperties. Now the shim that disables themes per application works.
    • -5
    • +25
    /trunk/reactos/dll/win32/uxtheme/themehooks.c
    • -0
    • +12
    /trunk/reactos/dll/win32/uxtheme/system.c
[UXTHEME_APITEST] -Add tests for SetThemeAppProperties.
[USER32] -Make it clear when VersionRegisterClass is used. This should be called after a versioned class was not found hence it should appear after some failures in win32k (and this is exactly how RegisterClassNameW was designed to be used, after a failure to find a class).
[COMCTL32] -Fix a typo.
[SHELL32] -Restore some code I incorrectly removed in r75360. CORE-13564
[SYSSETUP] -Implement a wizard page that lets the user select lautus as the default theme. If the user keeps pressing enter, the theme will not be applied.
    • -1
    • +126
    /trunk/reactos/dll/win32/syssetup/wizard.c
    • -0
    • +11
    /trunk/reactos/dll/win32/syssetup/lang/bg-BG.rc
    • -0
    • +11
    /trunk/reactos/dll/win32/syssetup/lang/ru-RU.rc
    • binary
    /trunk/reactos/dll/win32/syssetup/resources/thmclassic.bmp
    • -0
    • +11
    /trunk/reactos/dll/win32/syssetup/lang/zh-TW.rc
    • -0
    • +11
    /trunk/reactos/dll/win32/syssetup/lang/sv-SE.rc
    • -0
    • +11
    /trunk/reactos/dll/win32/syssetup/lang/he-IL.rc
    • -0
    • +2
    /trunk/reactos/dll/win32/syssetup/syssetup.rc
    • -0
    • +11
    /trunk/reactos/dll/win32/syssetup/lang/pt-BR.rc
    • -0
    • +11
    /trunk/reactos/dll/win32/syssetup/lang/el-GR.rc
    • -0
    • +11
    /trunk/reactos/dll/win32/syssetup/lang/et-EE.rc
    • -0
    • +11
    /trunk/reactos/dll/win32/syssetup/lang/it-IT.rc
    • -0
    • +11
    /trunk/reactos/dll/win32/syssetup/lang/lt-LT.rc
    • -0
    • +11
    /trunk/reactos/dll/win32/syssetup/lang/id-ID.rc
    • -0
    • +11
    /trunk/reactos/dll/win32/syssetup/lang/es-ES.rc
  1. … 20 more files in changeset.
[COMCTL32] -Implement BUTTON_IMAGELIST_ALIGN_RIGHT, BUTTON_IMAGELIST_ALIGN_TOP, BUTTON_IMAGELIST_ALIGN_BOTTOM
    • -8
    • +62
    /trunk/reactos/dll/win32/comctl32/button.c
[COMCTL32] -BUTTON_PaintWithTheme: Draw checked pushlike buttons as pressed.
[hivecls.inf] -Add an option to immediately enable an msstyles file with right click.
    • -0
    • +1
    /trunk/reactos/boot/bootdata/hivecls.inf
[DESK.CPL]

-Improve the hack that lets it process arguments by using the process command line instead of the one shell32 gives to the cpl.

-Implement a new action called ActivateMSTheme that activates an msstyle file without showing any gui. If no file is passed, the classic theme is activated thus making it possible to switch themes from command line (or any other application may need to switch themes by launching desk.cpl).

    • -0
    • +48
    /trunk/reactos/dll/cpl/desk/theme.c
    • -0
    • +1
    /trunk/reactos/dll/cpl/desk/appearance.h
    • -15
    • +18
    /trunk/reactos/dll/cpl/desk/desk.c
[SYSSETUP.INF] -Move registering comctl32.dll and ole32.dll much earlier in the setup.
    • -2
    • +10
    /trunk/reactos/media/inf/syssetup.inf
[COMCTL32] -Fix some failed tests for TB_GETMETRICS. Add support for button spacing.
    • -10
    • +8
    /trunk/reactos/dll/win32/comctl32/toolbar.c
[COMCTL32_APITESTS] -Add toolbar tests for TB_SETBUTTONSIZE, TB_SETPADDING, TB_GETBUTTONSIZE, TB_GETMETRICS.
[EXPLORER] -Fix calculatting the size of the tray icons for ral this time. When positioning the windows in the tray take into account the theme content margins.
    • -14
    • +14
    /trunk/reactos/base/shell/explorer/trayntfy.cpp
[UXTHEME] -Fix for the 3rd or 4th time the bug where the caption window overflows over the caption buttons which was last broken by me in 74960. CORE-13435
    • -8
    • +12
    /trunk/reactos/dll/win32/uxtheme/nonclient.c
[UXHTEME] - ThemeDrawCaptionText: Get the TMT_CONTENTALIGNMENT theme property and position the text accordingly. Patch by Stas'M. CORE-13600
    • -1
    • +9
    /trunk/reactos/dll/win32/uxtheme/nonclient.c
[COMCTL32] -Take into account the upper theme margin when drawing the icon so that it doesn't look misplaced. This makes the themed taskbar buttons look more or less good despite the fact that we completely ignore the left and right margins.
[EXPLORER] -Implement changing the size of the icons in the notification area when the non client metrics change. Now they always have the size of the title bar icon. Center vertically or horizontally the notification area in the taskbar.
    • -30
    • +96
    /trunk/reactos/base/shell/explorer/trayntfy.cpp
    • -0
    • +3
    /trunk/reactos/base/shell/explorer/traywnd.cpp
[COMCTL32] -Implement taking into account the contents margins from the theme when calculating the size of the toolbar button. Using it while painting the button will be implemented in a later commit as it caused me some problems.
    • -15
    • +39
    /trunk/reactos/dll/win32/comctl32/toolbar.c
[EXPLORER] -Restore a call to RegLoadSettings while handling WM_DISPLAYCHANGE which was removed in r74221. This is not really correct since it resets the size and position of the taskbar but I add it back since it updates the cached rects for all four positions.
    • -0
    • +3
    /trunk/reactos/base/shell/explorer/traywnd.cpp
[EXPLORER] -Implement the minimum taskbar size for the vertical position.
    • -1
    • +7
    /trunk/reactos/base/shell/explorer/traywnd.cpp
    • -19
    • +11
    /trunk/reactos/base/shell/explorer/taskband.cpp
[BROWSEUI]

-CBandSite: Remove CCS_NORESIZE style. This is a hack probably needed because our rebar control is buggy.

[EXPLORER]

-CTaskBand::GetBandInfo: Use the toolbar button size as the minimum and integral size for the band.

-CTaskSwitchWnd: Use the system small icon size for the size of the icon. Recreate the image list if this size changes. This together with the size of the font are the only factors for the size of the toolbar and consequently for the size of the band and if it is the only band, the size of the taskbar. Don't use TB_SETBUTTONSIZE. Now the size of the image list and the font dictate the size.

-CTrayWindow: In the classic theme make the start button have the same height with the tasks toolbar button height. Improve the calculation of the size of the taskbar in FitToRebar.

These changes should make the taskbar and the toolbar have a proper size. On top of that the taskbar is finally resizable (however our rebar is too buggy and still fills only the first line in the taskbar). While testing this I noticed that moving the taskbar in the sides of the screen is buggy now. I'm not sure if this was uncovered by these changes, if this was broken before or this was caused by these changes (looks unlikely to me) but will be fixed in subsequent commits).

    • -3
    • +21
    /trunk/reactos/base/shell/explorer/traywnd.cpp
    • -33
    • +32
    /trunk/reactos/base/shell/explorer/taskswnd.cpp
    • -7
    • +7
    /trunk/reactos/base/shell/explorer/taskband.cpp
[SHELL32]

-CRegFolder: Implement CRegFolder::EnumObjects. Change its constructor to receive an extra parameter for the name of the key that should be enumerated.

-CEnumIDListBase: Add a new method called AppendItemsFromEnumerator to facilitate merging the contents from one IEnumIDList to another.

-Use the above in the enumerators of CControlPanelFolder, CDesktopFolder and CDrivesFolder to make them significantly simpler.

[SHELL32] -Move CFSExtractIcon_CreateInstance to CFSFolder.cpp
    • -169
    • +0
    /trunk/reactos/dll/win32/shell32/folders.cpp
[SHELL32]

- CDesktopFolder: Create the enumerators of the internal fs folders and add their items in its own list instead of calling CreateFolderEnumList which enumerates ... files.

- Remove CEnumIDListBase::CreateFolderEnumList and move its code to CFileSysEnum::Initialize.

[COMCTL32_APITEST] - Log the dwDrawStage when the NM_CUSTOMDRAW is received to make the test slightly more descriptive.