From 007b4c7301f0d26a72f89f74e9929f42e24eb3e6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 5 Apr 2013 22:27:16 +0000 Subject: - 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 --- plugins/Alarms/src/alarmlist.cpp | 32 ++++++++++++++++---------------- plugins/Alarms/src/options.cpp | 8 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) (limited to 'plugins/Alarms') diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp index 1e550be85d..15956ca62d 100644 --- a/plugins/Alarms/src/alarmlist.cpp +++ b/plugins/Alarms/src/alarmlist.cpp @@ -192,12 +192,12 @@ void LoadAlarms() { memset(&alarm, 0, sizeof(ALARM)); sprintf(buff, "Title%d", i); - if (!DBGetContactSettingTString(0, MODULE, buff, &dbv)) { + if (!db_get_ts(0, MODULE, buff, &dbv)) { alarm.szTitle = mir_tstrdup(dbv.ptszVal); db_free(&dbv); } sprintf(buff, "Desc%d", i); - if (!DBGetContactSettingTString(0, MODULE, buff, &dbv)) { + if (!db_get_ts(0, MODULE, buff, &dbv)) { alarm.szDesc = mir_tstrdup(dbv.ptszVal); db_free(&dbv); } @@ -249,11 +249,11 @@ void LoadAlarms() { alarm.action = (unsigned short)db_get_dw(0, MODULE, buff, AAF_POPUP | AAF_SOUND); if (alarm.action & AAF_COMMAND) { sprintf(buff, "ActionCommand%d", i); - if (!DBGetContactSettingTString(0, MODULE, buff, &dbv)) { + if (!db_get_ts(0, MODULE, buff, &dbv)) { alarm.szCommand = mir_tstrdup(dbv.ptszVal); db_free(&dbv); sprintf(buff, "ActionParams%d", i); - if (!DBGetContactSettingTString(0, MODULE, buff, &dbv)) { + if (!db_get_ts(0, MODULE, buff, &dbv)) { alarm.szCommandParams = mir_tstrdup(dbv.ptszVal); db_free(&dbv); } @@ -308,14 +308,14 @@ void SaveAlarms() { sprintf(buff, "Desc%d", index); db_set_ts(0, MODULE, buff, i->szDesc); sprintf(buff, "Occ%d", index); - DBWriteContactSettingWord(0, MODULE, buff, i->occurrence); + db_set_w(0, MODULE, buff, i->occurrence); sprintf(buff, "STHour%d", index); - DBWriteContactSettingWord(0, MODULE, buff, i->time.wHour); + db_set_w(0, MODULE, buff, i->time.wHour); sprintf(buff, "STMinute%d", index); - DBWriteContactSettingWord(0, MODULE, buff, i->time.wMinute); + db_set_w(0, MODULE, buff, i->time.wMinute); sprintf(buff, "STSecond%d", index); - DBWriteContactSettingWord(0, MODULE, buff, i->time.wSecond); + db_set_w(0, MODULE, buff, i->time.wSecond); switch(i->occurrence) { case OC_DAILY: @@ -324,22 +324,22 @@ void SaveAlarms() { break; case OC_WEEKLY: sprintf(buff, "STDayOfWeek%d", index); - DBWriteContactSettingWord(0, MODULE, buff, i->time.wDayOfWeek); + db_set_w(0, MODULE, buff, i->time.wDayOfWeek); break; case OC_ONCE: sprintf(buff, "STYear%d", index); - DBWriteContactSettingWord(0, MODULE, buff, i->time.wYear); + db_set_w(0, MODULE, buff, i->time.wYear); case OC_YEARLY: sprintf(buff, "STMonth%d", index); - DBWriteContactSettingWord(0, MODULE, buff, i->time.wMonth); + db_set_w(0, MODULE, buff, i->time.wMonth); case OC_MONTHLY: sprintf(buff, "STDay%d", index); - DBWriteContactSettingWord(0, MODULE, buff, i->time.wDay); + db_set_w(0, MODULE, buff, i->time.wDay); break; } sprintf(buff, "ActionFlags%d", index); - DBWriteContactSettingDword(0, MODULE, buff, i->action); + db_set_dw(0, MODULE, buff, i->action); if (i->action & AAF_COMMAND) { if (_tcslen(i->szCommand)) { sprintf(buff, "ActionCommand%d", index); @@ -358,12 +358,12 @@ void SaveAlarms() { db_set_b(0, MODULE, buff, i->snoozer ? 1 : 0); sprintf(buff, "Flags%d", index); - DBWriteContactSettingDword(0, MODULE, buff, i->flags); + db_set_dw(0, MODULE, buff, i->flags); sprintf(buff, "TriggerID%d", index); - DBWriteContactSettingDword(0, MODULE, buff, i->trigger_id); + db_set_dw(0, MODULE, buff, i->trigger_id); } - DBWriteContactSettingWord(0, MODULE, "Count", index); + db_set_w(0, MODULE, "Count", index); LeaveCriticalSection(&alarm_cs); } diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp index 3a263d4188..39c4713838 100644 --- a/plugins/Alarms/src/options.cpp +++ b/plugins/Alarms/src/options.cpp @@ -1176,9 +1176,9 @@ void LoadOptions() void SaveOptions() { db_set_b(0, MODULE, "UsePopupModule", options.use_popup_module ? 1 : 0); - DBWriteContactSettingDword(0, MODULE, "SnoozeMinutes", options.snooze_minutes); - DBWriteContactSettingDword(0, MODULE, "RowHeight", options.row_height); - DBWriteContactSettingDword(0, MODULE, "Indent", options.indent); + db_set_dw(0, MODULE, "SnoozeMinutes", options.snooze_minutes); + db_set_dw(0, MODULE, "RowHeight", options.row_height); + db_set_dw(0, MODULE, "Indent", options.indent); db_set_b(0, MODULE, "Transparency", options.aw_trans); db_set_b(0, MODULE, "RoundCorners", options.aw_roundcorners ? 1 : 0); db_set_b(0, MODULE, "DontStealFocus", options.aw_dontstealfocus ? 1 : 0); @@ -1186,7 +1186,7 @@ void SaveOptions() db_set_b(0, MODULE, "HideWithClist", options.hide_with_clist ? 1 : 0); db_set_b(0, MODULE, "LoopSound", options.loop_sound ? 1 : 0); db_set_b(0, MODULE, "AutoSize", options.auto_size_vert ? 1 : 0); - DBWriteContactSettingDword(0, MODULE, "ReminderPeriod", options.reminder_period); + db_set_dw(0, MODULE, "ReminderPeriod", options.reminder_period); } INT_PTR NewAlarmMenuFunc(WPARAM wParam, LPARAM lParam) -- cgit v1.2.3