summaryrefslogtreecommitdiff
path: root/plugins/Popup
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-30 12:16:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-30 12:16:44 +0000
commit25ec54ea27a7099f33573b260a620ed7273176fe (patch)
tree1810a0cb35d23deeed9ccdaf0ab276a4022f9a41 /plugins/Popup
parenta546606709e6bb72e01eb38b2c8c8756608fd5d6 (diff)
- db_set_blob used everywhere for writing blobs
- DBCONTACTWRITESETTING left only in the event handlers git-svn-id: http://svn.miranda-ng.org/main/trunk@5191 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup')
-rw-r--r--plugins/Popup/src/notifications.cpp25
1 files changed, 7 insertions, 18 deletions
diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp
index 92a2e28652..30ef622d2d 100644
--- a/plugins/Popup/src/notifications.cpp
+++ b/plugins/Popup/src/notifications.cpp
@@ -124,24 +124,13 @@ void SaveNotificationSettings(POPUPTREEDATA *ptd, char* szModul)
ptd->notification.lpzName);
db_set_s(NULL, szModul, setting, ptd->rightAction);
- for (int i=0; i < ptd->notification.actionCount; ++i)
- {
- if (!lstrcmpA(ptd->leftAction, ptd->notification.lpActions[i].lpzTitle))
- {
- DBCONTACTWRITESETTING dbcws = {0};
- dbcws.szModule = ptd->notification.lpActions[i].lpzLModule;
- dbcws.szModule = ptd->notification.lpActions[i].lpzLSetting;
- dbcws.value = ptd->notification.lpActions[i].dbvLData;
- CallService(MS_DB_CONTACT_WRITESETTING, 0, (LPARAM)&dbcws);
- }
- if (!lstrcmpA(ptd->rightAction, ptd->notification.lpActions[i].lpzTitle))
- {
- DBCONTACTWRITESETTING dbcws = {0};
- dbcws.szModule = ptd->notification.lpActions[i].lpzRModule;
- dbcws.szModule = ptd->notification.lpActions[i].lpzRSetting;
- dbcws.value = ptd->notification.lpActions[i].dbvRData;
- CallService(MS_DB_CONTACT_WRITESETTING, 0, (LPARAM)&dbcws);
- }
+ for (int i=0; i < ptd->notification.actionCount; ++i) {
+ POPUPNOTIFYACTION &p = ptd->notification.lpActions[i];
+ if (!lstrcmpA(ptd->leftAction, p.lpzTitle))
+ db_set(NULL, p.lpzLModule, p.lpzLSetting, &p.dbvLData);
+
+ if (!lstrcmpA(ptd->rightAction, p.lpzTitle))
+ db_set(NULL, p.lpzRModule, p.lpzRSetting, &p.dbvRData);
}
}
}