summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-25 21:10:33 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-25 21:10:40 +0300
commit3583f79d974d805aa67ba8b1feb49a4974c2e4cd (patch)
tree4eea2be29bde54b8ca301eb12b617e08be39fad6 /src
parentf0c08538d0cdddb62453761e437cd7d2a3325bd0 (diff)
dbchecker moved to deprecated
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/database.cpp12
-rw-r--r--src/mir_app/src/newplugins.cpp22
-rw-r--r--src/mir_app/src/profilemanager.cpp36
-rw-r--r--src/mir_app/src/profilemanager.h2
4 files changed, 3 insertions, 69 deletions
diff --git a/src/mir_app/src/database.cpp b/src/mir_app/src/database.cpp
index b3f5f621e0..56710838e5 100644
--- a/src/mir_app/src/database.cpp
+++ b/src/mir_app/src/database.cpp
@@ -319,9 +319,6 @@ LBL_Show:
if (!getProfileManager(&pd))
return 0;
- if (!pd.bRun)
- return CallService(MS_DB_CHECKPROFILE, WPARAM(szProfile), TRUE);
-
return 1;
}
@@ -389,11 +386,6 @@ int tryOpenDatabase(const wchar_t *tszProfile)
// just not supported.
continue;
- case EGROKPRF_OBSOLETE:
- EnsureCheckerLoaded(true);
- CallService(MS_DB_CHECKPROFILE, (WPARAM)tszProfile, 2);
- break;
-
default:
return err;
}
@@ -527,10 +519,6 @@ int LoadDatabaseModule(void)
}
} while (retry);
- // if there is a service mode plugin to start, disable dbchecker
- if (mir_wstrlen(CmdLine_GetOption(L"svc")) > 0)
- EnsureCheckerLoaded(false); // unload dbchecker
-
if (rc == ERROR_SUCCESS) {
InitIni();
return 0;
diff --git a/src/mir_app/src/newplugins.cpp b/src/mir_app/src/newplugins.cpp
index 7645959c91..b61886df5f 100644
--- a/src/mir_app/src/newplugins.cpp
+++ b/src/mir_app/src/newplugins.cpp
@@ -117,6 +117,7 @@ static const MUUID pluginBannedList[] =
{ 0x1e64fd80, 0x299e, 0x48a0, { 0x94, 0x41, 0xde, 0x28, 0x68, 0x56, 0x3b, 0x6f } }, // stdhelp
{ 0x3750a5a3, 0xbf0d, 0x490e, { 0xb6, 0x5d, 0x41, 0xac, 0x4d, 0x29, 0xae, 0xb3 } }, // aim
{ 0x7c070f7c, 0x459e, 0x46b7, { 0x8e, 0x6d, 0xbc, 0x6e, 0xfa, 0xa2, 0x2f, 0x78 } }, // advaimg
+ { 0xa0138fc6, 0x4c52, 0x4501, { 0xaf, 0x93, 0x7d, 0x3e, 0x20, 0xbc, 0xae, 0x5b } }, // dbchecker
};
static bool isPluginBanned(const MUUID& u1)
@@ -730,27 +731,6 @@ MIR_APP_DLL(int) SetServiceModePlugin(const wchar_t *wszPluginName)
return SERVICE_CONTINUE;
}
-void EnsureCheckerLoaded(bool bEnable)
-{
- for (auto &p : pluginList) {
- if (mir_wstrcmpi(p->pluginname, L"dbchecker.dll"))
- continue;
-
- if (bEnable) {
- if (!p->bLoaded) {
- if (p->bpi.Load() != ERROR_SUCCESS)
- Plugin_Uninit(p);
- else {
- p->bLoaded = true;
- servicePlugins.removeItem(&p);
- }
- }
- }
- else Plugin_Uninit(p);
- break;
- }
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
int LoadSslModule(void)
diff --git a/src/mir_app/src/profilemanager.cpp b/src/mir_app/src/profilemanager.cpp
index 8393c0c591..de4e2b2628 100644
--- a/src/mir_app/src/profilemanager.cpp
+++ b/src/mir_app/src/profilemanager.cpp
@@ -303,24 +303,6 @@ class CChooseProfileDlg : public CDlgBase
return TRUE;
}
- void CheckProfile(int iItem)
- {
- if (iItem < 0)
- return;
-
- wchar_t profile[MAX_PATH], fullName[MAX_PATH];
- LVITEM item = { 0 };
- item.mask = LVIF_TEXT | LVIF_IMAGE;
- item.iItem = iItem;
- item.pszText = profile;
- item.cchTextMax = _countof(profile);
- if (!m_profileList.GetItem(&item))
- return;
-
- mir_snwprintf(fullName, L"%s\\%s\\%s.dat", m_pd->ptszProfileDir, profile, profile);
- CallService(MS_DB_CHECKPROFILE, (WPARAM)fullName, item.iImage == 2);
- }
-
void DeleteProfile(int iItem)
{
if (iItem < 0)
@@ -407,8 +389,6 @@ class CChooseProfileDlg : public CDlgBase
if (!m_profileList.GetItem(&tvi))
return;
- bool bConvert = (tvi.iImage == 2);
-
lvht.pt.x = GET_X_LPARAM(lParam);
lvht.pt.y = GET_Y_LPARAM(lParam);
@@ -417,14 +397,8 @@ class CChooseProfileDlg : public CDlgBase
AppendMenu(hMenu, MF_STRING, 1, TranslateT("Run"));
AppendMenu(hMenu, MF_SEPARATOR, 0, nullptr);
}
- if (tvi.iImage != 3 && ServiceExists(MS_DB_CHECKPROFILE)) {
- if (bConvert)
- AppendMenu(hMenu, MF_STRING, 2, TranslateT("Convert database"));
- else
- AppendMenu(hMenu, MF_STRING, 2, TranslateT("Check database"));
- AppendMenu(hMenu, MF_SEPARATOR, 0, nullptr);
- }
- AppendMenu(hMenu, MF_STRING, 3, TranslateT("Delete"));
+
+ AppendMenu(hMenu, MF_STRING, 2, TranslateT("Delete"));
int index = TrackPopupMenu(hMenu, TPM_RETURNCMD, lvht.pt.x, lvht.pt.y, 0, m_hwnd, nullptr);
switch (index) {
case 1:
@@ -432,10 +406,6 @@ class CChooseProfileDlg : public CDlgBase
break;
case 2:
- CheckProfile(lvht.iItem);
- break;
-
- case 3:
DeleteProfile(lvht.iItem);
break;
}
@@ -635,7 +605,5 @@ public:
int getProfileManager(PROFILEMANAGERDATA *pd)
{
- EnsureCheckerLoaded(true);
-
return CProfileManager(pd).DoModal();
}
diff --git a/src/mir_app/src/profilemanager.h b/src/mir_app/src/profilemanager.h
index 41b1df15de..da5001b4f5 100644
--- a/src/mir_app/src/profilemanager.h
+++ b/src/mir_app/src/profilemanager.h
@@ -43,7 +43,5 @@ int isValidProfileName(const wchar_t *name);
bool fileExist(const wchar_t *fname);
bool shouldAutoCreate(wchar_t *szProfile);
-void EnsureCheckerLoaded(bool);
-
extern wchar_t g_profileDir[MAX_PATH], g_profileName[MAX_PATH], g_shortProfileName[MAX_PATH];
extern bool g_bDbCreated;