JamesAC added "Rainmeter Downloads" to the main context menu, which will open the user's browser to the skin downloads page in version 1.4.

This commit is contained in:
jsmorley 2010-10-25 19:58:53 +00:00
parent db4fac0877
commit 43751f3217
3 changed files with 11 additions and 4 deletions

View File

@ -3248,14 +3248,14 @@ void CRainmeter::ShowContextMenu(POINT pos, CMeterWindow* meterWindow)
AppendMenu(configMenu, 0, ID_CONTEXT_OPENSKINSFOLDER, L"Open Skins\' Folder"); AppendMenu(configMenu, 0, ID_CONTEXT_OPENSKINSFOLDER, L"Open Skins\' Folder");
AppendMenu(configMenu, 0, ID_CONTEXT_MANAGESKINS, L"Manage Skins..."); AppendMenu(configMenu, 0, ID_CONTEXT_MANAGESKINS, L"Manage Skins...");
InsertMenu(subMenu, 3, MF_BYPOSITION | MF_POPUP, (UINT_PTR)configMenu, L"Configs"); InsertMenu(subMenu, 4, MF_BYPOSITION | MF_POPUP, (UINT_PTR)configMenu, L"Configs");
} }
HMENU themeMenu = CreateThemeMenu(); HMENU themeMenu = CreateThemeMenu();
if (themeMenu) if (themeMenu)
{ {
InsertMenu(subMenu, 4, MF_BYPOSITION | MF_POPUP, (UINT_PTR)themeMenu, L"Themes"); InsertMenu(subMenu, 5, MF_BYPOSITION | MF_POPUP, (UINT_PTR)themeMenu, L"Themes");
InsertMenu(subMenu, 5, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); InsertMenu(subMenu, 6, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
} }
if (meterWindow) if (meterWindow)
@ -3267,6 +3267,7 @@ void CRainmeter::ShowContextMenu(POINT pos, CMeterWindow* meterWindow)
} }
else else
{ {
InsertMenu(subMenu, 1, MF_BYPOSITION, ID_CONTEXT_DOWNLOADS, L"Rainmeter Downloads");
InsertMenu(subMenu, 11, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); InsertMenu(subMenu, 11, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
// Create a menu for all active configs // Create a menu for all active configs
@ -3277,7 +3278,7 @@ void CRainmeter::ShowContextMenu(POINT pos, CMeterWindow* meterWindow)
{ {
CMeterWindow* mw = ((*iter).second); CMeterWindow* mw = ((*iter).second);
HMENU skinMenu = CreateSkinMenu(mw, index, configMenu); HMENU skinMenu = CreateSkinMenu(mw, index, configMenu);
InsertMenu(subMenu, 11, MF_BYPOSITION | MF_POPUP, (UINT_PTR)skinMenu, mw->GetSkinName().c_str()); InsertMenu(subMenu, 12, MF_BYPOSITION | MF_POPUP, (UINT_PTR)skinMenu, mw->GetSkinName().c_str());
++index; ++index;
} }

View File

@ -31,6 +31,7 @@
#define RAINMETER_OFFICIAL L"http://rainmeter.net/RainCMS/" #define RAINMETER_OFFICIAL L"http://rainmeter.net/RainCMS/"
#define RAINMETER_MANUAL L"http://rainmeter.net/RainCMS/?q=Manual" #define RAINMETER_MANUAL L"http://rainmeter.net/RainCMS/?q=Manual"
#define RAINMETER_MANUALBETA L"http://rainmeter.net/RainCMS/?q=ManualBeta" #define RAINMETER_MANUALBETA L"http://rainmeter.net/RainCMS/?q=ManualBeta"
#define RAINMETER_DOWNLOADS L"http://rainmeter.net/RainCMS/?q=Downloads"
extern CRainmeter* Rainmeter; extern CRainmeter* Rainmeter;
@ -406,6 +407,10 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
{ {
OpenAboutDialog(tray->GetWindow(), Rainmeter->GetInstance()); OpenAboutDialog(tray->GetWindow(), Rainmeter->GetInstance());
} }
if (wParam == ID_CONTEXT_DOWNLOADS)
{
LSExecute(NULL, RAINMETER_DOWNLOADS, SW_SHOWNORMAL);
}
else if(wParam == ID_CONTEXT_SHOW_HELP) else if(wParam == ID_CONTEXT_SHOW_HELP)
{ {
LSExecute(NULL, revision_beta ? RAINMETER_MANUALBETA : RAINMETER_MANUAL, SW_SHOWNORMAL); LSExecute(NULL, revision_beta ? RAINMETER_MANUALBETA : RAINMETER_MANUAL, SW_SHOWNORMAL);

View File

@ -19,6 +19,7 @@
#define ID_CONTEXT_REFRESH 4001 #define ID_CONTEXT_REFRESH 4001
#define ID_CONTEXT_QUIT 4002 #define ID_CONTEXT_QUIT 4002
#define ID_CONTEXT_ABOUT 4004 #define ID_CONTEXT_ABOUT 4004
#define ID_CONTEXT_DOWNLOADS 4005
#define ID_CONTEXT_CONFIGS_DEFAULT 4006 #define ID_CONTEXT_CONFIGS_DEFAULT 4006
#define ID_CONTEXT_EDITCONFIG 4008 #define ID_CONTEXT_EDITCONFIG 4008
#define ID_CONTEXT_CLOSESKIN 4009 #define ID_CONTEXT_CLOSESKIN 4009