From 007b4c7301f0d26a72f89f74e9929f42e24eb3e6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 5 Apr 2013 22:27:16 +0000 Subject: - rest of menus cleared; - old database macroses wiped out from all plugins (left in m_database.h for compatibility) git-svn-id: http://svn.miranda-ng.org/main/trunk@4324 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Xfire/src/userdetails.cpp | 60 ++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'protocols/Xfire/src/userdetails.cpp') diff --git a/protocols/Xfire/src/userdetails.cpp b/protocols/Xfire/src/userdetails.cpp index 13b7548d75..e571dedc6a 100644 --- a/protocols/Xfire/src/userdetails.cpp +++ b/protocols/Xfire/src/userdetails.cpp @@ -64,7 +64,7 @@ void LoadProfilStatus(LPVOID lparam) { void SetItemTxt(HWND hwndDlg,int feldid,char*feld,HANDLE hcontact,int type) { DBVARIANT dbv; - if(!DBGetContactSetting(hcontact,protocolname,feld,&dbv)) { + if(!db_get(hcontact,protocolname,feld,&dbv)) { if(type==1) { char temp[255]; @@ -75,7 +75,7 @@ void SetItemTxt(HWND hwndDlg,int feldid,char*feld,HANDLE hcontact,int type) { SetDlgItemText(hwndDlg,feldid,dbv.pszVal); } - DBFreeVariant(&dbv); + db_free(&dbv); EnableDlgItem(hwndDlg,feldid,TRUE); } else @@ -91,16 +91,16 @@ static int GetIPPortUDetails(HANDLE wParam,char* feld1,char* feld2) HGLOBAL clipbuffer; char* buffer; - if(DBGetContactSettingWord((HANDLE)wParam, protocolname, feld2, -1)==0) + if(db_get_w((HANDLE)wParam, protocolname, feld2, -1)==0) return 0; DBVARIANT dbv; - if(DBGetContactSettingString((HANDLE)wParam, protocolname, feld1,&dbv)) + if(db_get_s((HANDLE)wParam, protocolname, feld1,&dbv)) return 0; - sprintf(temp,"%s:%d",dbv.pszVal,DBGetContactSettingWord((HANDLE)wParam, protocolname, feld2, -1)); + sprintf(temp,"%s:%d",dbv.pszVal,db_get_w((HANDLE)wParam, protocolname, feld2, -1)); - DBFreeVariant(&dbv); + db_free(&dbv); if(OpenClipboard(NULL)) { @@ -121,7 +121,7 @@ static int GetIPPortUDetails(HANDLE wParam,char* feld1,char* feld2) void addToList(HWND listbox,HANDLE hContact,char*key,char*val) { DBVARIANT dbv; - if(!DBGetContactSetting(hContact,protocolname,val,&dbv)) + if(!db_get(hContact,protocolname,val,&dbv)) { LVITEM lvitem; memset(&lvitem,0,sizeof(lvitem)); @@ -134,7 +134,7 @@ void addToList(HWND listbox,HANDLE hContact,char*key,char*val) lvitem.iSubItem++; lvitem.pszText=dbv.pszVal; SendMessageA(listbox,LVM_SETITEM,0,(LPARAM)&lvitem); - DBFreeVariant(&dbv); + db_free(&dbv); } } @@ -262,7 +262,7 @@ static INT_PTR CALLBACK DlgProcUserDetails(HWND hwndDlg, UINT msg, WPARAM wParam if (hContact) { DBVARIANT dbv; - if(!DBGetContactSetting(hContact,protocolname,"Username",&dbv)) + if(!db_get(hContact,protocolname,"Username",&dbv)) { int usernamesize=strlen(dbv.pszVal)+1; char* username=new char[usernamesize]; @@ -272,13 +272,13 @@ static INT_PTR CALLBACK DlgProcUserDetails(HWND hwndDlg, UINT msg, WPARAM wParam mir_forkthread(LoadProfilStatus,(LPVOID)username); } //LoadProfilStatus - DBFreeVariant(&dbv); + db_free(&dbv); } - if(!DBGetContactSetting(hContact,protocolname,"GameInfo",&dbv)) + if(!db_get(hContact,protocolname,"GameInfo",&dbv)) { setGameInfo(listbox,dbv.pszVal); - DBFreeVariant(&dbv); + db_free(&dbv); } addToList(listbox,hContact,"Servername","ServerName"); @@ -301,26 +301,26 @@ static INT_PTR CALLBACK DlgProcUserDetails(HWND hwndDlg, UINT msg, WPARAM wParam { DBVARIANT dbv; - if(!DBGetContactSetting(hContact,protocolname,"GameId",&dbv)) + if(!db_get(hContact,protocolname,"GameId",&dbv)) { SendMessage(GetDlgItem(hwndDlg,IDC_GAMEICO),STM_SETICON,(WPARAM)xgamelist.iconmngr.getGameIcon(dbv.wVal),0); - DBFreeVariant(&dbv); + db_free(&dbv); } - if(!DBGetContactSetting(hContact,protocolname,"VoiceId",&dbv)) + if(!db_get(hContact,protocolname,"VoiceId",&dbv)) { SendMessage(GetDlgItem(hwndDlg,IDC_VOICEICO),STM_SETICON,(WPARAM)xgamelist.iconmngr.getGameIcon(dbv.wVal),0); - DBFreeVariant(&dbv); + db_free(&dbv); } - if(DBGetContactSetting(hContact,protocolname,"ServerIP",&dbv)) + if(db_get(hContact,protocolname,"ServerIP",&dbv)) { EnableWindow(GetDlgItem(hwndDlg,IDC_COPYGAME),FALSE); - DBFreeVariant(&dbv); + db_free(&dbv); } - if(DBGetContactSetting(hContact,protocolname,"VServerIP",&dbv)) + if(db_get(hContact,protocolname,"VServerIP",&dbv)) { EnableWindow(GetDlgItem(hwndDlg,IDC_COPYVOICE),FALSE); - DBFreeVariant(&dbv); + db_free(&dbv); } //ShowWindow(GetDlgItem(hwndDlg,IDC_VOICEICO),FALSE) @@ -388,30 +388,30 @@ static INT_PTR CALLBACK DlgProcUserDetails(HWND hwndDlg, UINT msg, WPARAM wParam char nick[256]=""; char status[256]=""; char game[512]=""; - if(!DBGetContactSetting(hContact,"ContactPhoto","File",&dbv)) + if(!db_get(hContact,"ContactPhoto","File",&dbv)) { snprintf(img,256,"",dbv.pszVal); - DBFreeVariant(&dbv); + db_free(&dbv); } - if(!DBGetContactSetting(hContact,protocolname,"Username",&dbv)) + if(!db_get(hContact,protocolname,"Username",&dbv)) { snprintf(username,256,"Username: %s
",dbv.pszVal); - DBFreeVariant(&dbv); + db_free(&dbv); } - if(!DBGetContactSetting(hContact,protocolname,"Nick",&dbv)) + if(!db_get(hContact,protocolname,"Nick",&dbv)) { snprintf(nick,256,"Nick: %s
",dbv.pszVal); - DBFreeVariant(&dbv); + db_free(&dbv); } - if(!DBGetContactSetting(hContact,protocolname,"XStatusMsg",&dbv)) + if(!db_get(hContact,protocolname,"XStatusMsg",&dbv)) { snprintf(status,256,"Status: %s
",dbv.pszVal); - DBFreeVariant(&dbv); + db_free(&dbv); } - if(!DBGetContactSetting(hContact,protocolname,"RGame",&dbv)) + if(!db_get(hContact,protocolname,"RGame",&dbv)) { snprintf(game,512,"
Spiel
%s
",dbv.pszVal); - DBFreeVariant(&dbv); + db_free(&dbv); } snprintf(profil,2056,"mshtml:
%s%s%s%s
%s%s
",img,username,nick,status,game); HWND hWnd = ::CreateWindow("AtlAxWin", profil, -- cgit v1.2.3