mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-04-12 09:57:24 +10:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9606e11e0e | ||
|
|
7f04293361 | ||
|
|
e6b33a70e4 | ||
|
|
179a59ac1b | ||
|
|
2a5ed14599 |
@@ -17,7 +17,7 @@
|
||||
### Download
|
||||
If you just want to use it or looking for setup file, click here to download:
|
||||
|
||||
[](https://github.com/Open-Shell/Open-Shell-Menu/releases)
|
||||
[](https://github.com/Open-Shell/Open-Shell-Menu/releases/latest)
|
||||
|
||||
### Temporary Translation/Language Solution
|
||||
1. Download [language DLL](https://coddec.github.io/Classic-Shell/www.classicshell.net/translations/index.html)
|
||||
|
||||
@@ -793,10 +793,7 @@ CString CSettingsManager::LoadSettingsXml( const wchar_t *fname )
|
||||
}
|
||||
string.push_back(0);
|
||||
pSetting->value=CComVariant(&string[0]);
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -809,10 +806,7 @@ CString CSettingsManager::LoadSettingsXml( const wchar_t *fname )
|
||||
if (pSetting->type>=CSetting::TYPE_STRING)
|
||||
{
|
||||
pSetting->value=value;
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
else if (pSetting->type==CSetting::TYPE_BOOL || (pSetting->type==CSetting::TYPE_INT && pSetting[1].type!=CSetting::TYPE_RADIO) || pSetting->type==CSetting::TYPE_HOTKEY || pSetting->type==CSetting::TYPE_HOTKEY_ANY || pSetting->type==CSetting::TYPE_COLOR)
|
||||
{
|
||||
@@ -821,10 +815,7 @@ CString CSettingsManager::LoadSettingsXml( const wchar_t *fname )
|
||||
pSetting->value=CComVariant(val?1:0);
|
||||
else
|
||||
pSetting->value=CComVariant(val);
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
else if (pSetting->type==CSetting::TYPE_INT && pSetting[1].type==CSetting::TYPE_RADIO)
|
||||
{
|
||||
@@ -834,10 +825,7 @@ CString CSettingsManager::LoadSettingsXml( const wchar_t *fname )
|
||||
if (_wcsicmp(pRadio->name,value.bstrVal)==0)
|
||||
{
|
||||
pSetting->value=CComVariant(val);
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1828,10 +1828,7 @@ void CCustomTreeDlg::SerializeData( void )
|
||||
if ((m_pSetting->flags&CSetting::FLAG_DEFAULT) || wcscmp(strNew,strOld)!=0)
|
||||
SetSettingsDirty();
|
||||
m_pSetting->value=CComVariant(strNew);
|
||||
if (m_pSetting->value==m_pSetting->defValue)
|
||||
m_pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
m_pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
m_pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
ItemsChanged();
|
||||
}
|
||||
|
||||
@@ -2811,10 +2808,7 @@ void CTreeSettingsDlg::ToggleItem( HTREEITEM hItem, bool bDefault )
|
||||
{
|
||||
CSettingsLockWrite lock;
|
||||
pSetting->value=CComVariant(state?0:1);
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
SetSettingsDirty();
|
||||
}
|
||||
if (pSetting->flags&CSetting::FLAG_CALLBACK)
|
||||
@@ -2838,10 +2832,7 @@ void CTreeSettingsDlg::ToggleItem( HTREEITEM hItem, bool bDefault )
|
||||
{
|
||||
CSettingsLockWrite lock;
|
||||
pTarget->value=CComVariant(val);
|
||||
if (pTarget->value==pTarget->defValue)
|
||||
pTarget->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pTarget->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pTarget->flags&=~CSetting::FLAG_DEFAULT;
|
||||
SetSettingsDirty();
|
||||
}
|
||||
if (pParent->flags&CSetting::FLAG_CALLBACK)
|
||||
@@ -3052,10 +3043,7 @@ void CTreeSettingsDlg::ApplyEditBox( void )
|
||||
if (pSetting->value.vt!=VT_I4 || pSetting->value.intVal!=val)
|
||||
{
|
||||
pSetting->value=CComVariant(val);
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
}
|
||||
else if (pSetting->type==CSetting::TYPE_COLOR)
|
||||
@@ -3065,10 +3053,7 @@ void CTreeSettingsDlg::ApplyEditBox( void )
|
||||
if (pSetting->value.vt!=VT_I4 || pSetting->value.intVal!=val)
|
||||
{
|
||||
pSetting->value=CComVariant(val);
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
}
|
||||
else if (pSetting->type==CSetting::TYPE_HOTKEY || pSetting->type==CSetting::TYPE_HOTKEY_ANY)
|
||||
@@ -3076,10 +3061,7 @@ void CTreeSettingsDlg::ApplyEditBox( void )
|
||||
if (pSetting->value.vt!=VT_I4 || pSetting->value.intVal!=g_HotKey)
|
||||
{
|
||||
pSetting->value=CComVariant(g_HotKey);
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
}
|
||||
else if (pSetting->type==CSetting::TYPE_DIRECTORY)
|
||||
@@ -3101,10 +3083,7 @@ void CTreeSettingsDlg::ApplyEditBox( void )
|
||||
if (pSetting->value.vt!=VT_BSTR || str!=pSetting->value.bstrVal)
|
||||
{
|
||||
pSetting->value=CComVariant(str);
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
}
|
||||
SetSettingsDirty();
|
||||
|
||||
@@ -561,6 +561,7 @@ int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrC
|
||||
else if (wcsstr(lpstrCmdLine,L"-toggle")!=NULL) open=MSG_TOGGLE;
|
||||
else if (wcsstr(lpstrCmdLine,L"-open")!=NULL) open=MSG_OPEN;
|
||||
else if (wcsstr(lpstrCmdLine,L"-settings")!=NULL) open=MSG_SETTINGS;
|
||||
else if (wcsstr(lpstrCmdLine,L"-reloadsettings")!=NULL) open=MSG_RELOADSETTINGS;
|
||||
else if (wcsstr(lpstrCmdLine,L"-exit")!=NULL) open=MSG_EXIT;
|
||||
|
||||
{
|
||||
|
||||
@@ -1071,7 +1071,7 @@ void CMenuContainer::AddStandardItems( void )
|
||||
const StdMenuItem *pInlineParent=NULL;
|
||||
int searchProviderIndex=-1;
|
||||
m_SearchProvidersCount=0;
|
||||
MenuSkin::TIconSize mainIconSize=s_Skin.Main_icon_size;
|
||||
bool bSecondColumn=false;
|
||||
for (const StdMenuItem *pStdItem=m_pStdItem;;pStdItem++)
|
||||
{
|
||||
if (pStdItem->id==MENU_LAST)
|
||||
@@ -1089,9 +1089,8 @@ void CMenuContainer::AddStandardItems( void )
|
||||
if (m_bSubMenu && pStdItem->id==s_ShutdownCommand)
|
||||
continue;
|
||||
|
||||
const bool bTwoColumns = (!m_bSubMenu && s_Skin.TwoColumns);
|
||||
if (pStdItem->id==MENU_COLUMN_BREAK && bTwoColumns)
|
||||
mainIconSize=s_Skin.Main2_icon_size;
|
||||
if (pStdItem->id==MENU_COLUMN_BREAK && !m_bSubMenu && s_Skin.TwoColumns)
|
||||
bSecondColumn=true;
|
||||
|
||||
int stdOptions=GetStdOptions(pStdItem->id);
|
||||
if (!(stdOptions&MENU_ENABLED)) continue;
|
||||
@@ -1272,6 +1271,10 @@ void CMenuContainer::AddStandardItems( void )
|
||||
item.bSplit=item.bFolder && (item.pStdItem->settings&StdMenuItem::MENU_SPLIT_BUTTON)!=0;
|
||||
|
||||
// get icon
|
||||
MenuSkin::TIconSize mainIconSize=!bSecondColumn ? s_Skin.Main_icon_size : s_Skin.Main2_icon_size;
|
||||
if (item.bInline && mainIconSize==MenuSkin::ICON_SIZE_NONE)
|
||||
mainIconSize=s_Skin.Main_icon_size;
|
||||
|
||||
CItemManager::TIconSizeType iconSizeType;
|
||||
int refreshFlags;
|
||||
if (bSearchProvider7 || m_bSubMenu)
|
||||
|
||||
@@ -3624,10 +3624,7 @@ void CCustomMenuDlg7::SerializeData( void )
|
||||
stringBuilder.push_back(0);
|
||||
CSettingsLockWrite lock;
|
||||
m_pSetting->value=CComVariant(&stringBuilder[0]);
|
||||
if (m_pSetting->value==m_pSetting->defValue)
|
||||
m_pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
m_pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
m_pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
SetSettingsDirty();
|
||||
}
|
||||
|
||||
@@ -3854,10 +3851,7 @@ LRESULT CMenuStyleDlg::OnClick( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
|
||||
CheckDlgButton(IDC_RADIO_CLASSIC,pSetting->value.intVal==MENU_CLASSIC1?BST_CHECKED:BST_UNCHECKED);
|
||||
CheckDlgButton(IDC_RADIO_TWO_COLUMNS,pSetting->value.intVal==MENU_CLASSIC2?BST_CHECKED:BST_UNCHECKED);
|
||||
CheckDlgButton(IDC_RADIO_WIN7,pSetting->value.intVal==MENU_WIN7?BST_CHECKED:BST_UNCHECKED);
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
SetSettingsDirty();
|
||||
|
||||
SetSettingsStyle(styleFlag,CSetting::FLAG_MENU_MASK);
|
||||
@@ -3875,10 +3869,7 @@ LRESULT CMenuStyleDlg::OnEnabled( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL
|
||||
CSettingsLockWrite lock;
|
||||
CSetting *pSetting=FindSetting(L"EnableStartButton");
|
||||
pSetting->value=CComVariant(bEnabled);
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
SetSettingsDirty();
|
||||
}
|
||||
Update(false);
|
||||
@@ -3917,10 +3908,7 @@ LRESULT CMenuStyleDlg::OnButtonStyle( WORD wNotifyCode, WORD wID, HWND hWndCtl,
|
||||
CSettingsLockWrite lock;
|
||||
CSetting *pSetting=FindSetting(L"StartButtonType");
|
||||
pSetting->value=CComVariant(style);
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
SetSettingsDirty();
|
||||
}
|
||||
Update(false);
|
||||
@@ -3944,10 +3932,7 @@ LRESULT CMenuStyleDlg::OnPick( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& b
|
||||
CSettingsLockWrite lock;
|
||||
CSetting *pSetting=FindSetting(L"StartButtonPath");
|
||||
pSetting->value=CComVariant(path);
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
SetSettingsDirty();
|
||||
}
|
||||
Update(true);
|
||||
@@ -4586,10 +4571,7 @@ void UpgradeSettings( bool bShared )
|
||||
items.Replace(L"Command=recent_items\n",L"Command=recent_programs\n");
|
||||
items.Replace(L"Command=control_panel_categories\n",L"Command=control_panel\n");
|
||||
pSettingItems->value=items;
|
||||
if (pSettingItems->value==pSettingItems->defValue)
|
||||
pSettingItems->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSettingItems->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSettingItems->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
|
||||
// set initial menu style
|
||||
@@ -4597,10 +4579,7 @@ void UpgradeSettings( bool bShared )
|
||||
if (!pSettingStyle->IsLocked())
|
||||
{
|
||||
pSettingStyle->value=(bTwoColumns?1:0);
|
||||
if (pSettingStyle->value==pSettingStyle->defValue)
|
||||
pSettingStyle->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSettingStyle->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSettingStyle->flags&=~CSetting::FLAG_DEFAULT;
|
||||
SetSettingsStyle(bTwoColumns?CSetting::FLAG_MENU_CLASSIC2:CSetting::FLAG_MENU_CLASSIC1,CSetting::FLAG_MENU_MASK);
|
||||
}
|
||||
|
||||
@@ -4612,10 +4591,7 @@ void UpgradeSettings( bool bShared )
|
||||
if (!pSetting->IsDefault())
|
||||
{
|
||||
pSettingSkin->value=pSetting->value;
|
||||
if (pSettingSkin->value==pSettingSkin->defValue)
|
||||
pSettingSkin->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSettingSkin->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSettingSkin->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
}
|
||||
CSetting *pSettingOpt=FindSetting(bTwoColumns?L"SkinOptionsC2":L"SkinOptionsC1");
|
||||
@@ -4625,10 +4601,7 @@ void UpgradeSettings( bool bShared )
|
||||
if (!pSetting->IsDefault())
|
||||
{
|
||||
pSettingOpt->value=pSetting->value;
|
||||
if (pSettingOpt->value==pSettingOpt->defValue)
|
||||
pSettingOpt->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSettingOpt->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSettingOpt->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
}
|
||||
CSetting *pSettingVar=FindSetting(bTwoColumns?L"SkinVariationC2":L"SkinVariationC1");
|
||||
@@ -4638,10 +4611,7 @@ void UpgradeSettings( bool bShared )
|
||||
if (!pSetting->IsDefault())
|
||||
{
|
||||
pSettingVar->value=pSetting->value;
|
||||
if (pSettingVar->value==pSettingVar->defValue)
|
||||
pSettingVar->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSettingVar->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSettingVar->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4653,10 +4623,7 @@ void UpgradeSettings( bool bShared )
|
||||
if (!pSetting->IsDefault())
|
||||
{
|
||||
pSettingSkin->value=pSetting->value;
|
||||
if (pSettingSkin->value==pSettingSkin->defValue)
|
||||
pSettingSkin->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSettingSkin->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSettingSkin->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
}
|
||||
pSettingOpt=FindSetting(L"SkinOptionsA");
|
||||
@@ -4666,10 +4633,7 @@ void UpgradeSettings( bool bShared )
|
||||
if (!pSetting->IsDefault())
|
||||
{
|
||||
pSettingOpt->value=pSetting->value;
|
||||
if (pSettingOpt->value==pSettingOpt->defValue)
|
||||
pSettingOpt->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSettingOpt->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSettingOpt->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
}
|
||||
pSettingVar=FindSetting(L"SkinVariationA");
|
||||
@@ -4679,10 +4643,7 @@ void UpgradeSettings( bool bShared )
|
||||
if (!pSetting->IsDefault())
|
||||
{
|
||||
pSettingVar->value=pSetting->value;
|
||||
if (pSettingVar->value==pSettingVar->defValue)
|
||||
pSettingVar->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSettingVar->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSettingVar->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1300,7 +1300,7 @@ BEGIN
|
||||
IDS_NO_DBLCLICK "Single-click to open folder shortcuts"
|
||||
IDS_NO_DBLCLICK_TIP "When this is checked, single-clicking shortcuts (links) to folders will open them in explorer. Hovering over the shortcut will still expand sub-menus"
|
||||
IDS_BOLD_SETTINGS "Highlight modified settings"
|
||||
IDS_BOLD_SETTINGS_TIP "When this is checked, settings that have been modified from their defaults will be highlighted in bold"
|
||||
IDS_BOLD_SETTINGS_TIP "When this is checked, settings that have been modified will be highlighted in bold"
|
||||
IDS_SEARCH_HINT "Custom search hint"
|
||||
IDS_SEARCH_HINT_TIP "When this is checked, the hint text in the search box will be replaced"
|
||||
IDS_NEW_SEARCH_HINT "Custom search hint text"
|
||||
|
||||
Reference in New Issue
Block a user