From 2bf82f155a0e98e6ab6c31a01315582f57bc9aa8 Mon Sep 17 00:00:00 2001 From: slotwin Date: Thu, 12 Jun 2014 20:43:30 +0000 Subject: UserInfoEx: rearranged option pages (changed options and icons group name to make it more descriptive, changes some other titles) proper capitalization code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@9447 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/UserInfoEx/src/psp_origin.cpp | 52 +++++++++++++---------------------- 1 file changed, 19 insertions(+), 33 deletions(-) (limited to 'plugins/UserInfoEx/src/psp_origin.cpp') diff --git a/plugins/UserInfoEx/src/psp_origin.cpp b/plugins/UserInfoEx/src/psp_origin.cpp index 5c455e2a78..5d435f4e7d 100644 --- a/plugins/UserInfoEx/src/psp_origin.cpp +++ b/plugins/UserInfoEx/src/psp_origin.cpp @@ -19,9 +19,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/** - * System Includes: - **/ #include "commonheaders.h" /** @@ -36,13 +33,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. **/ INT_PTR CALLBACK PSPProcOrigin(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { - switch (uMsg) - { + switch (uMsg) { case WM_INITDIALOG: { CCtrlList *pCtrlList = CCtrlList::CreateObj(hDlg); - if (pCtrlList) - { + if (pCtrlList) { LPIDSTRLIST pList; UINT nList; @@ -53,52 +48,46 @@ INT_PTR CALLBACK PSPProcOrigin(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara TranslateDialogDefault(hDlg); SetTimer(hDlg, 1, 5000, NULL); - pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STREET, SET_CONTACT_ORIGIN_STREET, DBVT_TCHAR)); - pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_ZIP, SET_CONTACT_ORIGIN_ZIP, DBVT_TCHAR)); - pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_CITY, SET_CONTACT_ORIGIN_CITY, DBVT_TCHAR)); - pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STATE, SET_CONTACT_ORIGIN_STATE, DBVT_TCHAR)); + pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STREET, SET_CONTACT_ORIGIN_STREET, DBVT_TCHAR)); + pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_ZIP, SET_CONTACT_ORIGIN_ZIP, DBVT_TCHAR)); + pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_CITY, SET_CONTACT_ORIGIN_CITY, DBVT_TCHAR)); + pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STATE, SET_CONTACT_ORIGIN_STATE, DBVT_TCHAR)); GetCountryList(&nList, &pList); - pCtrlList->insert(CCombo::CreateObj (hDlg, EDIT_COUNTRY, SET_CONTACT_ORIGIN_COUNTRY, DBVT_WORD, pList, nList)); + pCtrlList->insert(CCombo::CreateObj(hDlg, EDIT_COUNTRY, SET_CONTACT_ORIGIN_COUNTRY, DBVT_WORD, pList, nList)); - pCtrlList->insert(CTzCombo::CreateObj(hDlg, EDIT_TIMEZONE, NULL)); + pCtrlList->insert(CTzCombo::CreateObj(hDlg, EDIT_TIMEZONE, NULL)); } } break; case WM_NOTIFY: { - switch (((LPNMHDR) lParam)->idFrom) - { + switch (((LPNMHDR) lParam)->idFrom) { case 0: { MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam; LPCSTR pszProto; - switch (((LPNMHDR) lParam)->code) - { + switch (((LPNMHDR) lParam)->code) { case PSN_INFOCHANGED: { BYTE bChanged = 0; - if (!PSGetBaseProto(hDlg, pszProto) || *pszProto == 0) break; + if (!PSGetBaseProto(hDlg, pszProto) || *pszProto == 0) + break; - if (hContact) - { + if (hContact) { MTime mt; - if (mt.DBGetStamp(hContact, USERINFO, SET_CONTACT_ADDEDTIME) && strstr(pszProto, "ICQ")) - { + if (mt.DBGetStamp(hContact, USERINFO, SET_CONTACT_ADDEDTIME) && strstr(pszProto, "ICQ")) { DWORD dwStamp; dwStamp = DB::Contact::WhenAdded(db_get_dw(hContact, pszProto, "UIN", 0), pszProto); if (dwStamp > 0) - { mt.FromStampAsUTC(dwStamp); - } } - if (mt.IsValid()) - { + if (mt.IsValid()) { TCHAR szTime[MAX_PATH]; LPTSTR ptr; @@ -119,8 +108,8 @@ INT_PTR CALLBACK PSPProcOrigin(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara case PSN_ICONCHANGED: { const ICONCTRL idIcon[] = { - { ICO_COMMON_ADDRESS, STM_SETIMAGE, ICO_ADDRESS }, - { ICO_COMMON_CLOCK, STM_SETIMAGE, ICO_CLOCK }, + { ICO_COMMON_ADDRESS, STM_SETIMAGE, ICO_ADDRESS }, + { ICO_COMMON_CLOCK, STM_SETIMAGE, ICO_CLOCK }, }; IcoLib_SetCtrlIcons(hDlg, idIcon, SIZEOF(idIcon)); @@ -133,8 +122,7 @@ INT_PTR CALLBACK PSPProcOrigin(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara case WM_COMMAND: { - switch (LOWORD(wParam)) - { + switch (LOWORD(wParam)) { case EDIT_COUNTRY: if (HIWORD(wParam) == CBN_SELCHANGE) { LPIDSTRLIST pd = (LPIDSTRLIST)ComboBox_GetItemData((HWND)lParam, ComboBox_GetCurSel((HWND)lParam)); @@ -154,9 +142,7 @@ INT_PTR CALLBACK PSPProcOrigin(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara } case WM_DESTROY: - { - KillTimer(hDlg, 1); - } + KillTimer(hDlg, 1); } return PSPBaseProc(hDlg, uMsg, wParam, lParam); } -- cgit v1.2.3