diff options
Diffstat (limited to 'src/modules/contacts/contacts.cpp')
-rw-r--r-- | src/modules/contacts/contacts.cpp | 228 |
1 files changed, 114 insertions, 114 deletions
diff --git a/src/modules/contacts/contacts.cpp b/src/modules/contacts/contacts.cpp index 1b8041a066..11180fb52c 100644 --- a/src/modules/contacts/contacts.cpp +++ b/src/modules/contacts/contacts.cpp @@ -20,19 +20,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define NAMEORDERCOUNT 8
static TCHAR* nameOrderDescr[ NAMEORDERCOUNT ] =
{
- _T( "My custom name (not moveable)" ),
- _T( "Nick" ),
- _T( "FirstName" ),
- _T( "E-mail" ),
- _T( "LastName" ),
- _T( "Username" ),
- _T( "FirstName LastName" ),
- _T( "'(Unknown Contact)' (not moveable)" )
+ _T("My custom name (not moveable)"),
+ _T("Nick"),
+ _T("FirstName"),
+ _T("E-mail"),
+ _T("LastName"),
+ _T("Username"),
+ _T("FirstName LastName"),
+ _T("'(Unknown Contact)' (not moveable)")
};
BYTE nameOrder[NAMEORDERCOUNT];
-static int GetDatabaseString( CONTACTINFO *ci, const char* setting, DBVARIANT* dbv )
+static int GetDatabaseString(CONTACTINFO *ci, const char* setting, DBVARIANT* dbv)
{
if (strcmp(ci->szProto, "CList") && CallProtoService(ci->szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_INFOSETTINGSVC)
{
@@ -43,7 +43,7 @@ static int GetDatabaseString( CONTACTINFO *ci, const char* setting, DBVARIANT* d if (res != CALLSERVICE_NOTFOUND) return res;
}
- if ( ci->dwFlag & CNF_UNICODE )
+ if (ci->dwFlag & CNF_UNICODE)
return DBGetContactSettingWString(ci->hContact, ci->szProto, setting, dbv);
return DBGetContactSettingString(ci->hContact, ci->szProto, setting, dbv);
@@ -52,20 +52,20 @@ static int GetDatabaseString( CONTACTINFO *ci, const char* setting, DBVARIANT* d static int ProcessDatabaseValueDefault(CONTACTINFO *ci, const char* setting)
{
DBVARIANT dbv;
- if ( !GetDatabaseString( ci, setting, &dbv )) {
+ if ( !GetDatabaseString(ci, setting, &dbv)) {
switch (dbv.type) {
case DBVT_ASCIIZ:
- if (!dbv.pszVal[0]) break;
+ if ( !dbv.pszVal[0]) break;
case DBVT_WCHAR:
- if (!dbv.pwszVal[0]) break;
+ if ( !dbv.pwszVal[0]) break;
ci->type = CNFT_ASCIIZ;
ci->pszVal = dbv.ptszVal;
return 0;
}
- DBFreeVariant( &dbv );
+ DBFreeVariant(&dbv);
}
- if ( DBGetContactSetting( ci->hContact, ci->szProto, setting, &dbv ))
+ if (DBGetContactSetting(ci->hContact, ci->szProto, setting, &dbv))
return 1;
switch (dbv.type) {
@@ -83,7 +83,7 @@ static int ProcessDatabaseValueDefault(CONTACTINFO *ci, const char* setting) return 0;
}
- DBFreeVariant( &dbv );
+ DBFreeVariant(&dbv);
return 1;
}
@@ -96,40 +96,40 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) { if (ci->szProto == NULL) return 1;
ci->type = 0;
switch(ci->dwFlag & 0x7F) {
- case CNF_FIRSTNAME: return ProcessDatabaseValueDefault( ci, "FirstName" );
- case CNF_LASTNAME: return ProcessDatabaseValueDefault( ci, "LastName" );
- case CNF_NICK: return ProcessDatabaseValueDefault( ci, "Nick" );
- case CNF_EMAIL: return ProcessDatabaseValueDefault( ci, "e-mail" );
- case CNF_CITY: return ProcessDatabaseValueDefault( ci, "City" );
- case CNF_STATE: return ProcessDatabaseValueDefault( ci, "State" );
- case CNF_PHONE: return ProcessDatabaseValueDefault( ci, "Phone" );
- case CNF_HOMEPAGE: return ProcessDatabaseValueDefault( ci, "Homepage" );
- case CNF_ABOUT: return ProcessDatabaseValueDefault( ci, "About" );
- case CNF_AGE: return ProcessDatabaseValueDefault( ci, "Age" );
- case CNF_GENDER: return ProcessDatabaseValueDefault( ci, "Gender" );
- case CNF_FAX: return ProcessDatabaseValueDefault( ci, "Fax" );
- case CNF_CELLULAR: return ProcessDatabaseValueDefault( ci, "Cellular" );
- case CNF_BIRTHDAY: return ProcessDatabaseValueDefault( ci, "BirthDay" );
- case CNF_BIRTHMONTH: return ProcessDatabaseValueDefault( ci, "BirthMonth" );
- case CNF_BIRTHYEAR: return ProcessDatabaseValueDefault( ci, "BirthYear" );
- case CNF_STREET: return ProcessDatabaseValueDefault( ci, "Street" );
- case CNF_ZIP: return ProcessDatabaseValueDefault( ci, "ZIP" );
- case CNF_LANGUAGE1: return ProcessDatabaseValueDefault( ci, "Language1" );
- case CNF_LANGUAGE2: return ProcessDatabaseValueDefault( ci, "Language2" );
- case CNF_LANGUAGE3: return ProcessDatabaseValueDefault( ci, "Language3" );
- case CNF_CONAME: return ProcessDatabaseValueDefault( ci, "Company" );
- case CNF_CODEPT: return ProcessDatabaseValueDefault( ci, "CompanyDepartment" );
- case CNF_COPOSITION: return ProcessDatabaseValueDefault( ci, "CompanyPosition" );
- case CNF_COSTREET: return ProcessDatabaseValueDefault( ci, "CompanyStreet" );
- case CNF_COCITY: return ProcessDatabaseValueDefault( ci, "CompanyCity" );
- case CNF_COSTATE: return ProcessDatabaseValueDefault( ci, "CompanyState" );
- case CNF_COZIP: return ProcessDatabaseValueDefault( ci, "CompanyZIP" );
- case CNF_COHOMEPAGE: return ProcessDatabaseValueDefault( ci, "CompanyHomepage" );
+ case CNF_FIRSTNAME: return ProcessDatabaseValueDefault(ci, "FirstName");
+ case CNF_LASTNAME: return ProcessDatabaseValueDefault(ci, "LastName");
+ case CNF_NICK: return ProcessDatabaseValueDefault(ci, "Nick");
+ case CNF_EMAIL: return ProcessDatabaseValueDefault(ci, "e-mail");
+ case CNF_CITY: return ProcessDatabaseValueDefault(ci, "City");
+ case CNF_STATE: return ProcessDatabaseValueDefault(ci, "State");
+ case CNF_PHONE: return ProcessDatabaseValueDefault(ci, "Phone");
+ case CNF_HOMEPAGE: return ProcessDatabaseValueDefault(ci, "Homepage");
+ case CNF_ABOUT: return ProcessDatabaseValueDefault(ci, "About");
+ case CNF_AGE: return ProcessDatabaseValueDefault(ci, "Age");
+ case CNF_GENDER: return ProcessDatabaseValueDefault(ci, "Gender");
+ case CNF_FAX: return ProcessDatabaseValueDefault(ci, "Fax");
+ case CNF_CELLULAR: return ProcessDatabaseValueDefault(ci, "Cellular");
+ case CNF_BIRTHDAY: return ProcessDatabaseValueDefault(ci, "BirthDay");
+ case CNF_BIRTHMONTH: return ProcessDatabaseValueDefault(ci, "BirthMonth");
+ case CNF_BIRTHYEAR: return ProcessDatabaseValueDefault(ci, "BirthYear");
+ case CNF_STREET: return ProcessDatabaseValueDefault(ci, "Street");
+ case CNF_ZIP: return ProcessDatabaseValueDefault(ci, "ZIP");
+ case CNF_LANGUAGE1: return ProcessDatabaseValueDefault(ci, "Language1");
+ case CNF_LANGUAGE2: return ProcessDatabaseValueDefault(ci, "Language2");
+ case CNF_LANGUAGE3: return ProcessDatabaseValueDefault(ci, "Language3");
+ case CNF_CONAME: return ProcessDatabaseValueDefault(ci, "Company");
+ case CNF_CODEPT: return ProcessDatabaseValueDefault(ci, "CompanyDepartment");
+ case CNF_COPOSITION: return ProcessDatabaseValueDefault(ci, "CompanyPosition");
+ case CNF_COSTREET: return ProcessDatabaseValueDefault(ci, "CompanyStreet");
+ case CNF_COCITY: return ProcessDatabaseValueDefault(ci, "CompanyCity");
+ case CNF_COSTATE: return ProcessDatabaseValueDefault(ci, "CompanyState");
+ case CNF_COZIP: return ProcessDatabaseValueDefault(ci, "CompanyZIP");
+ case CNF_COHOMEPAGE: return ProcessDatabaseValueDefault(ci, "CompanyHomepage");
case CNF_CUSTOMNICK:
{
char* saveProto = ci->szProto; ci->szProto = "CList";
- if ( ci->hContact != NULL && !ProcessDatabaseValueDefault( ci, "MyHandle" )) {
+ if (ci->hContact != NULL && !ProcessDatabaseValueDefault(ci, "MyHandle")) {
ci->szProto = saveProto;
return 0;
}
@@ -138,60 +138,60 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) { }
case CNF_COUNTRY:
case CNF_COCOUNTRY:
- if ( !GetDatabaseString( ci, (ci->dwFlag & 0x7F) == CNF_COUNTRY ? "CountryName" : "CompanyCountryName", &dbv ))
+ if ( !GetDatabaseString(ci, (ci->dwFlag & 0x7F) == CNF_COUNTRY ? "CountryName" : "CompanyCountryName", &dbv))
return 0;
- if ( !DBGetContactSetting( ci->hContact, ci->szProto, (ci->dwFlag & 0x7F) == CNF_COUNTRY ? "Country" : "CompanyCountry", &dbv )) {
- if ( dbv.type == DBVT_WORD ) {
+ if ( !DBGetContactSetting(ci->hContact, ci->szProto, (ci->dwFlag & 0x7F) == CNF_COUNTRY ? "Country" : "CompanyCountry", &dbv)) {
+ if (dbv.type == DBVT_WORD) {
int i, countryCount;
struct CountryListEntry *countries;
CallService(MS_UTILS_GETCOUNTRYLIST, (WPARAM)&countryCount, (LPARAM)&countries);
for (i=0;i<countryCount;i++) {
if (countries[i].id != dbv.wVal) continue;
- if ( ci->dwFlag & CNF_UNICODE ) {
- int cbLen = MultiByteToWideChar( CP_ACP, 0, ( LPCSTR )countries[i].szName, -1, NULL, 0 );
- WCHAR* buf = ( WCHAR* )mir_alloc( sizeof( WCHAR )*(cbLen+1) );
- if ( buf != NULL )
- MultiByteToWideChar( CP_ACP, 0, ( LPCSTR )countries[i].szName, -1, buf, cbLen );
- ci->pszVal = ( TCHAR* )buf;
+ if (ci->dwFlag & CNF_UNICODE) {
+ int cbLen = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)countries[i].szName, -1, NULL, 0);
+ WCHAR* buf = (WCHAR*)mir_alloc(sizeof(WCHAR)*(cbLen+1));
+ if (buf != NULL)
+ MultiByteToWideChar(CP_ACP, 0, (LPCSTR)countries[i].szName, -1, buf, cbLen);
+ ci->pszVal = (TCHAR*)buf;
}
- else ci->pszVal = ( TCHAR* )mir_strdup(countries[i].szName);
+ else ci->pszVal = (TCHAR*)mir_strdup(countries[i].szName);
ci->type = CNFT_ASCIIZ;
DBFreeVariant(&dbv);
return 0;
}
}
- else return ProcessDatabaseValueDefault( ci, (ci->dwFlag & 0x7F) == CNF_COUNTRY ? "Country" : "CompanyCountry" );
+ else return ProcessDatabaseValueDefault(ci, (ci->dwFlag & 0x7F) == CNF_COUNTRY ? "Country" : "CompanyCountry");
DBFreeVariant(&dbv);
}
break;
case CNF_FIRSTLAST:
- if ( !GetDatabaseString( ci, "FirstName", &dbv )) {
+ if ( !GetDatabaseString(ci, "FirstName", &dbv)) {
DBVARIANT dbv2;
- if (!GetDatabaseString(ci, "LastName", &dbv2)) {
+ if ( !GetDatabaseString(ci, "LastName", &dbv2)) {
ci->type = CNFT_ASCIIZ;
- if ( ci->dwFlag & CNF_UNICODE ) {
+ if (ci->dwFlag & CNF_UNICODE) {
size_t len = wcslen(dbv.pwszVal) + wcslen(dbv2.pwszVal) + 2;
- WCHAR* buf = ( WCHAR* )mir_alloc( sizeof( WCHAR )*len );
- if ( buf != NULL )
- wcscat( wcscat( wcscpy( buf, dbv.pwszVal ), L" " ), dbv2.pwszVal );
- ci->pszVal = ( TCHAR* )buf;
+ WCHAR* buf = (WCHAR*)mir_alloc(sizeof(WCHAR)*len);
+ if (buf != NULL)
+ wcscat(wcscat(wcscpy(buf, dbv.pwszVal), L" "), dbv2.pwszVal);
+ ci->pszVal = (TCHAR*)buf;
}
else {
size_t len = strlen(dbv.pszVal) + strlen(dbv2.pszVal) + 2;
- char* buf = ( char* )mir_alloc( len );
- if ( buf != NULL )
- strcat( strcat( strcpy( buf, dbv.pszVal ), " " ), dbv2.pszVal );
- ci->pszVal = ( TCHAR* )buf;
+ char* buf = (char*)mir_alloc(len);
+ if (buf != NULL)
+ strcat(strcat(strcpy(buf, dbv.pszVal), " "), dbv2.pszVal);
+ ci->pszVal = (TCHAR*)buf;
}
- DBFreeVariant( &dbv );
- DBFreeVariant( &dbv2 );
+ DBFreeVariant(&dbv);
+ DBFreeVariant(&dbv2);
return 0;
}
- DBFreeVariant( &dbv );
+ DBFreeVariant(&dbv);
}
break;
@@ -199,18 +199,18 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) { {
char *uid = (char*)CallProtoService(ci->szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if ((INT_PTR)uid != CALLSERVICE_NOTFOUND&&uid)
- if (!ProcessDatabaseValueDefault(ci, uid))
+ if ( !ProcessDatabaseValueDefault(ci, uid))
return 0;
break;
}
case CNF_DISPLAYUID:
{
- if (!ProcessDatabaseValueDefault(ci, "display_uid"))
+ if ( !ProcessDatabaseValueDefault(ci, "display_uid"))
return 0;
char *uid = (char*)CallProtoService(ci->szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if ((INT_PTR)uid != CALLSERVICE_NOTFOUND&&uid)
- if (!ProcessDatabaseValueDefault(ci, uid))
+ if ( !ProcessDatabaseValueDefault(ci, uid))
return 0;
break;
@@ -219,7 +219,7 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) { case CNF_DISPLAY:
{
int i;
- for ( i=0; i < NAMEORDERCOUNT; i++ ) {
+ for (i=0; i < NAMEORDERCOUNT; i++) {
switch(nameOrder[i]) {
case 0: // custom name
{
@@ -234,19 +234,19 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) { break;
}
case 1:
- if ( !ProcessDatabaseValueDefault( ci, "Nick" )) // nick
+ if ( !ProcessDatabaseValueDefault(ci, "Nick")) // nick
return 0;
break;
case 2:
- if ( !ProcessDatabaseValueDefault( ci, "FirstName" )) // First Name
+ if ( !ProcessDatabaseValueDefault(ci, "FirstName")) // First Name
return 0;
break;
case 3:
- if ( !ProcessDatabaseValueDefault( ci, "e-mail" )) // E-mail
+ if ( !ProcessDatabaseValueDefault(ci, "e-mail")) // E-mail
return 0;
break;
case 4:
- if ( !ProcessDatabaseValueDefault( ci, "LastName" )) // Last Name
+ if ( !ProcessDatabaseValueDefault(ci, "LastName")) // Last Name
return 0;
break;
case 5: // Unique id
@@ -254,18 +254,18 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) { // protocol must define a PFLAG_UNIQUEIDSETTING
char *uid = (char*)CallProtoService(ci->szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if ((INT_PTR)uid != CALLSERVICE_NOTFOUND&&uid) {
- if (!GetDatabaseString(ci, uid, &dbv)) {
- if ( dbv.type == DBVT_BYTE || dbv.type == DBVT_WORD || dbv.type == DBVT_DWORD ) {
+ if ( !GetDatabaseString(ci, uid, &dbv)) {
+ if (dbv.type == DBVT_BYTE || dbv.type == DBVT_WORD || dbv.type == DBVT_DWORD) {
long value = (dbv.type == DBVT_BYTE) ? dbv.bVal:(dbv.type == DBVT_WORD ? dbv.wVal : dbv.dVal);
- if ( ci->dwFlag & CNF_UNICODE ) {
+ if (ci->dwFlag & CNF_UNICODE) {
WCHAR buf[ 40 ];
- _ltow( value, buf, 10 );
- ci->pszVal = ( TCHAR* )mir_wstrdup( buf );
+ _ltow(value, buf, 10);
+ ci->pszVal = (TCHAR*)mir_wstrdup(buf);
}
else {
char buf[ 40 ];
- _ltoa( value, buf, 10 );
- ci->pszVal = ( TCHAR* )mir_strdup(buf);
+ _ltoa(value, buf, 10);
+ ci->pszVal = (TCHAR*)mir_strdup(buf);
}
ci->type = CNFT_ASCIIZ;
return 0;
@@ -283,39 +283,39 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) { break;
}
case 6: // first + last name
- if (!GetDatabaseString(ci, "FirstName", &dbv)) {
+ if ( !GetDatabaseString(ci, "FirstName", &dbv)) {
DBVARIANT dbv2;
- if (!GetDatabaseString(ci, "LastName", &dbv2)) {
+ if ( !GetDatabaseString(ci, "LastName", &dbv2)) {
ci->type = CNFT_ASCIIZ;
- if ( ci->dwFlag & CNF_UNICODE ) {
+ if (ci->dwFlag & CNF_UNICODE) {
size_t len = wcslen(dbv.pwszVal) + wcslen(dbv2.pwszVal) + 2;
- WCHAR* buf = ( WCHAR* )mir_alloc( sizeof( WCHAR )*len );
- if ( buf != NULL )
- wcscat( wcscat( wcscpy( buf, dbv.pwszVal ), L" " ), dbv2.pwszVal );
- ci->pszVal = ( TCHAR* )buf;
+ WCHAR* buf = (WCHAR*)mir_alloc(sizeof(WCHAR)*len);
+ if (buf != NULL)
+ wcscat(wcscat(wcscpy(buf, dbv.pwszVal), L" "), dbv2.pwszVal);
+ ci->pszVal = (TCHAR*)buf;
}
else {
size_t len = strlen(dbv.pszVal) + strlen(dbv2.pszVal) + 2;
- char* buf = ( char* )mir_alloc( len );
- if ( buf != NULL )
- strcat( strcat( strcpy( buf, dbv.pszVal ), " " ), dbv2.pszVal );
- ci->pszVal = ( TCHAR* )buf;
+ char* buf = (char*)mir_alloc(len);
+ if (buf != NULL)
+ strcat(strcat(strcpy(buf, dbv.pszVal), " "), dbv2.pszVal);
+ ci->pszVal = (TCHAR*)buf;
}
- DBFreeVariant( &dbv );
- DBFreeVariant( &dbv2 );
+ DBFreeVariant(&dbv);
+ DBFreeVariant(&dbv2);
return 0;
}
- DBFreeVariant( &dbv );
+ DBFreeVariant(&dbv);
}
break;
case 7:
- if ( ci->dwFlag & CNF_UNICODE )
- ci->pszVal = ( TCHAR* )mir_wstrdup( TranslateW( L"'(Unknown Contact)'" ));
+ if (ci->dwFlag & CNF_UNICODE)
+ ci->pszVal = (TCHAR*)mir_wstrdup(TranslateW(L"'(Unknown Contact)'"));
else
- ci->pszVal = ( TCHAR* )mir_strdup( Translate("'(Unknown Contact)'"));
+ ci->pszVal = (TCHAR*)mir_strdup(Translate("'(Unknown Contact)'"));
ci->type = CNFT_ASCIIZ;
return 0;
} } }
@@ -338,7 +338,7 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) { }
case CNF_MYNOTES: {
char* saveProto = ci->szProto; ci->szProto = "UserInfo";
- if (!ProcessDatabaseValueDefault(ci, "MyNotes")) {
+ if ( !ProcessDatabaseValueDefault(ci, "MyNotes")) {
ci->szProto = saveProto;
return 0;
}
@@ -371,10 +371,10 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara tvis.hParent = NULL;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_TEXT|TVIF_PARAM;
- for (i=0; i < SIZEOF(nameOrderDescr); i++ ) {
+ for (i=0; i < SIZEOF(nameOrderDescr); i++) {
tvis.item.lParam = nameOrder[i];
- tvis.item.pszText = TranslateTS( nameOrderDescr[ nameOrder[i]] );
- TreeView_InsertItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvis );
+ tvis.item.pszText = TranslateTS(nameOrderDescr[ nameOrder[i]]);
+ TreeView_InsertItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvis);
} }
return TRUE;
}
@@ -392,9 +392,9 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara cws.value.pbVal = nameOrder;
tvi.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg, IDC_NAMEORDER));
i=0;
- while ( tvi.hItem != NULL ) {
+ while (tvi.hItem != NULL) {
tvi.mask = TVIF_PARAM | TVIF_HANDLE;
- TreeView_GetItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvi );
+ TreeView_GetItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvi);
nameOrder[i++] = (BYTE)tvi.lParam;
tvi.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_NAMEORDER), tvi.hItem);
}
@@ -405,7 +405,7 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara case IDC_NAMEORDER:
if (((LPNMHDR)lParam)->code == TVN_BEGINDRAGA) {
LPNMTREEVIEWA notify = (LPNMTREEVIEWA)lParam;
- if ( notify->itemNew.lParam == 0 || notify->itemNew.lParam == SIZEOF(nameOrderDescr)-1 )
+ if (notify->itemNew.lParam == 0 || notify->itemNew.lParam == SIZEOF(nameOrderDescr)-1)
break;
SetCapture(hwndDlg);
dat->dragging=1;
@@ -416,7 +416,7 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara }
break;
case WM_MOUSEMOVE:
- if (!dat->dragging) break;
+ if ( !dat->dragging) break;
{ TVHITTESTINFO hti;
hti.pt.x=(short)LOWORD(lParam);
hti.pt.y=(short)HIWORD(lParam);
@@ -436,7 +436,7 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara }
break;
case WM_LBUTTONUP:
- if (!dat->dragging) break;
+ if ( !dat->dragging) break;
TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_NAMEORDER), NULL, 0);
dat->dragging=0;
ReleaseCapture();
@@ -488,7 +488,7 @@ static int ContactOptInit(WPARAM wParam, LPARAM) odp.pszTitle = LPGEN("Contacts");
odp.pfnDlgProc = ContactOpts;
odp.flags = ODPF_BOLDGROUPS;
- CallService( MS_OPT_ADDPAGE, wParam, ( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
return 0;
}
@@ -501,7 +501,7 @@ int LoadContactsModule(void) { for (i=0; i<NAMEORDERCOUNT; i++)
nameOrder[i]=i;
- if (!DBGetContactSetting(NULL, "Contact", "NameOrder", &dbv))
+ if ( !DBGetContactSetting(NULL, "Contact", "NameOrder", &dbv))
{
CopyMemory(nameOrder, dbv.pbVal, dbv.cpbVal);
DBFreeVariant(&dbv);
|