diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-05 22:27:16 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-05 22:27:16 +0000 |
commit | 007b4c7301f0d26a72f89f74e9929f42e24eb3e6 (patch) | |
tree | b1ee30b70c6e36d1a06aed6885cb80dc560a68ca /plugins/StatusPlugins/StartupStatus | |
parent | f4a1bbc6ba4b8137cb868639ac146aa97e97e9df (diff) |
- rest of menus cleared;
- old database macroses wiped out from all plugins (left in m_database.h for compatibility)
git-svn-id: http://svn.miranda-ng.org/main/trunk@4324 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/StartupStatus')
4 files changed, 8 insertions, 8 deletions
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp index 70527d62bb..3e78a0230c 100644 --- a/plugins/StatusPlugins/StartupStatus/options.cpp +++ b/plugins/StatusPlugins/StartupStatus/options.cpp @@ -966,12 +966,12 @@ static int ClearDatabase(char* filter) CallService(MS_DB_CONTACT_ENUMSETTINGS,0,(LPARAM)&dbces);
for (i=0; i < settingCount; i++) {
if ((filter == NULL) || (!strncmp(filter, settings[i], strlen(filter))))
- DBDeleteContactSetting(NULL, MODULENAME, settings[i]);
+ db_unset(NULL, MODULENAME, settings[i]);
free(settings[i]);
}
free(settings);
// < v0.0.0.9
- if (filter == NULL) DBDeleteContactSetting(NULL, "AutoAway", "Confirm");
+ if (filter == NULL) db_unset(NULL, "AutoAway", "Confirm");
return 0;
}
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp index 9fc08cea82..bdd7e78114 100644 --- a/plugins/StatusPlugins/StartupStatus/profiles.cpp +++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp @@ -162,7 +162,7 @@ INT_PTR GetProfileName(WPARAM wParam, LPARAM lParam) DBVARIANT dbv;
char setting[80];
_snprintf(setting, sizeof(setting), "%d_%s", profile, SETTING_PROFILENAME);
- if ( DBGetContactSettingTString(NULL, MODULENAME, setting, &dbv))
+ if ( db_get_ts(NULL, MODULENAME, setting, &dbv))
return -1;
_tcsncpy(buf, dbv.ptszVal, 128-1); buf[127] = 0;
@@ -191,7 +191,7 @@ TCHAR *GetStatusMessage(int profile, char *szProto) for ( int i=0; i < pceCount; i++ ) {
if ( (pce[i].profile == profile) && (!strcmp(pce[i].szProto, szProto))) {
_snprintf(dbSetting, sizeof(dbSetting), "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG);
- if (!DBGetContactSettingTString(NULL, MODULENAME, dbSetting, &dbv)) { // reload from db
+ if (!db_get_ts(NULL, MODULENAME, dbSetting, &dbv)) { // reload from db
pce[i].msg = ( TCHAR* )realloc(pce[i].msg, sizeof(TCHAR)*(_tcslen(dbv.ptszVal)+1));
if (pce[i].msg != NULL) {
_tcscpy(pce[i].msg, dbv.ptszVal);
@@ -215,7 +215,7 @@ TCHAR *GetStatusMessage(int profile, char *szProto) pce[pceCount].szProto = _strdup(szProto);
pce[pceCount].msg = NULL;
_snprintf(dbSetting, sizeof(dbSetting), "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG);
- if (!DBGetContactSettingTString(NULL, MODULENAME, dbSetting, &dbv)) {
+ if (!db_get_ts(NULL, MODULENAME, dbSetting, &dbv)) {
pce[pceCount].msg = _tcsdup(dbv.ptszVal);
db_free(&dbv);
}
diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp index 5df0dff3b4..f95ec4ce8e 100644 --- a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp +++ b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp @@ -176,7 +176,7 @@ static void SetLastStatusMessages(TSettingsList& ps) _snprintf(dbSetting, sizeof(dbSetting), "%s%s", PREFIX_LASTMSG, ps[i].szName);
DBVARIANT dbv;
- if ( ps[i].szMsg == NULL && !DBGetContactSettingTString(NULL, MODULENAME, dbSetting, &dbv)) {
+ if ( ps[i].szMsg == NULL && !db_get_ts(NULL, MODULENAME, dbSetting, &dbv)) {
ps[i].szMsg = _tcsdup(dbv.ptszVal); // remember this won't be freed
db_free(&dbv);
} } }
@@ -303,7 +303,7 @@ static int Exit(WPARAM wParam, LPARAM lParam) if (CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)protos[i]->szModuleName)) {
db_set_w(NULL, MODULENAME, lastName, (WORD)CallProtoService(protos[i]->szModuleName, PS_GETSTATUS, 0, 0));
mir_snprintf(lastMsg, sizeof(lastMsg), "%s%s", PREFIX_LASTMSG, protos[i]->szModuleName);
- DBDeleteContactSetting(NULL, MODULENAME, lastMsg);
+ db_unset(NULL, MODULENAME, lastMsg);
int status = CallProtoService(protos[i]->szModuleName, PS_GETSTATUS, 0, 0);
if ( !CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)protos[i]->szModuleName))
diff --git a/plugins/StatusPlugins/StartupStatus/toolbars.cpp b/plugins/StatusPlugins/StartupStatus/toolbars.cpp index 1109eb24f3..a2e53fc395 100644 --- a/plugins/StatusPlugins/StartupStatus/toolbars.cpp +++ b/plugins/StatusPlugins/StartupStatus/toolbars.cpp @@ -61,7 +61,7 @@ int CreateTopToolbarButtons(WPARAM wParam, LPARAM lParam) DBVARIANT dbv;
_snprintf(setting, sizeof(setting), "%d_%s", i, SETTING_PROFILENAME);
- if (DBGetContactSetting(NULL, MODULENAME, setting, &dbv))
+ if (db_get(NULL, MODULENAME, setting, &dbv))
continue;
ttb.hIconHandleDn = iconList[0].hIcolib;
|