summaryrefslogtreecommitdiff
path: root/plugins/NewStory
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewStory')
-rw-r--r--plugins/NewStory/src/history_dlg.cpp13
-rw-r--r--plugins/NewStory/src/stdafx.h1
2 files changed, 13 insertions, 1 deletions
diff --git a/plugins/NewStory/src/history_dlg.cpp b/plugins/NewStory/src/history_dlg.cpp
index 2d557db8b6..388a027732 100644
--- a/plugins/NewStory/src/history_dlg.cpp
+++ b/plugins/NewStory/src/history_dlg.cpp
@@ -826,6 +826,18 @@ public:
void onClick_Export(CCtrlButton *)
{
+ auto *pDriver = GetDatabasePlugin("JSON");
+ if (pDriver == nullptr) {
+ CMStringW wszText(TranslateT("Import plugin is missing to perform this operation."));
+ if (ServiceExists(MS_PU_SHOWLIST)) {
+ wszText.AppendFormat(L" %s", TranslateT("Do you want to install it using Plugin Updater?"));
+ if (IDYES == MessageBoxW(m_hwnd, wszText, TranslateT("Missing plugin"), MB_YESNO | MB_ICONQUESTION))
+ CallService(MS_PU_SHOWLIST);
+ }
+ else MessageBoxW(m_hwnd, wszText, TranslateT("Missing plugin"), MB_OK | MB_ICONERROR);
+ return;
+ }
+
wchar_t FileName[MAX_PATH];
VARSW tszMirDir(L"%miranda_userdata%\\NewStoryExport");
@@ -871,7 +883,6 @@ public:
if (PathFileExistsW(FileName))
DeleteFileW(FileName);
- auto *pDriver = GetDatabasePlugin("JSON");
auto *pDB = pDriver->Export(FileName);
pDB->BeginExport();
pDB->ExportContact(m_hContact);
diff --git a/plugins/NewStory/src/stdafx.h b/plugins/NewStory/src/stdafx.h
index 42fcc8a89b..f6cb9c2c89 100644
--- a/plugins/NewStory/src/stdafx.h
+++ b/plugins/NewStory/src/stdafx.h
@@ -60,6 +60,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <m_utils.h>
#include "m_NewStory.h"
+#include "m_PluginUpdater.h"
#include "m_smileyadd.h"
#ifndef MTEXT_NOHELPERS
#define MTEXT_NOHELPERS