[EXPLORER][SHELL32] Expand/unexpand My Documents menu (#6594)

Follow-up to #6592. Improve Start Menu
customization.
JIRA issue: CORE-16956
- Add IDS_ADVANCED_EXPAND_MY_DOCUMENTS
  and IDS_ADVANCED_EXPAND_MY_PICTURES
  resource strings.
- Check L"CascadeMyDocuments" and
  L"CascadeMyPictures" registry values.
- Add GetAdvancedValue helper function.
- Implement CreateRecentMenu function.
This commit is contained in:
Katayama Hirofumi MZ 2024-03-11 13:18:58 +09:00 committed by GitHub
parent 4e10ebed40
commit 71285dff48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 94 additions and 9 deletions

View file

@ -109,6 +109,8 @@
/* These values must be synchronized with shell32 */
#define IDS_ADVANCED_DISPLAY_FAVORITES 30466
#define IDS_ADVANCED_DISPLAY_LOG_OFF 30467
#define IDS_ADVANCED_EXPAND_MY_DOCUMENTS 30469
#define IDS_ADVANCED_EXPAND_MY_PICTURES 30472
#define IDS_ADVANCED_DISPLAY_RUN 30474
#define IDS_ADVANCED_DISPLAY_ADMINTOOLS 30476

View file

@ -86,12 +86,12 @@ struct CUSTOMIZE_ENTRY
FN_CUSTOMIZE_WRITE fnWrite;
};
static DWORD CALLBACK CustomizeRead0(const CUSTOMIZE_ENTRY *entry)
static DWORD CALLBACK CustomizeReadAdvanced(const CUSTOMIZE_ENTRY *entry)
{
return GetAdvancedBool(entry->name, FALSE);
}
static BOOL CALLBACK CustomizeWrite0(const CUSTOMIZE_ENTRY *entry, DWORD dwValue)
static BOOL CALLBACK CustomizeWriteAdvanced(const CUSTOMIZE_ENTRY *entry, DWORD dwValue)
{
return SetAdvancedDword(entry->name, dwValue);
}
@ -112,9 +112,11 @@ static const CUSTOMIZE_ENTRY s_CustomizeEntries[] =
// FIXME: Make "StartMenuAdminTools" effective
//{ IDS_ADVANCED_DISPLAY_ADMINTOOLS, L"StartMenuAdminTools", CustomizeRead1, CustomizeWrite1 }, // FIXME
{ IDS_ADVANCED_DISPLAY_FAVORITES, L"StartMenuFavorites", CustomizeRead0, CustomizeWrite0 },
{ IDS_ADVANCED_DISPLAY_LOG_OFF, L"StartMenuLogoff", CustomizeRead0, CustomizeWrite0 },
{ IDS_ADVANCED_DISPLAY_RUN, L"NoRun", CustomizeReadRun, CustomizeWriteRest },
{ IDS_ADVANCED_DISPLAY_FAVORITES, L"StartMenuFavorites", CustomizeReadAdvanced, CustomizeWriteAdvanced },
{ IDS_ADVANCED_DISPLAY_LOG_OFF, L"StartMenuLogoff", CustomizeReadAdvanced, CustomizeWriteAdvanced },
{ IDS_ADVANCED_DISPLAY_RUN, L"NoRun", CustomizeReadRun, CustomizeWriteRest },
{ IDS_ADVANCED_EXPAND_MY_DOCUMENTS, L"CascadeMyDocuments", CustomizeReadAdvanced, CustomizeWriteAdvanced },
{ IDS_ADVANCED_EXPAND_MY_PICTURES, L"CascadeMyPictures", CustomizeReadAdvanced, CustomizeWriteAdvanced },
};
static VOID AddCustomizeItem(HWND hTreeView, const CUSTOMIZE_ENTRY *entry)