summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-10-07 17:58:53 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-10-07 17:58:53 +0000
commit5af9c1bdac753b4ab1c0ddba60bacbc07e99f6ba (patch)
treeb6daa570223a0f4518e4108e107ce8ebbfec0a82 /protocols
parent3e9466ad1af8e37db2c9e5ada218dfbdadc8ca72 (diff)
Tox: correct changing of global statuses
git-svn-id: http://svn.miranda-ng.org/main/trunk@10729 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Tox/res/resource.rc16
-rw-r--r--protocols/Tox/src/tox_proto.cpp20
2 files changed, 28 insertions, 8 deletions
diff --git a/protocols/Tox/res/resource.rc b/protocols/Tox/res/resource.rc
index b489530e70..ca334cf45d 100644
--- a/protocols/Tox/res/resource.rc
+++ b/protocols/Tox/res/resource.rc
@@ -147,17 +147,17 @@ BEGIN
EDITTEXT IDC_DNS_ID,2,13,217,14,ES_AUTOHSCROLL
END
-IDD_PASSWORD DIALOGEX 0, 0, 225, 86
+IDD_PASSWORD DIALOGEX 0, 0, 209, 75
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_APPWINDOW
CAPTION "Enter password"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- EDITTEXT IDC_PASSWORD,7,28,213,12,ES_PASSWORD | ES_AUTOHSCROLL
- CONTROL "Save password",IDC_SAVEPERMANENTLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,45,213,12
- DEFPUSHBUTTON "OK",IDOK,117,67,50,14
- PUSHBUTTON "Cancel",IDCANCEL,170,67,50,14
- LTEXT "Tox profile is encrypted. To continue, enter the password below and click OK.",IDC_STATIC,7,5,213,19
+ EDITTEXT IDC_PASSWORD,7,24,197,12,ES_PASSWORD | ES_AUTOHSCROLL
+ CONTROL "Save password",IDC_SAVEPERMANENTLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,40,197,12
+ DEFPUSHBUTTON "OK",IDOK,101,56,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,154,56,50,14
+ LTEXT "Tox profile is encrypted. Enter the password to continue.",IDC_STATIC,7,5,197,18
END
@@ -216,9 +216,9 @@ BEGIN
IDD_PASSWORD, DIALOG
BEGIN
- RIGHTMARGIN, 220
+ RIGHTMARGIN, 204
VERTGUIDE, 7
- BOTTOMMARGIN, 81
+ BOTTOMMARGIN, 70
END
END
#endif // APSTUDIO_INVOKED
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp
index 15bb2e6bc6..de3ac3f0cb 100644
--- a/protocols/Tox/src/tox_proto.cpp
+++ b/protocols/Tox/src/tox_proto.cpp
@@ -176,7 +176,27 @@ int __cdecl CToxProto::SetApparentMode(MCONTACT hContact, int mode) { return 0;
int __cdecl CToxProto::SetStatus(int iNewStatus)
{
if (iNewStatus == m_iDesiredStatus)
+ {
return 0;
+ }
+
+ switch (iNewStatus)
+ {
+ case ID_STATUS_FREECHAT:
+ case ID_STATUS_ONTHEPHONE:
+ iNewStatus = ID_STATUS_ONLINE;
+ break;
+
+ case ID_STATUS_NA:
+ case ID_STATUS_OUTTOLUNCH:
+ iNewStatus = ID_STATUS_AWAY;
+ break;
+
+ case ID_STATUS_DND:
+ case ID_STATUS_INVISIBLE:
+ iNewStatus = ID_STATUS_OCCUPIED;
+ break;
+ }
debugLogA("CToxProto::SetStatus: changing status from %i to %i", m_iStatus, iNewStatus);