summaryrefslogtreecommitdiff
path: root/src/modules/database/profilemanager.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-17 12:51:21 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-17 12:51:21 +0000
commit7a65cbd15d4f808f973d782deea2a5e1a02accd6 (patch)
treedb84b5fe05afc63d1d17bec16363410ce799cfe8 /src/modules/database/profilemanager.cpp
parent1afab9fe8e14637b5b9b9c4a7d1b16399184fac4 (diff)
obsolete heaader file, m_plugins.h, removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@1005 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/database/profilemanager.cpp')
-rw-r--r--src/modules/database/profilemanager.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp
index 558646e510..63e6cd1c4d 100644
--- a/src/modules/database/profilemanager.cpp
+++ b/src/modules/database/profilemanager.cpp
@@ -115,7 +115,7 @@ static LRESULT CALLBACK ProfileNameValidate(HWND edit, UINT msg, WPARAM wParam,
return CallWindowProc((WNDPROC)GetWindowLongPtr(edit, GWLP_USERDATA), edit, msg, wParam, lParam);
}
-static int FindDbProviders(const char*, DATABASELINK * dblink, LPARAM lParam)
+static int FindDbProviders(const TCHAR* tszProfileName, DATABASELINK *dblink, LPARAM lParam)
{
HWND hwndDlg = (HWND)lParam;
HWND hwndCombo = GetDlgItem(hwndDlg, IDC_PROFILEDRIVERS);
@@ -141,12 +141,8 @@ static INT_PTR CALLBACK DlgProfileNew(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
dat = (struct DlgProfData *)lParam;
{
// fill in the db plugins present
- PLUGIN_DB_ENUM dbe;
- dbe.cbSize = sizeof(dbe);
- dbe.pfnEnumCallback = (int(*)(const char*, void*, LPARAM))FindDbProviders;
- dbe.lParam = (LPARAM)hwndDlg;
- if (CallService(MS_PLUGINS_ENUMDBPLUGINS, 0, (LPARAM)&dbe) == -1) {
- // no plugins?!
+ if (enumDbPlugins(FindDbProviders, (LPARAM)hwndDlg) == -1) {
+ // what, no plugins?!
EnableWindow(GetDlgItem(hwndDlg, IDC_PROFILEDRIVERS), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_PROFILENAME), FALSE);
ShowWindow(GetDlgItem(hwndDlg, IDC_NODBDRIVERS), TRUE);
@@ -222,11 +218,11 @@ static INT_PTR CALLBACK DlgProfileNew(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
return FALSE;
}
-static int DetectDbProvider(const char*, DATABASELINK * dblink, LPARAM lParam)
+static int DetectDbProvider(const TCHAR*, DATABASELINK * dblink, LPARAM lParam)
{
int error;
-char* fullpath = makeFileName((TCHAR*)lParam);
+ char* fullpath = makeFileName((TCHAR*)lParam);
int ret = dblink->grokHeader(fullpath, &error);
mir_free(fullpath);
@@ -287,18 +283,14 @@ BOOL EnumProfilesForList(TCHAR *fullpath, TCHAR *profile, LPARAM lParam)
SendMessage(hwndList, LVM_SETITEMTEXT, iItem, (LPARAM)&item);
if (bFileExists) {
- PLUGIN_DB_ENUM dbe;
TCHAR szPath[MAX_PATH];
+ _tcscpy(szPath, fullpath);
LVITEM item2;
item2.mask = LVIF_TEXT;
item2.iItem = iItem;
- dbe.cbSize = sizeof(dbe);
- dbe.pfnEnumCallback = (int(*)(const char*, void*, LPARAM))DetectDbProvider;
- dbe.lParam = (LPARAM)szPath;
- _tcscpy(szPath, fullpath);
- if (CallService(MS_PLUGINS_ENUMDBPLUGINS, 0, (LPARAM)&dbe) == 1) {
+ if ( enumDbPlugins(DetectDbProvider, (LPARAM)szPath) == 1) {
if (bFileLocked) {
// file locked
item2.pszText = TranslateT("<In Use>");