From c49904b95a9308af965c8e31a6f2f8056cc0ce17 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 23 Mar 2018 14:46:53 +0300 Subject: related to #1197: clicking Yes shall redirect a user to plugin's download page --- plugins/Db3x_mmap/src/init.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'plugins/Db3x_mmap/src') diff --git a/plugins/Db3x_mmap/src/init.cpp b/plugins/Db3x_mmap/src/init.cpp index c02e4bcd19..0910d0a1b2 100644 --- a/plugins/Db3x_mmap/src/init.cpp +++ b/plugins/Db3x_mmap/src/init.cpp @@ -65,8 +65,8 @@ static int grokHeader(const wchar_t *profile) // returns 0 if all the APIs are injected otherwise, 1 #define CONVERT_MSG LPGEN("This database is in old format that isn't supported anymore. Press Yes to convert it to the new format or No to return back") -#define MISSING_DB_MSG LPGEN("To open this database you need to install the dbx_mdbx plugin. Install it using Plugin Updater") -#define MISSING_PLUG_MSG LPGEN("To open this database you need to install the Import plugin. Install it using Plugin Updater") +#define MISSING_DB_MSG LPGEN("To open this database you need to install the dbx_mdbx plugin. Click Yes to download it from Miranda NG's site") +#define MISSING_PLUG_MSG LPGEN("To open this database you need to install the Import plugin. Click Yes to download it from Miranda NG's site") static MDatabaseCommon* LoadDatabase(const wchar_t *profile, BOOL bReadOnly) { @@ -78,7 +78,8 @@ static MDatabaseCommon* LoadDatabase(const wchar_t *profile, BOOL bReadOnly) if (!bReadOnly) { DATABASELINK *pLink = GetDatabasePlugin("dbx_mdbx"); if (pLink == nullptr) { - MessageBoxW(nullptr, TranslateT(MISSING_DB_MSG), L"Miranda NG", MB_OK); + if (IDYES == MessageBoxW(nullptr, TranslateT(MISSING_DB_MSG), L"Miranda NG", MB_YESNOCANCEL)) + Utils_OpenUrl("https://wiki.miranda-ng.org/index.php?title=Plugin:Dbx_mdbx"); return nullptr; } @@ -102,7 +103,8 @@ LBL_Error: } if (SetServiceModePlugin(L"import") != SERVICE_ONLYDB) { - MessageBoxW(nullptr, TranslateT(MISSING_PLUG_MSG), L"Miranda NG", MB_OK); + if (IDYES == MessageBoxW(nullptr, TranslateT(MISSING_PLUG_MSG), L"Miranda NG", MB_OK)) + Utils_OpenUrl("https://wiki.miranda-ng.org/index.php?title=Plugin:Import"); goto LBL_Error; } -- cgit v1.2.3