summaryrefslogtreecommitdiff
path: root/plugins/StatusPlugins/KeepStatus/action_keepstatus.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-01 10:21:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-01 10:21:56 +0000
commita41c9020b7fcbc4d05fcb37097177cc0efc7cdce (patch)
tree5bda74986883a9152123474152c6546547211b9d /plugins/StatusPlugins/KeepStatus/action_keepstatus.cpp
parent0ae8779546586eba91408d03949d45ec9ced5133 (diff)
db_helpers.cpp deleted
git-svn-id: http://svn.miranda-ng.org/main/trunk@708 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/KeepStatus/action_keepstatus.cpp')
-rw-r--r--plugins/StatusPlugins/KeepStatus/action_keepstatus.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/plugins/StatusPlugins/KeepStatus/action_keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/action_keepstatus.cpp
index bf71c81543..f51f258ec7 100644
--- a/plugins/StatusPlugins/KeepStatus/action_keepstatus.cpp
+++ b/plugins/StatusPlugins/KeepStatus/action_keepstatus.cpp
@@ -2,7 +2,6 @@
#include "keepstatus.h"
#include "../resource.h"
#include "m_trigger.h"
-#include "../../helpers/db_helpers.h"
extern HINSTANCE hInst;
@@ -13,12 +12,12 @@ static BOOL ProtocolEnabled(DWORD id, char *szPrefix, REPORTINFO *ri, char *szPr
{
char dbSetting[128];
_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s_%s", szPrefix, id, szProto, SETTING_PROTO_ENABLED);
- if (db_getb(dbSetting, 0))
+ if ( db_get_b(NULL, MODULENAME, dbSetting, 0))
return TRUE;
if ( ri != NULL && ri->td != NULL && (ri->td->dFlags & DF_PROTO) && !strcmp(szProto, ri->td->szProto)) {
_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s_%s", szPrefix, id, STR_PROTOFROMTRIGGER, SETTING_PROTO_ENABLED);
- return db_getb(dbSetting, 0);
+ return db_get_b(NULL, MODULENAME, dbSetting, 0);
}
return FALSE;
@@ -53,7 +52,7 @@ static void BuildProtoList(HWND hList, BOOL bFromTrigger, char* szPrefix, DWORD
ListView_InsertItem(hList, &lvItem);
_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s_%s", szPrefix, id, protos[i]->szModuleName, SETTING_PROTO_ENABLED);
- ListView_SetCheckState(hList, lvItem.iItem, db_getb(dbSetting, 0));
+ ListView_SetCheckState(hList, lvItem.iItem, db_get_b(NULL, MODULENAME, dbSetting, 0));
ListView_SetItem(hList, &lvItem);
lvItem.iItem++;
if (lvItem.pszText != NULL)
@@ -64,7 +63,7 @@ static void BuildProtoList(HWND hList, BOOL bFromTrigger, char* szPrefix, DWORD
ListView_InsertItem(hList, &lvItem);
lvItem.lParam = (LPARAM)STR_PROTOFROMTRIGGER;
_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s_%s", szPrefix, id, STR_PROTOFROMTRIGGER, SETTING_PROTO_ENABLED);
- ListView_SetCheckState(hList, lvItem.iItem, db_getb(dbSetting, 0));
+ ListView_SetCheckState(hList, lvItem.iItem, db_get_b(NULL, MODULENAME, dbSetting, 0));
ListView_SetItem(hList, &lvItem);
lvItem.iItem++;
}
@@ -84,10 +83,10 @@ static void SaveProtoList(HWND hList, char *szPrefix, DWORD id)
char dbSetting[128];
_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s_%s", szPrefix, id, (const char*)lvItem.lParam, SETTING_PROTO_ENABLED);
if (ListView_GetCheckState(hList, lvItem.iItem))
- db_setb(dbSetting, TRUE);
+ db_set_b(NULL, MODULENAME, dbSetting, TRUE);
else {
log_debugA("deleting: %s", dbSetting);
- db_del(dbSetting);
+ db_unset(NULL, MODULENAME, dbSetting);
}
}
}