diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/database/database.cpp | 4 | ||||
-rw-r--r-- | src/modules/plugins/newplugins.cpp | 13 |
2 files changed, 10 insertions, 7 deletions
diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp index cd6e8f8460..3ae83a71c0 100644 --- a/src/modules/database/database.cpp +++ b/src/modules/database/database.cpp @@ -513,13 +513,13 @@ int LoadDatabaseModule(void) if (fileExist(szProfile)) {
// file isn't locked, just no driver could open it.
TCHAR buf[256];
- TCHAR* p = _tcsrchr(szProfile, '\\');
+ TCHAR *p = _tcsrchr(szProfile, '\\');
mir_sntprintf(buf, SIZEOF(buf), TranslateT("Miranda was unable to open '%s', it's in an unknown format.\nThis profile might also be damaged, please run DbChecker which should be installed."), p ? ++p : szProfile);
MessageBox(0, buf, TranslateT("Miranda can't understand that profile"), MB_OK | MB_ICONERROR);
}
else if (!FindMirandaForProfile(szProfile)) {
TCHAR buf[256];
- TCHAR* p = _tcsrchr(szProfile, '\\');
+ TCHAR *p = _tcsrchr(szProfile, '\\');
mir_sntprintf(buf, SIZEOF(buf), TranslateT("Miranda was unable to open '%s'\nIt's inaccessible or used by other application or Miranda instance"), p ? ++p : szProfile);
retry = MessageBox(0, buf, TranslateT("Miranda can't open that profile"), MB_RETRYCANCEL | MB_ICONERROR) == IDRETRY;
}
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index f30efaa103..5c16845279 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -149,12 +149,8 @@ int LoadStdPlugins() if (pluginDefault[i].pImpl)
continue;
- if (!LoadCorePlugin(pluginDefault[i])) {
- TCHAR tszBuf[512];
- mir_sntprintf(tszBuf, SIZEOF(tszBuf), TranslateT("Core plugin '%s' cannot be loaded or missing. Miranda will exit now"), pluginDefault[i].stdplugname);
- MessageBox(NULL, tszBuf, TranslateT("Fatal error"), MB_OK | MB_ICONSTOP);
+ if (!LoadCorePlugin(pluginDefault[i]))
return 1;
- }
}
if (pluginDefault[13].pImpl == NULL)
@@ -543,6 +539,11 @@ bool TryLoadPlugin(pluginEntry *p, bool bDynamic) return true;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+// Core plugins support
+
+static TCHAR tszCoreErr[] = LPGENT("Core plugin '%s' cannot be loaded or missing. Miranda will exit now");
+
bool LoadCorePlugin(MuuidReplacement& mr)
{
TCHAR exe[MAX_PATH], tszPlugName[MAX_PATH];
@@ -553,6 +554,8 @@ bool LoadCorePlugin(MuuidReplacement& mr) pluginEntry* pPlug = OpenPlugin(tszPlugName, _T("Core"), exe);
if (pPlug->pclass & PCLASS_FAILED) {
LBL_Error:
+ MessageBox(NULL, CMString(FORMAT, TranslateTS(tszCoreErr), mr.stdplugname), TranslateT("Fatal error"), MB_OK | MB_ICONSTOP);
+
Plugin_UnloadDyn(pPlug);
mr.pImpl = NULL;
return false;
|