The !bangs can be now used from command line even if there are no active configs.

Included RainBrowser to the build.
This commit is contained in:
Kimmo Pekkola
2009-10-10 08:20:28 +00:00
parent 4a5e76ce7b
commit f7970be6b5
5 changed files with 47 additions and 25 deletions

View File

@ -660,6 +660,18 @@ CRainmeter::~CRainmeter()
GdiplusShutdown(m_GDIplusToken);
}
/*
** ExecuteBang
**
** Runs a bang command. This is called from the main application
** when a command is given as a command line argument.
**
*/
void ExecuteBang(LPCTSTR szBang)
{
if (Rainmeter) Rainmeter->ExecuteCommand(szBang, NULL);
}
/*
** Initialize
**
@ -1958,6 +1970,7 @@ void CRainmeter::ShowContextMenu(POINT pos, CMeterWindow* meterWindow)
{
AppendMenu(configMenu, MF_SEPARATOR, 0, NULL);
AppendMenu(configMenu, 0, ID_CONTEXT_OPENSKINSFOLDER, L"Open Skins\' Folder");
AppendMenu(configMenu, 0, ID_CONTEXT_MANAGESKINS, L"Manage Skins...");
InsertMenu(subMenu, 3, MF_BYPOSITION | MF_POPUP, (UINT_PTR)configMenu, L"Configs");
}

View File

@ -235,6 +235,7 @@ extern "C"
EXPORT_PLUGIN int initModuleEx(HWND ParentWnd, HINSTANCE dllInst, LPCSTR szPath);
EXPORT_PLUGIN void quitModule(HINSTANCE dllInst);
EXPORT_PLUGIN void Initialize(bool DummyLS, LPCTSTR CmdLine);
EXPORT_PLUGIN void ExecuteBang(LPCTSTR szBang);
}
#endif

View File

@ -472,6 +472,12 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
command += L"\\Addons\\RainThemes\\RainThemes.exe\"";
LSExecute(tray->GetWindow(), command.c_str(), SW_SHOWNORMAL);
}
else if(wParam == ID_CONTEXT_MANAGESKINS)
{
std::wstring command = L"\"" + Rainmeter->GetPath();
command += L"\\Addons\\RainBrowser\\RainBrowser.exe\"";
LSExecute(tray->GetWindow(), command.c_str(), SW_SHOWNORMAL);
}
else if(wParam == ID_CONTEXT_QUIT)
{
if (Rainmeter->GetDummyLitestep()) PostQuitMessage(0);

View File

@ -55,6 +55,7 @@
#define ID_CONTEXT_OPENSKINSFOLDER 4044
#define ID_CONTEXT_SKINMENU_OPENSKINSFOLDER 4045
#define ID_CONTEXT_MANAGETHEMES 4046
#define ID_CONTEXT_MANAGESKINS 4047
#define ID_CONFIG_EDIT 30000
#define ID_CONFIG_FIRST 30001