summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-13 22:28:28 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-13 22:28:28 +0000
commitfd90113f1a40064a9a6dc670a60dd3b2a738a467 (patch)
tree9d6bf74c6fdaaf7405329ef7f72caf12bbba658b
parent5849172a0425c813f3f57abbbf941022fa420950 (diff)
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@1915 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--src/modules/addcontact/addcontact.cpp2
-rw-r--r--src/modules/clist/clcutils.cpp2
-rw-r--r--src/modules/clist/contact.cpp2
-rw-r--r--src/modules/clist/genmenuopt.cpp2
-rw-r--r--src/modules/clist/groups.cpp10
-rw-r--r--src/modules/findadd/findadd.cpp2
-rw-r--r--src/modules/fonts/FontOptions.cpp2
-rw-r--r--src/modules/icolib/skin2opts.cpp2
-rw-r--r--src/modules/netlib/netliblog.cpp4
-rw-r--r--src/modules/options/options.cpp6
-rw-r--r--src/modules/skin/skinicons.cpp4
-rw-r--r--src/modules/skin/sounds.cpp4
-rw-r--r--src/modules/utils/timezones.cpp2
13 files changed, 22 insertions, 22 deletions
diff --git a/src/modules/addcontact/addcontact.cpp b/src/modules/addcontact/addcontact.cpp
index bddf1ffc6c..5c680ba10c 100644
--- a/src/modules/addcontact/addcontact.cpp
+++ b/src/modules/addcontact/addcontact.cpp
@@ -172,7 +172,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
TCHAR szHandle[256];
if ( GetDlgItemText(hdlg, IDC_MYHANDLE, szHandle, SIZEOF(szHandle)))
- DBWriteContactSettingTString(hContact, "CList", "MyHandle", szHandle);
+ db_set_ts(hContact, "CList", "MyHandle", szHandle);
int item = SendDlgItemMessage(hdlg, IDC_GROUP, CB_GETCURSEL, 0, 0);
if (item > 0)
diff --git a/src/modules/clist/clcutils.cpp b/src/modules/clist/clcutils.cpp
index 84ab62c86e..e59d16ffe3 100644
--- a/src/modules/clist/clcutils.cpp
+++ b/src/modules/clist/clcutils.cpp
@@ -427,7 +427,7 @@ void fnEndRename(HWND, struct ClcData *dat, int save)
if ( !text[0] || !lstrcmp(otherName, text))
DBDeleteContactSetting(contact->hContact, "CList", "MyHandle");
else
- DBWriteContactSettingTString(contact->hContact, "CList", "MyHandle", text);
+ db_set_ts(contact->hContact, "CList", "MyHandle", text);
mir_free(otherName);
}
}
diff --git a/src/modules/clist/contact.cpp b/src/modules/clist/contact.cpp
index dd5afb8094..86b9625ece 100644
--- a/src/modules/clist/contact.cpp
+++ b/src/modules/clist/contact.cpp
@@ -165,7 +165,7 @@ INT_PTR ContactChangeGroup(WPARAM wParam, LPARAM lParam)
DBDeleteContactSetting((HANDLE) wParam, "CList", "Group");
else {
grpChg.pszNewName = cli.pfnGetGroupName(lParam, NULL);
- DBWriteContactSettingTString((HANDLE) wParam, "CList", "Group", grpChg.pszNewName);
+ db_set_ts((HANDLE) wParam, "CList", "Group", grpChg.pszNewName);
}
CallService(MS_CLUI_CONTACTADDED, wParam,
cli.pfnIconFromStatusMode((char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0), GetContactStatus((HANDLE) wParam), (HANDLE) wParam));
diff --git a/src/modules/clist/genmenuopt.cpp b/src/modules/clist/genmenuopt.cpp
index 96d44ff50f..004939591c 100644
--- a/src/modules/clist/genmenuopt.cpp
+++ b/src/modules/clist/genmenuopt.cpp
@@ -111,7 +111,7 @@ static int SaveTree(HWND hwndDlg)
mir_snprintf(DBString, SIZEOF(DBString), "%s_name", menuItemName);
if (lstrcmp(iod->name, iod->defname) != 0)
- DBWriteContactSettingTString(NULL, MenuNameItems, DBString, iod->name);
+ db_set_ts(NULL, MenuNameItems, DBString, iod->name);
else
DBDeleteContactSetting(NULL, MenuNameItems, DBString);
diff --git a/src/modules/clist/groups.cpp b/src/modules/clist/groups.cpp
index 1cfc8b7a9d..905574c51b 100644
--- a/src/modules/clist/groups.cpp
+++ b/src/modules/clist/groups.cpp
@@ -99,7 +99,7 @@ static INT_PTR CreateGroup(WPARAM wParam, LPARAM lParam)
const CLISTGROUPCHANGE grpChg = { sizeof(CLISTGROUPCHANGE), NULL, newName };
newName[0] = 1 | GROUPF_EXPANDED; //1 is required so we never get '\0'
- DBWriteContactSettingTString(NULL, "CListGroups", str, newName);
+ db_set_ts(NULL, "CListGroups", str, newName);
CallService(MS_CLUI_GROUPADDED, newId + 1, 1);
NotifyEventHooks(hGroupChangeEvent, 0, (LPARAM)&grpChg);
@@ -199,7 +199,7 @@ static INT_PTR DeleteGroup(WPARAM wParam, LPARAM)
if (szNewParent[0])
{
- DBWriteContactSettingTString(hContact, "CList", "Group", szNewParent);
+ db_set_ts(hContact, "CList", "Group", szNewParent);
grpChg.pszNewName = szNewParent;
}
else
@@ -270,14 +270,14 @@ static int RenameGroupWithMove(int groupId, const TCHAR *szName, int move)
lstrcpyn(oldName, dbv.ptszVal + 1, SIZEOF(oldName));
DBFreeVariant(&dbv);
lstrcpyn(str + 1, szName, SIZEOF(str) - 1);
- DBWriteContactSettingTString(NULL, "CListGroups", idstr, str);
+ db_set_ts(NULL, "CListGroups", idstr, str);
//must rename setting in all child contacts too
hContact = db_find_first();
do {
ClcCacheEntryBase* cache = cli.pfnGetCacheEntry(hContact);
if ( !lstrcmp(cache->tszGroup, oldName)) {
- DBWriteContactSettingTString(hContact, "CList", "Group", szName);
+ db_set_ts(hContact, "CList", "Group", szName);
mir_free(cache->tszGroup);
cache->tszGroup = 0;
cli.pfnCheckCacheItem(cache);
@@ -440,7 +440,7 @@ static INT_PTR MoveGroupBefore(WPARAM wParam, LPARAM lParam)
}
}
_itoa(shuffleTo, str, 10);
- DBWriteContactSettingTString(NULL, "CListGroups", str, szMoveName);
+ db_set_ts(NULL, "CListGroups", str, szMoveName);
mir_free(szMoveName);
return shuffleTo + 1;
}
diff --git a/src/modules/findadd/findadd.cpp b/src/modules/findadd/findadd.cpp
index 7e7732aca1..7809a8bbd8 100644
--- a/src/modules/findadd/findadd.cpp
+++ b/src/modules/findadd/findadd.cpp
@@ -932,7 +932,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP
szProto = (TCHAR*)alloca(sizeof(TCHAR)*(len+1));
*szProto = '\0';
SendDlgItemMessage(hwndDlg, IDC_PROTOLIST, CB_GETLBTEXT, SendDlgItemMessage(hwndDlg, IDC_PROTOLIST, CB_GETCURSEL, 0, 0), (LPARAM)szProto);
- DBWriteContactSettingTString(NULL, "FindAdd", "LastSearched", szProto?szProto:_T(""));
+ db_set_ts(NULL, "FindAdd", "LastSearched", szProto?szProto:_T(""));
}
SaveColumnSizes(hwndList);
if (dat->hResultHook != NULL) UnhookEvent(dat->hResultHook);
diff --git a/src/modules/fonts/FontOptions.cpp b/src/modules/fonts/FontOptions.cpp
index efa1bb2382..ff47b4f86a 100644
--- a/src/modules/fonts/FontOptions.cpp
+++ b/src/modules/fonts/FontOptions.cpp
@@ -536,7 +536,7 @@ static void sttSaveFontData(HWND hwndDlg, FontInternal &F)
else
mir_snprintf(str, SIZEOF(str), "%s", F.prefix);
- if (DBWriteContactSettingTString(NULL, F.dbSettingsGroup, str, F.value.szFace)) {
+ if (db_set_ts(NULL, F.dbSettingsGroup, str, F.value.szFace)) {
char buff[1024];
WideCharToMultiByte(code_page, 0, F.value.szFace, -1, buff, 1024, 0, 0);
DBWriteContactSettingString(NULL, F.dbSettingsGroup, str, buff);
diff --git a/src/modules/icolib/skin2opts.cpp b/src/modules/icolib/skin2opts.cpp
index 7303eb0464..7075cd439d 100644
--- a/src/modules/icolib/skin2opts.cpp
+++ b/src/modules/icolib/skin2opts.cpp
@@ -931,7 +931,7 @@ INT_PTR CALLBACK DlgProcIcoLibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
}
}
else if (item->temp_file) {
- DBWriteContactSettingTString(NULL, "SkinIcons", item->name, item->temp_file);
+ db_set_ts(NULL, "SkinIcons", item->name, item->temp_file);
IconSourceItem_Release(&item->source_small);
SafeDestroyIcon(&item->temp_icon);
}
diff --git a/src/modules/netlib/netliblog.cpp b/src/modules/netlib/netliblog.cpp
index ed02cc30c5..72b98f20e0 100644
--- a/src/modules/netlib/netliblog.cpp
+++ b/src/modules/netlib/netliblog.cpp
@@ -207,7 +207,7 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa
TCHAR str[MAX_PATH];
GetDlgItemText(hwndDlg, IDC_RUNATSTART, str, MAX_PATH);
- DBWriteContactSettingTString(NULL, "Netlib", "RunAtStart", str);
+ db_set_ts(NULL, "Netlib", "RunAtStart", str);
DBWriteContactSettingByte(NULL, "Netlib", "ShowLogOptsAtStart", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWTHISDLGATSTART));
mir_cslock lck(logOptions.cs);
@@ -271,7 +271,7 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa
DBWriteContactSettingByte(NULL, "Netlib", "ShowUser", (BYTE)logOptions.showUser);
DBWriteContactSettingByte(NULL, "Netlib", "ToOutputDebugString", (BYTE)logOptions.toOutputDebugString);
DBWriteContactSettingByte(NULL, "Netlib", "ToFile", (BYTE)logOptions.toFile);
- DBWriteContactSettingTString(NULL, "Netlib", "File", logOptions.szFile ? logOptions.szUserFile: _T(""));
+ db_set_ts(NULL, "Netlib", "File", logOptions.szFile ? logOptions.szUserFile: _T(""));
logOptions.save = 0;
}
else
diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp
index 20a14de456..dbef784011 100644
--- a/src/modules/options/options.cpp
+++ b/src/modules/options/options.cpp
@@ -1357,14 +1357,14 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L
opd = dat->getCurrent();
if (opd) {
if (opd->ptszTab)
- DBWriteContactSettingTString(NULL, "Options", "LastTab", opd->ptszTab);
+ db_set_ts(NULL, "Options", "LastTab", opd->ptszTab);
else
DBDeleteContactSetting(NULL, "Options", "LastTab");
if (opd->ptszGroup)
- DBWriteContactSettingTString(NULL, "Options", "LastGroup", opd->ptszGroup);
+ db_set_ts(NULL, "Options", "LastGroup", opd->ptszGroup);
else
DBDeleteContactSetting(NULL, "Options", "LastGroup");
- DBWriteContactSettingTString(NULL, "Options", "LastPage", opd->ptszTitle);
+ db_set_ts(NULL, "Options", "LastPage", opd->ptszTitle);
}
else {
DBDeleteContactSetting(NULL, "Options", "LastTab");
diff --git a/src/modules/skin/skinicons.cpp b/src/modules/skin/skinicons.cpp
index 983500b358..2cbef87a94 100644
--- a/src/modules/skin/skinicons.cpp
+++ b/src/modules/skin/skinicons.cpp
@@ -372,7 +372,7 @@ static void convertOneProtocol(char* moduleName, char* iconName)
if ( !DBGetContactSettingTString(NULL, "Icons", moduleName, &dbv)) {
_itoa(i, pi, 10);
- DBWriteContactSettingTString(NULL, "SkinIcons", iconName, dbv.ptszVal);
+ db_set_ts(NULL, "SkinIcons", iconName, dbv.ptszVal);
DBFreeVariant(&dbv);
DBDeleteContactSetting(NULL, "Icons", moduleName);
@@ -423,7 +423,7 @@ int LoadSkinIcons(void)
mir_snprintf(iconName, SIZEOF(iconName), "%s%d", mainIconsFmt, i);
- DBWriteContactSettingTString(NULL, "SkinIcons", iconName, dbv.ptszVal);
+ db_set_ts(NULL, "SkinIcons", iconName, dbv.ptszVal);
DBFreeVariant(&dbv);
DBDeleteContactSetting(NULL, "Icons", moduleName);
diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp
index 44b463eb96..c79db357f1 100644
--- a/src/modules/skin/sounds.cpp
+++ b/src/modules/skin/sounds.cpp
@@ -94,7 +94,7 @@ static INT_PTR ServiceSkinAddNewSound(WPARAM wParam, LPARAM lParam)
if (ptszDefaultFile) {
DBVARIANT dbv;
if (DBGetContactSettingString(NULL, "SkinSounds", item->name, &dbv))
- DBWriteContactSettingTString(NULL, "SkinSounds", item->name, ptszDefaultFile);
+ db_set_ts(NULL, "SkinSounds", item->name, ptszDefaultFile);
else
DBFreeVariant(&dbv);
mir_free(ptszDefaultFile);
@@ -333,7 +333,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
for (int i=0; i < arSounds.getCount(); i++)
if (arSounds[i].ptszTempFile)
- DBWriteContactSettingTString(NULL, "SkinSounds", arSounds[i].name, arSounds[i].ptszTempFile);
+ db_set_ts(NULL, "SkinSounds", arSounds[i].name, arSounds[i].ptszTempFile);
TVITEM tvi, tvic;
tvi.hItem = TreeView_GetRoot(hwndTree);
diff --git a/src/modules/utils/timezones.cpp b/src/modules/utils/timezones.cpp
index 81c883dd13..b5a2087e32 100644
--- a/src/modules/utils/timezones.cpp
+++ b/src/modules/utils/timezones.cpp
@@ -248,7 +248,7 @@ static void timeapiSetInfoByContact(HANDLE hContact, HANDLE hTZ)
if (tz)
{
- DBWriteContactSettingTString(hContact, "UserInfo", "TzName", tz->tszName);
+ db_set_ts(hContact, "UserInfo", "TzName", tz->tszName);
DBWriteContactSettingByte(hContact, "UserInfo", "Timezone", (char)((tz->tzi.Bias + tz->tzi.StandardBias) / 30));
}
else