From f199e3980cc460070bcb3d4472bcbde98972e5ef Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Fri, 28 Aug 2015 13:25:31 +0000 Subject: Toaster: chack for windows 8 git-svn-id: http://svn.miranda-ng.org/main/trunk@15057 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Toaster/src/main.cpp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'plugins/Toaster/src') 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; } -- cgit v1.2.3