summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-03 12:01:26 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-03 12:01:26 +0000
commit1660edb24da69d794a447d49f8ea9398976870b5 (patch)
tree9c52c49f8297cdef07797c5b7778ed39c8a43678
parent8aa736c7efd509ca88679fbabb644e49f2c5ef07 (diff)
MS_DB_MODULE_DELETE extended to support module deletion from any contact, not only from the global settings
git-svn-id: http://svn.miranda-ng.org/main/trunk@8375 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--include/delphi/m_database.inc2
-rw-r--r--include/m_database.h2
-rw-r--r--src/modules/database/dbutils.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/include/delphi/m_database.inc b/include/delphi/m_database.inc
index 16d562c21f..00fdef2098 100644
--- a/include/delphi/m_database.inc
+++ b/include/delphi/m_database.inc
@@ -324,7 +324,7 @@ const
{ DB/Module/Delete 0.8.0+
Removes all settings for the specified module.
- wParam=0 (unused)
+ wParam=(WPARAM)(MCONTACT)hContact - contact's handle or 0 for global settings
lParam=(LPARAM)(AnsiChar*)szModuleName - the module name to be deleted
}
MS_DB_MODULE_DELETE:PAnsiChar = 'DB/Module/Delete';
diff --git a/include/m_database.h b/include/m_database.h
index 4099c7ef6e..f2cb1b1eb8 100644
--- a/include/m_database.h
+++ b/include/m_database.h
@@ -426,7 +426,7 @@ typedef int (*DBMODULEENUMPROC)(const char *szModuleName, DWORD ofsModuleName, L
/* DB/Module/Delete 0.8.0+
Removes all settings for the specified module.
-wParam = 0 (unused)
+wParam = (WPARAM)(MCONTACT)hContact or 0 for global settings
lParam = (LPARAM)(char*)szModuleName - the module name to be deleted
*/
diff --git a/src/modules/database/dbutils.cpp b/src/modules/database/dbutils.cpp
index d560fd7be8..02e1e0d167 100644
--- a/src/modules/database/dbutils.cpp
+++ b/src/modules/database/dbutils.cpp
@@ -262,7 +262,7 @@ static int sttEnumVars(const char *szVarName, LPARAM lParam)
return 0;
}
-static INT_PTR DbDeleteModule(WPARAM, LPARAM lParam)
+static INT_PTR DbDeleteModule(WPARAM hContact, LPARAM lParam)
{
LIST<char> vars(20);
@@ -270,7 +270,7 @@ static INT_PTR DbDeleteModule(WPARAM, LPARAM lParam)
dbces.pfnEnumProc = sttEnumVars;
dbces.lParam = (LPARAM)&vars;
dbces.szModule = (char*)lParam;
- CallService(MS_DB_CONTACT_ENUMSETTINGS, NULL, (LPARAM)&dbces);
+ CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
for (int i = vars.getCount()-1; i >= 0; i--) {
db_unset(NULL, (char*)lParam, vars[i]);