diff options
-rw-r--r-- | otr/dllmain.cpp | 31 | ||||
-rw-r--r-- | otr/options.cpp | 2 | ||||
-rw-r--r-- | otr/otr.mdsp | 11 | ||||
-rw-r--r-- | otr/otr_private.h | 2 | ||||
-rw-r--r-- | otr/otr_private.rc | 2 | ||||
-rw-r--r-- | otr/resource.rc | 2 |
6 files changed, 22 insertions, 28 deletions
diff --git a/otr/dllmain.cpp b/otr/dllmain.cpp index 708c4ae..878688e 100644 --- a/otr/dllmain.cpp +++ b/otr/dllmain.cpp @@ -302,16 +302,13 @@ extern "C" void otr_gui_notify(void *opdata, OtrlNotifyLevel level, const char * * as a received message, or else by using the above notify()
* callback. */
extern "C" int otr_gui_display_otr_message(void *opdata, const char *accountname, const char *protocol, const char *username, const char *msg) {
- /*
- * char buff[512];
- * mir_snprintf(buff, 512, Translate("%s(%s)"), protocol, username);
- *ShowPopup(buff, msg, 0);
-
- return 0;
- */
- //return 1;
-
- ShowMessageInline((HANDLE)opdata, Translate(msg));
+ if(options.msg_inline) {
+ ShowMessageInline((HANDLE)opdata, Translate(msg));
+ } else {
+ char buff[512];
+ mir_snprintf(buff, 512, Translate("%s (%s)"), protocol, username);
+ ShowPopup(buff, msg, 0);
+ }
return 0;
}
@@ -419,7 +416,7 @@ extern "C" void otr_gui_gone_secure(void *opdata, ConnContext *context) { } else {
CloseHandle((HANDLE)_beginthreadex(0, 0, verify_fp_thread, context, 0, 0));
- mir_snprintf(buff, 1024, Translate("Beginning OTR encrypted session with '%s'"), context->username);
+ mir_snprintf(buff, 1024, Translate("Beginning OTR encrypted session with '%s' (NOT VERIFIED)"), context->username);
//MessageBox(0, buff, Translate("OTR Information"), MB_OK);
if(options.msg_inline)
ShowMessageInline((HANDLE)opdata, buff);
@@ -502,16 +499,8 @@ void CALLBACK ClearFinishedSessions(HWND, UINT, UINT, DWORD) { while(context) {
if(context->msgstate == OTRL_MSGSTATE_FINISHED) {
hContact = context->app_data;
-
- char *uproto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
- char *uname = (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, 0);
- if(uproto && uname)
- otrl_message_disconnect(otr_user_state, &ops, hContact, MODULE, uproto, uname);
-
- //otrl_context_force_finished(context);
-
- SetEncryptionStatus(hContact, false);
-
+ otrl_context_force_plaintext(context);
+ SetEncryptionStatus(hContact, false);
}
context = context->next;
}
diff --git a/otr/options.cpp b/otr/options.cpp index 4e8db52..cee195e 100644 --- a/otr/options.cpp +++ b/otr/options.cpp @@ -233,6 +233,7 @@ INT_PTR CALLBACK DlgProcOpts1(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar CheckDlgButton(hwndDlg, IDC_CHK_PREFIX, options.prefix_messages ? TRUE : FALSE);
CheckDlgButton(hwndDlg, IDC_CHK_MSGINLINE, options.msg_inline ? TRUE : FALSE);
+ CheckDlgButton(hwndDlg, IDC_CHK_TIMEFINISH, options.timeout_finished ? TRUE : FALSE);
SetDlgItemText(hwndDlg, IDC_ED_PREFIX, options.prefix);
return TRUE;
@@ -480,6 +481,7 @@ INT_PTR CALLBACK DlgProcOpts1(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar options.prefix_messages = IsDlgButtonChecked(hwndDlg, IDC_CHK_PREFIX) ? true : false;
options.msg_inline = IsDlgButtonChecked(hwndDlg, IDC_CHK_MSGINLINE) ? true : false;
+ options.timeout_finished = IsDlgButtonChecked(hwndDlg, IDC_CHK_TIMEFINISH) ? true : false;
GetDlgItemText(hwndDlg, IDC_ED_PREFIX, options.prefix, 64);
ContactPolicyMap *contact_policies = (ContactPolicyMap *)GetWindowLong(hwndDlg, GWL_USERDATA);
diff --git a/otr/otr.mdsp b/otr/otr.mdsp index 2828ed3..608a3cf 100644 --- a/otr/otr.mdsp +++ b/otr/otr.mdsp @@ -128,8 +128,11 @@ extraResourceOptions= 29=..\..\include\m_metacontacts.h
30=..\..\include\m_updater.h
[History]
-libotr\src\message.c,36257
-dllmain.cpp,17923
-options.cpp,12506
-options.h,304
+options.cpp,8387
otr_private.h,171
+options.h,256
+libotr\src\message.c,36762
+libotr\src\context.c,7959
+..\..\include\m_message.h,0
+otr_private.rc,74
+dllmain.cpp,14258
diff --git a/otr/otr_private.h b/otr/otr_private.h index bc67828..7514b42 100644 --- a/otr/otr_private.h +++ b/otr/otr_private.h @@ -5,7 +5,7 @@ #define VER_MAJOR 0
#define VER_MINOR 5
#define VER_RELEASE 3
-#define VER_BUILD 1
+#define VER_BUILD 3
#define __STRINGIZE(x) #x
#define VER_STRING __STRINGIZE( VER_MAJOR.VER_MINOR.VER_RELEASE.VER_BUILD )
diff --git a/otr/otr_private.rc b/otr/otr_private.rc index e01a35b..0a51d41 100644 --- a/otr/otr_private.rc +++ b/otr/otr_private.rc @@ -1,6 +1,6 @@ // Microsoft Visual C++ generated resource script.
//
-#include "resrc1.h"
+#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
diff --git a/otr/resource.rc b/otr/resource.rc index c52fe28..8e4ee65 100644 --- a/otr/resource.rc +++ b/otr/resource.rc @@ -53,7 +53,7 @@ BEGIN EDITTEXT IDC_ED_FINGERPRINT,127,185,152,12,ES_AUTOHSCROLL | ES_READONLY
PUSHBUTTON "New Private Key",IDC_BUT_NEWKEY,127,200,152,10,WS_DISABLED
CONTROL "Prefix:",IDC_CHK_PREFIX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,125,48,10
- CONTROL "Show start/stop inline",IDC_CHK_MSGINLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,137,110,10
+ CONTROL "Show OTR messages inline",IDC_CHK_MSGINLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,137,110,10
EDITTEXT IDC_ED_PREFIX,64,124,53,12,ES_AUTOHSCROLL
END
|