summaryrefslogtreecommitdiff
path: root/plugins/StatusPlugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-09-14 18:01:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-09-14 18:01:49 +0000
commit7bdb598e26e7e98788933af43090d34027166969 (patch)
tree65c215c0693c86134e471f0746e9726b645b51bb /plugins/StatusPlugins
parent9f285a935709f4dda1065d6450739476168c43af (diff)
second major wipeout of database services & structures:
- DBCONTACTENUMSETTINGS removed; - all helpers moved to mir_core.dll git-svn-id: http://svn.miranda-ng.org/main/trunk@17296 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins')
-rw-r--r--plugins/StatusPlugins/StartupStatus/options.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp
index c53573bbf4..212e04ff37 100644
--- a/plugins/StatusPlugins/StartupStatus/options.cpp
+++ b/plugins/StatusPlugins/StartupStatus/options.cpp
@@ -911,21 +911,15 @@ int OptionsInit(WPARAM wparam,LPARAM lparam)
static int ClearDatabase(char* filter)
{
- DBCONTACTENUMSETTINGS dbces;
- char** settings;
- int i, settingCount = 0;
-
settingIndex = 0;
- dbces.szModule = MODULENAME;
- dbces.lParam = (LPARAM)&settingCount;
- dbces.pfnEnumProc = CountSettings;
- CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM)&dbces);
-
- settings = (char**)malloc(settingCount*sizeof(char*));
- dbces.lParam = (LPARAM)&settings;
- dbces.pfnEnumProc = DeleteSetting;
- CallService(MS_DB_CONTACT_ENUMSETTINGS,0,(LPARAM)&dbces);
- for (i=0; i < settingCount; i++) {
+
+ int settingCount = 0;
+ db_enum_settings(NULL, CountSettings, MODULENAME, &settingCount);
+
+ char **settings = (char**)malloc(settingCount*sizeof(char*));
+ db_enum_settings(NULL, DeleteSetting, MODULENAME, &settings);
+
+ for (int i=0; i < settingCount; i++) {
if ((filter == NULL) || (!strncmp(filter, settings[i], mir_strlen(filter))))
db_unset(NULL, MODULENAME, settings[i]);
free(settings[i]);