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:
ge0rdi
2018-08-13 06:28:42 +02:00
committed by Xenhat
parent ad05abe113
commit 2fb9448ffd
30 changed files with 70 additions and 107 deletions
+6 -6
View File
@@ -121,7 +121,7 @@ class CStartHookWindow: public CWindowImpl<CStartHookWindow>
{
public:
DECLARE_WND_CLASS(L"Menu.CStartHookWindow")
DECLARE_WND_CLASS(L"OpenShellMenu.CStartHookWindow")
BEGIN_MSG_MAP( CStartHookWindow )
MESSAGE_HANDLER( WM_OPEN, OnOpen )
@@ -145,7 +145,7 @@ protected:
LRESULT CStartHookWindow::OnOpen( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled )
{
if (g_TaskBar) ::PostMessage(g_TaskBar,RegisterWindowMessage(L"Menu.StartMenuMsg"),wParam,lParam);
if (g_TaskBar) ::PostMessage(g_TaskBar,RegisterWindowMessage(L"OpenShellMenu.StartMenuMsg"),wParam,lParam);
return 0;
}
@@ -477,7 +477,7 @@ int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrC
dll=LoadLibraryEx(path,NULL,LOAD_LIBRARY_AS_DATAFILE|LOAD_LIBRARY_AS_IMAGE_RESOURCE);
}
DllLoadTranslationResources(dll,NULL);
if (!DllSaveAdmx(COMPONENT_MENU,"Menu.admx","Menu.adml","MenuADMX.txt"))
if (!DllSaveAdmx(COMPONENT_MENU,"OpenShellStartMenu.admx","OpenShellStartMenu.adml","MenuADMX.txt"))
return 1;
if (!DllSaveAdmx(COMPONENT_SHARED,"OpenShell.admx","OpenShell.adml","OpenShellADMX.txt"))
return 1;
@@ -593,7 +593,7 @@ int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrC
bool bDefaultDesktop=(_wcsicmp(deskName,L"Default")==0);
wchar_t mutexName[1024];
Sprintf(mutexName,_countof(mutexName),L"Menu.Mutex.%s.%s",userName,deskName);
Sprintf(mutexName,_countof(mutexName),L"OpenShellMenu.Mutex.%s.%s",userName,deskName);
free(deskName);
if (open==CMD_NONE)
@@ -616,7 +616,7 @@ int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrC
AllowSetForegroundWindow(process);
HWND taskBar=FindTaskBar(process);
if (taskBar)
PostMessage(taskBar,RegisterWindowMessage(L"Menu.StartMenuMsg"),(open==CMD_TOGGLE_NEW)?MSG_TOGGLENEW:MSG_TOGGLE,0);
PostMessage(taskBar,RegisterWindowMessage(L"OpenShellMenu.StartMenuMsg"),(open==CMD_TOGGLE_NEW)?MSG_TOGGLENEW:MSG_TOGGLE,0);
else
PostMessage(progWin,WM_SYSCOMMAND,SC_TASKLIST,(open==CMD_TOGGLE_NEW)?'WSMK':'CSM');
}
@@ -624,7 +624,7 @@ int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrC
else if (open!=CMD_NONE)
{
AllowSetForegroundWindow(process);
HWND hwnd=FindWindow(L"Menu.CStartHookWindow",L"StartHookWindow");
HWND hwnd=FindWindow(L"OpenShellMenu.CStartHookWindow",L"StartHookWindow");
if (hwnd) PostMessage(hwnd,WM_OPEN,open,0);
}
if (open==MSG_EXIT && hMutex && WaitForSingleObject(hMutex,2000)==WAIT_OBJECT_0)
+1 -1
View File
@@ -28,7 +28,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{87D5FE20-AF86-458A-9AA3-3131EB06179B}</ProjectGuid>
<RootNamespace>Menu</RootNamespace>
<RootNamespace>StartMenu</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
+4 -4
View File
@@ -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);
+5 -5
View File
@@ -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();
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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);
}
+6 -6
View File
@@ -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);
+1 -1
View File
@@ -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
@@ -162,7 +162,7 @@ typedef HRESULT (__stdcall *FDllGetClassObject)(REFCLSID,REFIID,LPVOID*);
static HMODULE g_ExplorerModule=NULL;
static void StartMenu( void )
static void StartStartMenu( void )
{
STARTUPINFO startupInfo={sizeof(STARTUPINFO)};
PROCESS_INFORMATION processInfo;
@@ -208,7 +208,7 @@ STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
LogToFile(STARTUP_LOG,L"StartMenuHelper: DllGetClassObject2");
if (GetSettingBool(L"AutoStart"))
StartMenu();
StartStartMenu();
FDllGetClassObject func=(FDllGetClassObject)GetProcAddress(g_ExplorerModule,"DllGetClassObject");
if (func)
res=func(g_ExplorerClsid,riid,ppv);