diff options
Diffstat (limited to 'src/modules/clist')
-rw-r--r-- | src/modules/clist/Docking.cpp | 4 | ||||
-rw-r--r-- | src/modules/clist/clcutils.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/clistevents.cpp | 4 | ||||
-rw-r--r-- | src/modules/clist/clistmenus.cpp | 4 | ||||
-rw-r--r-- | src/modules/clist/clistmod.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/clisttray.cpp | 6 | ||||
-rw-r--r-- | src/modules/clist/clui.cpp | 14 | ||||
-rw-r--r-- | src/modules/clist/contacts.cpp | 22 | ||||
-rw-r--r-- | src/modules/clist/genmenu.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/genmenuopt.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/groups.cpp | 42 | ||||
-rw-r--r-- | src/modules/clist/keyboard.cpp | 2 |
12 files changed, 53 insertions, 53 deletions
diff --git a/src/modules/clist/Docking.cpp b/src/modules/clist/Docking.cpp index 3308176347..d2695ef6b6 100644 --- a/src/modules/clist/Docking.cpp +++ b/src/modules/clist/Docking.cpp @@ -170,8 +170,8 @@ int fnDocking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam) draggingTitle = 0;
docked = db_get_b(NULL, "CLUI", "DockToSides", 1) ?
(char) db_get_b(NULL, "CList", "Docked", 0) : 0;
- dockPos.x = (int) db_get_dw(NULL, "CList", "DockX", 0);
- dockPos.y = (int) db_get_dw(NULL, "CList", "DockY", 0);
+ dockPos.x = (int)db_get_dw(NULL, "CList", "DockX", 0);
+ dockPos.y = (int)db_get_dw(NULL, "CList", "DockY", 0);
break;
case WM_ACTIVATE:
diff --git a/src/modules/clist/clcutils.cpp b/src/modules/clist/clcutils.cpp index 8b237e7d8f..e3ae2be605 100644 --- a/src/modules/clist/clcutils.cpp +++ b/src/modules/clist/clcutils.cpp @@ -225,7 +225,7 @@ void fnScrollTo(HWND hwnd, struct ClcData *dat, int desty, int noSmooth) nowTick = GetTickCount();
if (nowTick >= startTick + dat->scrollTime)
break;
- dat->yScroll = oldy + (desty - oldy) * (int) (nowTick - startTick) / dat->scrollTime;
+ dat->yScroll = oldy + (desty - oldy) * (int)(nowTick - startTick) / dat->scrollTime;
if (dat->backgroundBmpUse & CLBF_SCROLL || dat->hBmpBackground == NULL)
ScrollWindowEx(hwnd, 0, previousy - dat->yScroll, NULL, NULL, NULL, NULL, SW_INVALIDATE);
else
diff --git a/src/modules/clist/clistevents.cpp b/src/modules/clist/clistevents.cpp index 5f85903d1d..71a520b2ff 100644 --- a/src/modules/clist/clistevents.cpp +++ b/src/modules/clist/clistevents.cpp @@ -386,9 +386,9 @@ static int CListEventSettingsChanged(WPARAM wParam, LPARAM lParam) DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
if (hContact == NULL && cws && cws->szModule && cws->szSetting && strcmp(cws->szModule, "CList") == 0) {
if (strcmp(cws->szSetting, "DisableTrayFlash") == 0)
- disableTrayFlash = (int) cws->value.bVal;
+ disableTrayFlash = (int)cws->value.bVal;
else if (strcmp(cws->szSetting, "NoIconBlink") == 0)
- disableIconFlash = (int) cws->value.bVal;
+ disableIconFlash = (int)cws->value.bVal;
}
return 0;
}
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index 567fa0c1f2..4b54616adf 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -810,12 +810,12 @@ int fnGetProtoIndexByPos(PROTOCOLDESCRIPTOR ** proto, int protoCnt, int Pos) if ( !DBGetContactSetting(NULL, "Protocols", buf, &dbv)) {
for (p=0; p < protoCnt; p++) {
if (lstrcmpA(proto[p]->szName, dbv.pszVal) == 0) {
- DBFreeVariant(&dbv);
+ db_free(&dbv);
return p;
}
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
return -1;
diff --git a/src/modules/clist/clistmod.cpp b/src/modules/clist/clistmod.cpp index cb14eb0c42..fdbc75fe82 100644 --- a/src/modules/clist/clistmod.cpp +++ b/src/modules/clist/clistmod.cpp @@ -143,7 +143,7 @@ static int ProtocolAck(WPARAM, LPARAM lParam) CallService(MS_CLUI_PROTOCOLSTATUSCHANGED, ack->lParam, (LPARAM) ack->szModule);
- if ((int) ack->hProcess < ID_STATUS_ONLINE && ack->lParam >= ID_STATUS_ONLINE) {
+ if ((int)ack->hProcess < ID_STATUS_ONLINE && ack->lParam >= ID_STATUS_ONLINE) {
DWORD caps = (DWORD)CallProtoServiceInt(NULL,ack->szModule, PS_GETCAPS, PFLAGNUM_1, 0);
if (caps & PF1_SERVERCLIST) {
HANDLE hContact = db_find_first();
diff --git a/src/modules/clist/clisttray.cpp b/src/modules/clist/clisttray.cpp index ae9e9e7da0..351ca78a7b 100644 --- a/src/modules/clist/clisttray.cpp +++ b/src/modules/clist/clisttray.cpp @@ -65,7 +65,7 @@ static TCHAR* sttGetXStatus(const char* szProto) if ( !DBGetContactSettingTString(NULL, szProto, dbTitle, &dbv)) {
if (dbv.ptszVal[0] != 0)
result = mir_tstrdup(dbv.ptszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
}
@@ -285,7 +285,7 @@ int fnTrayIconInit(HWND hwnd) szProto = NULL;
cli.pfnTrayIconAdd(hwnd, NULL, szProto, szProto ? CallProtoServiceInt(NULL,szProto, PS_GETSTATUS, 0, 0) : CallService(MS_CLIST_GETSTATUSMODE, 0, 0));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
else if (trayIconSetting == SETTING_TRAYICON_MULTI && (averageMode < 0 || db_get_b(NULL, "CList", "AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT)))
{
@@ -552,7 +552,7 @@ void fnTrayIconUpdateBase(const char *szChangedProto) changed = cli.pfnTrayIconSetBaseInfo(cli.pfnGetIconFromStatusMode(NULL, szProto, szProto ?
CallProtoServiceInt(NULL,szProto, PS_GETSTATUS, 0, 0) :
CallService(MS_CLIST_GETSTATUSMODE, 0, 0)), szProto);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
break;
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp index 15f6ab4e8e..58f3978b84 100644 --- a/src/modules/clist/clui.cpp +++ b/src/modules/clist/clui.cpp @@ -311,14 +311,14 @@ int LoadCLUIModule(void) lstrcpyn(titleText, _T(MIRANDANAME), SIZEOF(titleText));
else {
lstrcpyn(titleText, dbv.ptszVal, SIZEOF(titleText));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
RECT pos;
- pos.left = (int) db_get_dw(NULL, "CList", "x", 700);
- pos.top = (int) db_get_dw(NULL, "CList", "y", 221);
- pos.right = pos.left + (int) db_get_dw(NULL, "CList", "Width", 108);
- pos.bottom = pos.top + (int) db_get_dw(NULL, "CList", "Height", 310);
+ pos.left = (int)db_get_dw(NULL, "CList", "x", 700);
+ pos.top = (int)db_get_dw(NULL, "CList", "y", 221);
+ pos.right = pos.left + (int)db_get_dw(NULL, "CList", "Width", 108);
+ pos.bottom = pos.top + (int)db_get_dw(NULL, "CList", "Height", 310);
Utils_AssertInsideScreen(&pos);
@@ -639,7 +639,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM }
case WM_TIMER:
- if ((int) wParam == TM_AUTOALPHA) {
+ if ((int)wParam == TM_AUTOALPHA) {
int inwnd;
if (GetForegroundWindow() == hwnd) {
@@ -693,7 +693,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (thisTick >= startTick + 200)
break;
setLayeredWindowAttributes(hwnd, RGB(0, 0, 0),
- (BYTE) (sourceAlpha + (destAlpha - sourceAlpha) * (int) (thisTick - startTick) / 200), LWA_ALPHA);
+ (BYTE) (sourceAlpha + (destAlpha - sourceAlpha) * (int)(thisTick - startTick) / 200), LWA_ALPHA);
}
setLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE) destAlpha, LWA_ALPHA);
}
diff --git a/src/modules/clist/contacts.cpp b/src/modules/clist/contacts.cpp index 65ecf618e3..ec1717dfd5 100644 --- a/src/modules/clist/contacts.cpp +++ b/src/modules/clist/contacts.cpp @@ -62,7 +62,7 @@ static int ProcessDatabaseValueDefault(CONTACTINFO *ci, const char* setting) ci->pszVal = dbv.ptszVal;
return 0;
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
if (DBGetContactSetting(ci->hContact, ci->szProto, setting, &dbv))
@@ -83,7 +83,7 @@ static int ProcessDatabaseValueDefault(CONTACTINFO *ci, const char* setting) return 0;
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
return 1;
}
@@ -159,12 +159,12 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) { else ci->pszVal = (TCHAR*)mir_strdup(countries[i].szName);
ci->type = CNFT_ASCIIZ;
- DBFreeVariant(&dbv);
+ db_free(&dbv);
return 0;
}
}
else return ProcessDatabaseValueDefault(ci, (ci->dwFlag & 0x7F) == CNF_COUNTRY ? "Country" : "CompanyCountry");
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
break;
@@ -187,11 +187,11 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) { strcat(strcat(strcpy(buf, dbv.pszVal), " "), dbv2.pszVal);
ci->pszVal = (TCHAR*)buf;
}
- DBFreeVariant(&dbv);
- DBFreeVariant(&dbv2);
+ db_free(&dbv);
+ db_free(&dbv2);
return 0;
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
break;
@@ -305,11 +305,11 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) { ci->pszVal = (TCHAR*)buf;
}
- DBFreeVariant(&dbv);
- DBFreeVariant(&dbv2);
+ db_free(&dbv);
+ db_free(&dbv2);
return 0;
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
break;
@@ -510,7 +510,7 @@ int LoadContactsModule(void) DBVARIANT dbv;
if ( !DBGetContactSetting(NULL, "Contact", "NameOrder", &dbv)) {
CopyMemory(nameOrder, dbv.pbVal, dbv.cpbVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
CreateServiceFunction(MS_CONTACT_GETCONTACTINFO, GetContactInfo);
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp index df8903a58d..8f6944f837 100644 --- a/src/modules/clist/genmenu.cpp +++ b/src/modules/clist/genmenu.cpp @@ -932,7 +932,7 @@ HMENU BuildRecursiveMenu(HMENU hMenu, PMO_IntMenuItem pRootMenu, ListParam *para if ( !DBGetContactSettingTString(NULL, MenuNameItems, DBString, &dbv)) {
if (_tcslen(dbv.ptszVal) > 0)
replaceStrT(pmi->CustomName, dbv.ptszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
mir_snprintf(DBString, SIZEOF(DBString), "%s_pos", menuItemName);
diff --git a/src/modules/clist/genmenuopt.cpp b/src/modules/clist/genmenuopt.cpp index d3b0b157c3..e9e4bff881 100644 --- a/src/modules/clist/genmenuopt.cpp +++ b/src/modules/clist/genmenuopt.cpp @@ -265,7 +265,7 @@ static int BuildTree(HWND hwndDlg, int MenuObjectId, BOOL bReread) if ( !DBGetContactSettingTString(NULL, MenuNameItems, buf, &dbv)) {
PD->name = mir_tstrdup(dbv.ptszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
else PD->name = mir_tstrdup(GetMenuItemText(p));
}
diff --git a/src/modules/clist/groups.cpp b/src/modules/clist/groups.cpp index fb9ce4cc3b..e3a6424c48 100644 --- a/src/modules/clist/groups.cpp +++ b/src/modules/clist/groups.cpp @@ -38,7 +38,7 @@ static int CountGroups(void) _itoa(i, str, 10);
if (DBGetContactSetting(NULL, "CListGroups", str, &dbv))
break;
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
return i;
}
@@ -56,10 +56,10 @@ static int GroupNameExists(const TCHAR *name, int skipGroup) if (DBGetContactSettingTString(NULL, "CListGroups", idstr, &dbv))
break;
if ( !_tcscmp(dbv.ptszVal + 1, name)) {
- DBFreeVariant(&dbv);
+ db_free(&dbv);
return i+1;
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
return 0;
}
@@ -120,7 +120,7 @@ static INT_PTR GetGroupName2(WPARAM wParam, LPARAM lParam) lstrcpynA(name, dbv.pszVal + 1, SIZEOF(name));
if ((DWORD *) lParam != NULL)
*(DWORD *) lParam = dbv.pszVal[0];
- DBFreeVariant(&dbv);
+ db_free(&dbv);
return (INT_PTR) name;
}
@@ -137,7 +137,7 @@ TCHAR* fnGetGroupName(int idx, DWORD* pdwFlags) lstrcpyn(name, dbv.ptszVal + 1, SIZEOF(name));
if (pdwFlags != NULL)
*pdwFlags = dbv.ptszVal[0];
- DBFreeVariant(&dbv);
+ db_free(&dbv);
return name;
}
@@ -163,7 +163,7 @@ static INT_PTR DeleteGroup(WPARAM wParam, LPARAM) if (DBGetContactSettingTString(NULL, "CListGroups", str, &dbv))
return 1;
lstrcpyn(name, dbv.ptszVal + 1, SIZEOF(name));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
if (db_get_b(NULL, "CList", "ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT))
{
TCHAR szQuestion[256+100];
@@ -192,10 +192,10 @@ static INT_PTR DeleteGroup(WPARAM wParam, LPARAM) if (_tcscmp(dbv.ptszVal, name))
{
- DBFreeVariant(&dbv);
+ db_free(&dbv);
continue;
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
if (szNewParent[0])
{
@@ -216,7 +216,7 @@ static INT_PTR DeleteGroup(WPARAM wParam, LPARAM) break;
_itoa(i, str, 10);
DBWriteContactSettingStringUtf(NULL, "CListGroups", str, dbv.pszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
_itoa(i, str, 10);
DBDeleteContactSetting(NULL, "CListGroups", str);
@@ -237,7 +237,7 @@ static INT_PTR DeleteGroup(WPARAM wParam, LPARAM) lstrcpyn(szNewName, dbv.ptszVal + len + 2, SIZEOF(szNewName));
cli.pfnRenameGroup(i + 1, szNewName);
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
SetCursor(LoadCursor(NULL, IDC_ARROW));
@@ -268,7 +268,7 @@ static int RenameGroupWithMove(int groupId, const TCHAR *szName, int move) return 1;
str[0] = dbv.pszVal[0] & 0x7F;
lstrcpyn(oldName, dbv.ptszVal + 1, SIZEOF(oldName));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
lstrcpyn(str + 1, szName, SIZEOF(str) - 1);
db_set_ts(NULL, "CListGroups", idstr, str);
@@ -300,7 +300,7 @@ static int RenameGroupWithMove(int groupId, const TCHAR *szName, int move) mir_sntprintf(szNewName, SIZEOF(szNewName), _T("%s\\%s"), szName, dbv.ptszVal + len + 2);
RenameGroupWithMove(i, szNewName, 0); //luckily, child groups will never need reordering
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
@@ -323,7 +323,7 @@ static int RenameGroupWithMove(int groupId, const TCHAR *szName, int move) MoveGroupBefore(groupId + 1, i + 2);
break;
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
}
@@ -360,7 +360,7 @@ static INT_PTR SetGroupExpandedState(WPARAM wParam, LPARAM lParam) else
dbv.pszVal[0] = dbv.pszVal[0] & ~GROUPF_EXPANDED;
DBWriteContactSettingStringUtf(NULL, "CListGroups", idstr, dbv.pszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
return 0;
}
@@ -377,7 +377,7 @@ static INT_PTR SetGroupFlags(WPARAM wParam, LPARAM lParam) oldval = dbv.pszVal[0];
newval = dbv.pszVal[0] = ((oldval & ~HIWORD(lParam)) | flags) & 0x7f;
DBWriteContactSettingStringUtf(NULL, "CListGroups", idstr, dbv.pszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
if ((oldval & GROUPF_HIDEOFFLINE) != (newval & GROUPF_HIDEOFFLINE))
cli.pfnLoadContactTree();
return 0;
@@ -423,7 +423,7 @@ static INT_PTR MoveGroupBefore(WPARAM wParam, LPARAM lParam) }
_itoa(i, str, 10);
DBWriteContactSettingStringUtf(NULL, "CListGroups", str, dbv.pszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
else {
@@ -435,7 +435,7 @@ static INT_PTR MoveGroupBefore(WPARAM wParam, LPARAM lParam) } //never happens
_itoa(i, str, 10);
DBWriteContactSettingStringUtf(NULL, "CListGroups", str, dbv.pszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
_itoa(shuffleTo, str, 10);
@@ -457,7 +457,7 @@ static INT_PTR BuildGroupMenu(WPARAM, LPARAM) if (DBGetContactSettingStringUtf(NULL, "CListGroups", "0", &dbv))
return (INT_PTR) (HMENU) NULL;
- DBFreeVariant(&dbv);
+ db_free(&dbv);
hRootMenu = CreateMenu();
for (groupId = 0;; groupId++) {
_itoa(groupId, idstr, 10);
@@ -510,7 +510,7 @@ static INT_PTR BuildGroupMenu(WPARAM, LPARAM) }
break;
}
- if ((int) mii.dwItemData - 1 > groupId)
+ if ((int)mii.dwItemData - 1 > groupId)
break;
}
if (compareResult) {
@@ -533,7 +533,7 @@ static INT_PTR BuildGroupMenu(WPARAM, LPARAM) }
} while (pNextField);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
return (INT_PTR) hRootMenu;
}
@@ -553,7 +553,7 @@ int InitGroupServices(void) dbv.pszVal[0] &= 0x7f;
DBWriteContactSettingStringUtf(NULL, "CListGroups", str, dbv.pszVal);
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
CreateServiceFunction(MS_CLIST_GROUPCREATE, CreateGroup);
diff --git a/src/modules/clist/keyboard.cpp b/src/modules/clist/keyboard.cpp index 6da22a5fb7..37fe94b30c 100644 --- a/src/modules/clist/keyboard.cpp +++ b/src/modules/clist/keyboard.cpp @@ -35,7 +35,7 @@ INT_PTR hkSearch(WPARAM wParam, LPARAM lParam) DBVARIANT dbv = {0};
if ( !DBGetContactSettingString(NULL, "CList", "SearchUrl", &dbv)) {
CallService(MS_UTILS_OPENURL, db_get_b(NULL, "CList", "HKSearchNewWnd", 0), (LPARAM)dbv.pszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
return 0;
}
|