From e2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 22 May 2015 16:04:17 +0000 Subject: T2Utf - handy replacement for ptrA git-svn-id: http://svn.miranda-ng.org/main/trunk@13758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Gadu-Gadu/src/dialogs.cpp | 49 +++++++++++-------------------------- 1 file changed, 14 insertions(+), 35 deletions(-) (limited to 'protocols/Gadu-Gadu/src/dialogs.cpp') diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp index a75e6ef516..5ace2600c9 100644 --- a/protocols/Gadu-Gadu/src/dialogs.cpp +++ b/protocols/Gadu-Gadu/src/dialogs.cpp @@ -832,32 +832,20 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, req = gg_pubdir50_new(GG_PUBDIR50_WRITE); GetDlgItemText(hwndDlg, IDC_FIRSTNAME, text, SIZEOF(text)); - if (mir_tstrlen(text)){ - char* text_utf8 = mir_utf8encodeT(text); - gg_pubdir50_add(req, GG_PUBDIR50_FIRSTNAME, text_utf8); - mir_free(text_utf8); - } + if (mir_tstrlen(text)) + gg_pubdir50_add(req, GG_PUBDIR50_FIRSTNAME, T2Utf(text)); GetDlgItemText(hwndDlg, IDC_LASTNAME, text, SIZEOF(text)); - if (mir_tstrlen(text)){ - char* text_utf8 = mir_utf8encodeT(text); - gg_pubdir50_add(req, GG_PUBDIR50_LASTNAME, text_utf8); - mir_free(text_utf8); - } + if (mir_tstrlen(text)) + gg_pubdir50_add(req, GG_PUBDIR50_LASTNAME, T2Utf(text)); GetDlgItemText(hwndDlg, IDC_NICKNAME, text, SIZEOF(text)); - if (mir_tstrlen(text)){ - char* text_utf8 = mir_utf8encodeT(text); - gg_pubdir50_add(req, GG_PUBDIR50_NICKNAME, text_utf8); - mir_free(text_utf8); - } + if (mir_tstrlen(text)) + gg_pubdir50_add(req, GG_PUBDIR50_NICKNAME, T2Utf(text)); GetDlgItemText(hwndDlg, IDC_CITY, text, SIZEOF(text)); - if (mir_tstrlen(text)){ - char* text_utf8 = mir_utf8encodeT(text); - gg_pubdir50_add(req, GG_PUBDIR50_CITY, text_utf8); - mir_free(text_utf8); - } + if (mir_tstrlen(text)) + gg_pubdir50_add(req, GG_PUBDIR50_CITY, T2Utf(text)); // Gadu-Gadu Female <-> Male switch(SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_GETCURSEL, 0, 0)) { @@ -872,25 +860,16 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, } GetDlgItemText(hwndDlg, IDC_BIRTHYEAR, text, SIZEOF(text)); - if (mir_tstrlen(text)){ - char* text_utf8 = mir_utf8encodeT(text); - gg_pubdir50_add(req, GG_PUBDIR50_BIRTHYEAR, text_utf8); - mir_free(text_utf8); - } + if (mir_tstrlen(text)) + gg_pubdir50_add(req, GG_PUBDIR50_BIRTHYEAR, T2Utf(text)); GetDlgItemText(hwndDlg, IDC_FAMILYNAME, text, SIZEOF(text)); - if (mir_tstrlen(text)){ - char* text_utf8 = mir_utf8encodeT(text); - gg_pubdir50_add(req, GG_PUBDIR50_FAMILYNAME, text_utf8); - mir_free(text_utf8); - } + if (mir_tstrlen(text)) + gg_pubdir50_add(req, GG_PUBDIR50_FAMILYNAME, T2Utf(text)); GetDlgItemText(hwndDlg, IDC_CITYORIGIN, text, SIZEOF(text)); - if (mir_tstrlen(text)){ - char* text_utf8 = mir_utf8encodeT(text); - gg_pubdir50_add(req, GG_PUBDIR50_FAMILYCITY, text_utf8); - mir_free(text_utf8); - } + if (mir_tstrlen(text)) + gg_pubdir50_add(req, GG_PUBDIR50_FAMILYCITY, T2Utf(text)); // Run update gg_pubdir50_seq_set(req, GG_SEQ_CHINFO); -- cgit v1.2.3