summaryrefslogtreecommitdiff
path: root/MirOTR
diff options
context:
space:
mode:
authorNvinside@gmail.com <Nvinside@gmail.com@eced67a3-f377-a0ae-92ae-d6de1850b05a>2012-01-20 23:34:32 +0000
committerNvinside@gmail.com <Nvinside@gmail.com@eced67a3-f377-a0ae-92ae-d6de1850b05a>2012-01-20 23:34:32 +0000
commitb707b16e92d272440c49e2e6f4891882be558854 (patch)
tree063e81f36f6a5d11124419061aa8d896ab171e51 /MirOTR
parent7deb21a37c0f6ba6339ec0f8b7fb83fa397faf58 (diff)
- crashfix in options HEADtrunkmaster
- timeout and messeges synced - project changes - some other fixes git-svn-id: http://mirotr.googlecode.com/svn/trunk@63 eced67a3-f377-a0ae-92ae-d6de1850b05a
Diffstat (limited to 'MirOTR')
-rw-r--r--MirOTR/MirOTR.vcxproj5
-rw-r--r--MirOTR/dbfilter.cpp26
-rw-r--r--MirOTR/dllmain.cpp2
-rw-r--r--MirOTR/mirotrmenu.cpp4
-rw-r--r--MirOTR/options.cpp11
-rw-r--r--MirOTR/otr.cpp6
-rw-r--r--MirOTR/stdafx.h6
-rw-r--r--MirOTR/svcs_menu.cpp10
-rw-r--r--MirOTR/svcs_srmm.cpp52
-rw-r--r--MirOTR/version.h4
10 files changed, 74 insertions, 52 deletions
diff --git a/MirOTR/MirOTR.vcxproj b/MirOTR/MirOTR.vcxproj
index 2c20a3f..83a62d2 100644
--- a/MirOTR/MirOTR.vcxproj
+++ b/MirOTR/MirOTR.vcxproj
@@ -140,7 +140,7 @@
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>$(SolutionDir)\miranda\ExternalAPI;C:\Users\CHEF-KOCH\Desktop\Miranda IM Trunk\miranda\include;$(SolutionDir)\libotr-3.2.0\src;$(SolutionDir)\libgcrypt-1.4.6\src;$(SolutionDir)\libgpg-error-1.9\src;$(SolutionDir)\ekhtml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(SolutionDir)\miranda\ExternalAPI;$(SolutionDir)\miranda\include;$(SolutionDir)\libotr-3.2.0\src;$(SolutionDir)\libgcrypt-1.4.6\src;$(SolutionDir)\libgpg-error-1.9\src;$(SolutionDir)\ekhtml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MIROTR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -155,7 +155,8 @@
<FloatingPointModel>Fast</FloatingPointModel>
<FloatingPointExceptions>false</FloatingPointExceptions>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
- <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <ExceptionHandling>Sync</ExceptionHandling>
</ClCompile>
<Link>
<AdditionalDependencies>libgcrypt.lib;libotr.lib;Comctl32.lib;EkHtml.lib;kernel32.lib;user32.lib;gdi32.lib;Advapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
diff --git a/MirOTR/dbfilter.cpp b/MirOTR/dbfilter.cpp
index dad975f..bfc2f80 100644
--- a/MirOTR/dbfilter.cpp
+++ b/MirOTR/dbfilter.cpp
@@ -240,6 +240,32 @@ void FinishSession(HANDLE hContact) {
return;
}
+int WindowEvent(WPARAM wParam, LPARAM lParam) {
+ MessageWindowEventData *mwd = (MessageWindowEventData *)lParam;
+
+ if(mwd->uType == MSG_WINDOW_EVT_CLOSE && options.end_window_close) {
+ FinishSession(mwd->hContact);
+ return 0;
+ }
+
+ if(mwd->uType != MSG_WINDOW_EVT_OPEN) return 0;
+ if(!options.bHaveSRMMIcons) return 0;
+
+ HANDLE hContact = mwd->hContact, hTemp;
+ if(options.bHaveMetaContacts && (hTemp = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ hContact = hTemp;
+
+ if(!CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)MODULENAME))
+ return 0;
+
+ lib_cs_lock();
+ ConnContext *context = otrl_context_find_miranda(otr_user_state, hContact);
+ lib_cs_unlock();
+
+ SetEncryptionStatus(hContact, otr_context_get_trust(context));
+
+ return 0;
+}
// if it's a protocol going offline, attempt to send terminate session to all contacts of that protocol
// (this would be hooked as the ME_CLIST_STATUSMODECHANGE handler except that event is sent *after* the proto goes offline)
diff --git a/MirOTR/dllmain.cpp b/MirOTR/dllmain.cpp
index 156ae3a..58c7ff7 100644
--- a/MirOTR/dllmain.cpp
+++ b/MirOTR/dllmain.cpp
@@ -174,7 +174,7 @@ DLLFUNC int Load(PLUGINLINK *link)
while ( hContact != NULL ) {
proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
- // do not add filter to chatoom
+ // do not add filter to a chatoom
if ( !(proto && DBGetContactSettingByte(hContact, proto, "ChatRoom", 0)) )
CallService( MS_PROTO_ADDTOCONTACT, ( WPARAM )hContact, ( LPARAM )MODULENAME );
diff --git a/MirOTR/mirotrmenu.cpp b/MirOTR/mirotrmenu.cpp
index 03b7930..e66ad10 100644
--- a/MirOTR/mirotrmenu.cpp
+++ b/MirOTR/mirotrmenu.cpp
@@ -13,9 +13,9 @@ typedef struct
}
MirOTRMenuExecParam,*lpMirOTRMenuExecParam;
-/////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////
// MirOTR MENU
-
+///////////////////////////////////////////
static INT_PTR RemoveMirOTRMenuItem(WPARAM wParam, LPARAM)
{
CallService(MO_REMOVEMENUITEM,wParam,0);
diff --git a/MirOTR/options.cpp b/MirOTR/options.cpp
index 86781f1..c2bb09c 100644
--- a/MirOTR/options.cpp
+++ b/MirOTR/options.cpp
@@ -409,16 +409,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsProto(HWND hwndDlg, UINT msg, WPARAM wP
temp = mir_a2t(fprint);
ListView_SetItemText(lv, ilvItem, 2, temp);
mir_free(temp);
- }
- /*} else { //using ASCII
- item.pszText = (TCHAR*)pppDesc[i]->szName;
- ilvItem = ListView_InsertItem(lv, &item);
- if(otrl_privkey_fingerprint(otr_user_state, fprint, pppDesc[i]->szName, pppDesc[i]->szName)) {
- ListView_SetItemText(lv, ilvItem, 2, (TCHAR*)fprint);
- }
- }*/
-
-
+ }
}
}
}
diff --git a/MirOTR/otr.cpp b/MirOTR/otr.cpp
index 76009ac..c094314 100644
--- a/MirOTR/otr.cpp
+++ b/MirOTR/otr.cpp
@@ -269,8 +269,8 @@ extern "C" {
mir_sntprintf(buff, 512, TranslateT(LANG_SESSION_TERMINATED_BY_OTR), contact_get_nameT((HANDLE)opdata));
//MessageBox(0, buff, Translate("OTR Information"), MB_OK);
if(!Miranda_Terminated()) {
- ShowMessage((HANDLE)opdata, buff);
- }
+ ShowMessage((HANDLE)opdata, buff);
+ }
// opdata is hContact
SetEncryptionStatus((HANDLE)opdata, otr_context_get_trust(context));
@@ -386,7 +386,7 @@ gcry_error_t otrl_privkey_write_FILEp(OtrlUserState us, FILE *privf);
if (!privf) return gcry_error(GPG_ERR_NO_ERROR);
-
+
/* Output the other keys we know */
fprintf(privf, "(privkeys\n");
diff --git a/MirOTR/stdafx.h b/MirOTR/stdafx.h
index f4ad6e2..ea4dbe4 100644
--- a/MirOTR/stdafx.h
+++ b/MirOTR/stdafx.h
@@ -23,7 +23,7 @@
#define DEBUGOUT(x)
#define DEBUGOUT_T(x)
#endif
-#define MIRANDA_VER 0x0800
+#define MIRANDA_VER 0x0900
#define MIRANDA_CUSTOM_LP
//include
@@ -38,9 +38,11 @@
#include <m_protomod.h>
#include <m_protosvc.h>
#include <m_popup.h>
-#include <m_contacts.h>
+#include <m_contacts.h>
+#include <m_ignore.h>
#include <m_utils.h>
#include <m_icolib.h>
+#include <m_skin.h>
//ExternalAPI
#include <m_folders.h>
diff --git a/MirOTR/svcs_menu.cpp b/MirOTR/svcs_menu.cpp
index 3b3eefe..83ef6cd 100644
--- a/MirOTR/svcs_menu.cpp
+++ b/MirOTR/svcs_menu.cpp
@@ -4,8 +4,8 @@
HANDLE hMenuBuildEvent, hStopItem, hStartItem;
////////////////////////////////
-///////// Menu Services
-///////////////////////
+///////// Menu Services ////////
+///////////////////////////////
int StartOTR(HANDLE hContact) {
const char *proto = contact_get_proto(hContact);
@@ -16,10 +16,10 @@ int StartOTR(HANDLE hContact) {
if(pol == CONTACT_DEFAULT_POLICY) pol = options.default_policy;
lib_cs_lock();
- char *msg = otrl_proto_default_query_msg(MODULENAME, pol);
- otr_gui_inject_message(hContact, proto, proto, uname, msg ? msg : "?OTRv2?");
+ char *msg = otrl_proto_default_query_msg(MODULENAME, pol);
+ otr_gui_inject_message(hContact, proto, proto, uname, msg ? msg : "?OTRv2?");
lib_cs_unlock();
- otrl_message_free(msg);
+ otrl_message_free(msg);
mir_free(uname);
return 0;
}
diff --git a/MirOTR/svcs_srmm.cpp b/MirOTR/svcs_srmm.cpp
index b8b8a87..e37ee9d 100644
--- a/MirOTR/svcs_srmm.cpp
+++ b/MirOTR/svcs_srmm.cpp
@@ -4,31 +4,33 @@ HANDLE hEventIconPressed;
HICON hIconNotSecure, hIconFinished, hIconPrivate, hIconUnverified;
BBButton OTRButton;
-int WindowEvent(WPARAM wParam, LPARAM lParam) {
- MessageWindowEventData *mwd = (MessageWindowEventData *)lParam;
-
- if(mwd->uType == MSG_WINDOW_EVT_CLOSE && options.end_window_close) {
- // FinishSession(mwd->hContact);
- return 0;
- }
- if(mwd->uType != MSG_WINDOW_EVT_OPEN) return 0;
- if(!options.bHaveSRMMIcons) return 0;
-
- HANDLE hContact = mwd->hContact, hTemp;
- if(options.bHaveMetaContacts && (hTemp = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
- hContact = hTemp;
-
- if(!CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)MODULENAME))
- return 0;
-
- lib_cs_lock();
- ConnContext *context = otrl_context_find_miranda(otr_user_state, hContact);
- lib_cs_unlock();
-
- SetEncryptionStatus(hContact, otr_context_get_trust(context));
-
- return 0;
-}
+/* Plugin init and deinit */
+// int WindowEvent(WPARAM wParam, LPARAM lParam) {
+// MessageWindowEventData *mwd = (MessageWindowEventData *)lParam;
+//
+// if(mwd->uType == MSG_WINDOW_EVT_CLOSE && options.end_window_close) {
+// FinishSession(mwd->hContact);
+// return 0;
+// }
+//
+// if(mwd->uType != MSG_WINDOW_EVT_OPEN) return 0;
+// if(!options.bHaveSRMMIcons) return 0;
+//
+// HANDLE hContact = mwd->hContact, hTemp;
+// if(options.bHaveMetaContacts && (hTemp = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+// hContact = hTemp;
+//
+// if(!CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)MODULENAME))
+// return 0;
+//
+// lib_cs_lock();
+// ConnContext *context = otrl_context_find_miranda(otr_user_state, hContact);
+// lib_cs_unlock();
+//
+// SetEncryptionStatus(hContact, otr_context_get_trust(context));
+//
+// return 0;
+// }
int SVC_IconPressed(WPARAM wParam, LPARAM lParam) {
HANDLE hContact = (HANDLE)wParam;
diff --git a/MirOTR/version.h b/MirOTR/version.h
index 2c9a6c5..8596f3d 100644
--- a/MirOTR/version.h
+++ b/MirOTR/version.h
@@ -5,10 +5,10 @@
#define VER_MAJOR 0
#define VER_MINOR 11
#define VER_RELEASE 0
-#define VER_BUILD 3
+#define VER_BUILD 4
#define __STRINGIZE(x) #x
-#define VER_STRING "0.11.0.3"
+#define VER_STRING "0.11.0.4"
#ifdef _UNICODE
#define SHORT_NAME_STRING "Miranda OTR"