summaryrefslogtreecommitdiff
path: root/src/core/stduserinfo/src/stdinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/stduserinfo/src/stdinfo.cpp')
-rw-r--r--src/core/stduserinfo/src/stdinfo.cpp42
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;