mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-04-14 04:38:26 +10:00
Few improvements (#65)
* Fix naming inconsistencies 'Menu' vs 'StartMenu' * Installer: Remove Facebook link * Installer: Remove PayPal donate remnants * OpenShellReadme: Remove info about product version
This commit is contained in:
@@ -1527,7 +1527,7 @@ void CItemManager::UpdateNewPrograms( const POINT &balloonPos )
|
||||
{
|
||||
CRegKey regKey;
|
||||
ULONGLONG val1, val2;
|
||||
if (regKey.Open(HKEY_CURRENT_USER,L"Software\\OpenShell\\Menu",KEY_READ)==ERROR_SUCCESS)
|
||||
if (regKey.Open(HKEY_CURRENT_USER,L"Software\\OpenShell\\StartMenu",KEY_READ)==ERROR_SUCCESS)
|
||||
{
|
||||
if (regKey.QueryQWORDValue(L"LastProgramsTime",val1)!=ERROR_SUCCESS)
|
||||
val1=0;
|
||||
@@ -1608,7 +1608,7 @@ void CItemManager::LoadOldItems( void )
|
||||
{
|
||||
m_OldItemInfos.clear();
|
||||
CRegKey regItems;
|
||||
if (regItems.Open(HKEY_CURRENT_USER,L"Software\\OpenShell\\Menu",KEY_READ)==ERROR_SUCCESS)
|
||||
if (regItems.Open(HKEY_CURRENT_USER,L"Software\\OpenShell\\StartMenu",KEY_READ)==ERROR_SUCCESS)
|
||||
{
|
||||
ULONG size=0;
|
||||
regItems.QueryBinaryValue(L"OldItems",NULL,&size);
|
||||
@@ -1721,8 +1721,8 @@ void CItemManager::AddOldItems( const std::vector<unsigned> &hashes )
|
||||
}
|
||||
|
||||
CRegKey regItems;
|
||||
if (regItems.Open(HKEY_CURRENT_USER,L"Software\\OpenShell\\Menu")!=ERROR_SUCCESS)
|
||||
regItems.Create(HKEY_CURRENT_USER,L"Software\\OpenShell\\Menu");
|
||||
if (regItems.Open(HKEY_CURRENT_USER,L"Software\\OpenShell\\StartMenu")!=ERROR_SUCCESS)
|
||||
regItems.Create(HKEY_CURRENT_USER,L"Software\\OpenShell\\StartMenu");
|
||||
|
||||
if (m_OldItemInfos.empty())
|
||||
regItems.SetBinaryValue(L"OldItems",NULL,0);
|
||||
|
||||
@@ -4273,8 +4273,8 @@ void CMenuContainer::InitWindowInternal( bool bDontShrink, const POINT &corner,
|
||||
ULONGLONG curTime;
|
||||
GetSystemTimeAsFileTime((FILETIME*)&curTime);
|
||||
CRegKey regKey;
|
||||
if (regKey.Open(HKEY_CURRENT_USER,L"Software\\OpenShell\\Menu",KEY_WRITE)!=ERROR_SUCCESS)
|
||||
regKey.Create(HKEY_CURRENT_USER,L"Software\\OpenShell\\Menu");
|
||||
if (regKey.Open(HKEY_CURRENT_USER,L"Software\\OpenShell\\StartMenu",KEY_WRITE)!=ERROR_SUCCESS)
|
||||
regKey.Create(HKEY_CURRENT_USER,L"Software\\OpenShell\\StartMenu");
|
||||
|
||||
if (m_pParent->m_Items[m_ParentIndex].id==MENU_PROGRAMS)
|
||||
regKey.SetQWORDValue(L"LastProgramsTime",curTime);
|
||||
@@ -7544,7 +7544,7 @@ HWND CMenuContainer::ToggleStartMenu( int taskbarId, bool bKeyboard, bool bAllPr
|
||||
s_bWin7Style=GetSettingInt(L"MenuStyle")==MENU_WIN7;
|
||||
|
||||
if (!s_StartMenuMsg)
|
||||
s_StartMenuMsg=RegisterWindowMessage(L"Menu.StartMenuMsg");
|
||||
s_StartMenuMsg=RegisterWindowMessage(L"OpenShellMenu.StartMenuMsg");
|
||||
s_StartMenuParams.uEdge=0xFFFFFFFF;
|
||||
s_TaskBarId=taskbarId;
|
||||
TaskbarInfo *taskBar=GetTaskbarInfo(taskbarId);
|
||||
@@ -8728,8 +8728,8 @@ void CMenuContainer::SetMenuMode( TMenuMode mode, bool bKeyboard )
|
||||
ULONGLONG curTime;
|
||||
GetSystemTimeAsFileTime((FILETIME*)&curTime);
|
||||
CRegKey regKey;
|
||||
if (regKey.Open(HKEY_CURRENT_USER,L"Software\\OpenShell\\Menu",KEY_WRITE)!=ERROR_SUCCESS)
|
||||
regKey.Create(HKEY_CURRENT_USER,L"Software\\OpenShell\\Menu");
|
||||
if (regKey.Open(HKEY_CURRENT_USER,L"Software\\OpenShell\\StarMenu",KEY_WRITE)!=ERROR_SUCCESS)
|
||||
regKey.Create(HKEY_CURRENT_USER,L"Software\\OpenShell\\StartMenu");
|
||||
regKey.SetQWORDValue(L"LastProgramsTime",curTime);
|
||||
if (s_OldMenuState.mode!=MODE_SEARCH)
|
||||
m_pProgramsTree->SetFocus();
|
||||
|
||||
@@ -993,7 +993,7 @@ private:
|
||||
static HRESULT __stdcall CreateAccessible( ComCallData *pData );
|
||||
static HRESULT __stdcall ReleaseAccessible( ComCallData *pData );
|
||||
|
||||
// To control the placement of the start menu, send Menu.StartMenuMsg message right after the start menu is created but before it is displayed
|
||||
// To control the placement of the start menu, send OpenShellMenu.StartMenuMsg message right after the start menu is created but before it is displayed
|
||||
// The lParam must point to StartMenuParams
|
||||
// monitorRect - the entire area available to the start menu (sub-menus will use it). It is usually the monitor area but can be less if the Desktop app is docked in Win8
|
||||
// uEdge - the location of the taskbar - ABE_BOTTOM, ABE_LEFT, etc
|
||||
|
||||
@@ -860,8 +860,8 @@ void CProgramsTree::AddMetroApps( std::vector<CTreeItem*> &items )
|
||||
ULONGLONG curTime;
|
||||
GetSystemTimeAsFileTime((FILETIME*)&curTime);
|
||||
CRegKey regKey;
|
||||
if (regKey.Open(HKEY_CURRENT_USER,L"Software\\OpenShell\\Menu",KEY_WRITE)!=ERROR_SUCCESS)
|
||||
regKey.Create(HKEY_CURRENT_USER,L"Software\\OpenShell\\Menu");
|
||||
if (regKey.Open(HKEY_CURRENT_USER,L"Software\\OpenShell\\StartMenu",KEY_WRITE)!=ERROR_SUCCESS)
|
||||
regKey.Create(HKEY_CURRENT_USER,L"Software\\OpenShell\\StartMenu");
|
||||
regKey.SetQWORDValue(L"LastAppsTime",curTime);
|
||||
}
|
||||
|
||||
|
||||
@@ -564,13 +564,13 @@ static void FindTaskBar( void )
|
||||
{
|
||||
if (!g_TaskBar)
|
||||
{
|
||||
g_StartMenuMsg=RegisterWindowMessage(L"Menu.StartMenuMsg");
|
||||
g_StartMenuMsg=RegisterWindowMessage(L"OpenShellMenu.StartMenuMsg");
|
||||
FindTaskBar(GetCurrentProcessId());
|
||||
if (g_TaskBar)
|
||||
{
|
||||
g_HotkeyShiftID=GlobalAddAtom(L"Menu.HotkeyShift");
|
||||
g_HotkeyCSMID=GlobalAddAtom(L"Menu.HotkeyCSM");
|
||||
g_HotkeyWSMID=GlobalAddAtom(L"Menu.HotkeyWSM");
|
||||
g_HotkeyShiftID=GlobalAddAtom(L"OpenShellMenu.HotkeyShift");
|
||||
g_HotkeyCSMID=GlobalAddAtom(L"OpenShellMenu.HotkeyCSM");
|
||||
g_HotkeyWSMID=GlobalAddAtom(L"OpenShellMenu.HotkeyWSM");
|
||||
EnableHotkeys(HOTKEYS_NORMAL);
|
||||
srand(GetTickCount());
|
||||
}
|
||||
@@ -2896,7 +2896,7 @@ static void InitStartMenuDLL( void )
|
||||
DWORD progThread=GetWindowThreadProcessId(g_ProgWin,NULL);
|
||||
g_ProgHook=SetWindowsHookEx(WH_GETMESSAGE,HookProgManThread,NULL,progThread);
|
||||
g_StartHook=SetWindowsHookEx(WH_GETMESSAGE,HookDesktopThread,NULL,GetCurrentThreadId());
|
||||
HWND hwnd=FindWindow(L"Menu.CStartHookWindow",L"StartHookWindow");
|
||||
HWND hwnd=FindWindow(L"OpenShellMenu.CStartHookWindow",L"StartHookWindow");
|
||||
LoadLibrary(L"StartMenuDLL.dll"); // keep the DLL from unloading
|
||||
if (hwnd) PostMessage(hwnd,WM_CLEAR,0,0); // tell the exe to unhook this hook
|
||||
if (GetWinVersion()>=WIN_VER_WIN8)
|
||||
@@ -3120,7 +3120,7 @@ static void CleanStartMenuDLL( void )
|
||||
CMenuFader::ClearAll();
|
||||
UnhookDropTarget();
|
||||
EnableHotkeys(HOTKEYS_CLEAR);
|
||||
HWND hwnd=FindWindow(L"Menu.CStartHookWindow",L"StartHookWindow");
|
||||
HWND hwnd=FindWindow(L"OpenShellMenu.CStartHookWindow",L"StartHookWindow");
|
||||
UnhookWindowsHookEx(g_ProgHook);
|
||||
UnhookWindowsHookEx(g_StartHook);
|
||||
if (g_AppManagerHook) UnhookWindowsHookEx(g_AppManagerHook);
|
||||
|
||||
@@ -81,7 +81,7 @@ extern HWND g_ProgWin;
|
||||
extern HMONITOR g_WSMHMonitor;
|
||||
extern int g_CurrentCSMTaskbar, g_CurrentWSMTaskbar;
|
||||
|
||||
enum TMenuMsgParam // wParam for the Menu.StartMenuMsg message
|
||||
enum TMenuMsgParam // wParam for the OpenShellMenu.StartMenuMsg message
|
||||
{
|
||||
MSG_TOGGLE, // toggles the classic start menu
|
||||
MSG_TOGGLENEW, // toggles the Windows start menu
|
||||
|
||||
Reference in New Issue
Block a user