diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-22 16:04:17 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-22 16:04:17 +0000 |
commit | e2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 (patch) | |
tree | ba79bdcede96f80039f8b88d2791f198b9ec2981 /protocols/Gadu-Gadu/src/dialogs.cpp | |
parent | f8e34b5f83f3ce5f39d541e9068b6b8cb6d92acd (diff) |
T2Utf - handy replacement for ptrA<mir_utf8decodeT()>
git-svn-id: http://svn.miranda-ng.org/main/trunk@13758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src/dialogs.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/dialogs.cpp | 49 |
1 files changed, 14 insertions, 35 deletions
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); |