diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-08-28 13:25:31 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-08-28 13:25:31 +0000 |
commit | f199e3980cc460070bcb3d4472bcbde98972e5ef (patch) | |
tree | fe27634da0e7f062ca1ebbf03fbb13aebf2e82f2 /plugins/Toaster/src | |
parent | 1a392a24332058fa634f0970d085d8d41b83c175 (diff) |
Toaster: chack for windows 8
git-svn-id: http://svn.miranda-ng.org/main/trunk@15057 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Toaster/src')
-rw-r--r-- | plugins/Toaster/src/main.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/plugins/Toaster/src/main.cpp b/plugins/Toaster/src/main.cpp index 4f3515ffdf..34c33b4bd0 100644 --- a/plugins/Toaster/src/main.cpp +++ b/plugins/Toaster/src/main.cpp @@ -28,11 +28,24 @@ DWORD WINAPI DllMain(HINSTANCE hInstance, DWORD, LPVOID) extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- if (IsWinVer8Plus())
- return &pluginInfo;
-
- MessageBox(NULL, TranslateT("This plugin only supports Windows 8 or higher"), _T(MODULE), MB_OK | MB_ICONERROR);
- return NULL;
+ if (!IsWinVer8Plus())
+ {
+ MessageBox(NULL, TranslateT("This plugin only supports Windows 8 or higher"), _T(MODULE), MB_OK | MB_ICONERROR);
+ return NULL;
+ }
+ else if (IsWinVer8Plus() && !IsWinVer10Plus())
+ {
+ if (ServiceExists("AddToStartMenu/Add"))
+ {
+ CallService("AddToStartMenu / Add");
+ }
+ else
+ {
+ MessageBox(NULL, TranslateT("In Windows8 desktop application must have a shortcut on the Start menu. Please, install \"AddToStartMenu\" plugin."), _T(MODULE), MB_OK | MB_ICONERROR);
+ return NULL;
+ }
+ }
+ return &pluginInfo;
}
|