diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-03-11 19:16:04 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-03-11 19:16:04 +0000 |
commit | 4b94525fe5eeac649bbe9cc4dcc3cbf7c84d226c (patch) | |
tree | 5cbd8b863169cde063612f3e92ab75d66cd2af41 /src/core/stduserinfo | |
parent | 723f01f7e8e056689d0d1a2a4b21bb1dace8cdbb (diff) |
stduserinfo: add display for MaritalStatus (BYTE)
git-svn-id: http://svn.miranda-ng.org/main/trunk@16465 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/stduserinfo')
-rw-r--r-- | src/core/stduserinfo/src/stdinfo.cpp | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/src/core/stduserinfo/src/stdinfo.cpp b/src/core/stduserinfo/src/stdinfo.cpp index 699c6a1b06..049d1eb49f 100644 --- a/src/core/stduserinfo/src/stdinfo.cpp +++ b/src/core/stduserinfo/src/stdinfo.cpp @@ -34,6 +34,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP #define SVS_MONTH 5
#define SVS_SIGNED 6
#define SVS_TIMEZONE 7
+#define SVS_MARTITAL 8
static int Proto_GetContactInfoSetting(MCONTACT hContact, const char *szProto, const char *szModule, const char *szSetting, DBVARIANT *dbv, const int nType)
{
@@ -96,6 +97,45 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule mir_snprintf(str, dbv.cVal ? "UTC%+d:%02d" : "UTC", -dbv.cVal / 2, (dbv.cVal & 1) * 30);
}
}
+ else if (special == SVS_MARTITAL) {
+ switch (dbv.cVal) {
+ case 0:
+ ptstr = TranslateT("<not specified>");
+ break;
+ case 10:
+ ptstr = TranslateT("single");
+ break;
+ case 11:
+ ptstr = TranslateT("close relationships");
+ break;
+ case 12:
+ ptstr = TranslateT("engaged");
+ break;
+ case 20:
+ ptstr = TranslateT("married");
+ break;
+ case 30:
+ ptstr = TranslateT("divorced");
+ break;
+ case 31:
+ ptstr = TranslateT("separated");
+ break;
+ case 40:
+ ptstr = TranslateT("Widowed");
+ break;
+ case 50:
+ ptstr = TranslateT("actively searching");
+ break;
+ case 60:
+ ptstr = TranslateT("in love");
+ break;
+ case 70:
+ ptstr = TranslateT("it\'s complicated");
+ break;
+ default:
+ unspecified = 1;
+ }
+ }
else {
unspecified = (special == SVS_ZEROISUNSPEC && dbv.bVal == 0);
pstr = _itoa(special == SVS_SIGNED ? dbv.cVal : dbv.bVal, str, 10);
@@ -199,7 +239,7 @@ static INT_PTR CALLBACK SummaryDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP SetValue(hwndDlg, IDC_DOBDAY, hContact, szProto, "BirthDay", 0);
SetValue(hwndDlg, IDC_DOBMONTH, hContact, szProto, "BirthMonth", SVS_MONTH);
SetValue(hwndDlg, IDC_DOBYEAR, hContact, szProto, "BirthYear", 0);
- SetValue(hwndDlg, IDC_MARITAL, hContact, szProto, "MaritalStatus", 0);
+ SetValue(hwndDlg, IDC_MARITAL, hContact, szProto, "MaritalStatus", SVS_MARTITAL);
}
}
break;
|