diff options
-rw-r--r-- | metacontacts/meta_services.c | 7 | ||||
-rw-r--r-- | metacontacts/version.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/metacontacts/meta_services.c b/metacontacts/meta_services.c index 0b7a15f..d051937 100644 --- a/metacontacts/meta_services.c +++ b/metacontacts/meta_services.c @@ -67,6 +67,7 @@ char proto_names[MAX_PROTOCOLS * 128]; HANDLE hProtoIcons[MAX_PROTOCOLS * 2]; // online and offline icons
UINT_PTR setStatusTimerId = 0;
+BOOL firstSetOnline = TRUE; // see Meta_SetStatus function
/** Get the capabilities of the "MetaContacts" protocol.
*
@@ -167,7 +168,7 @@ void CALLBACK SetStatusThread(HWND hWnd, UINT msg, UINT_PTR id, DWORD dw) //Sleep(options.set_status_from_offline_delay);
- mcStatus = (int)ID_STATUS_OFFLINE;
+ mcStatus = (int)ID_STATUS_ONLINE;
ProtoBroadcastAck(META_PROTO,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS, (HANDLE)previousMode, mcStatus);
//return 0;
@@ -180,10 +181,12 @@ void CALLBACK SetStatusThread(HWND hWnd, UINT msg, UINT_PTR id, DWORD dw) */
int Meta_SetStatus(WPARAM wParam,LPARAM lParam)
{
- if(mcStatus == ID_STATUS_OFFLINE) {
+ // firstSetOnline starts out true - used to delay metacontact's 'onlineness' to prevent double status notifications on startup
+ if(mcStatus == ID_STATUS_OFFLINE && firstSetOnline) {
// causes crash on exit if miranda is closed in under options.set_status_from_offline milliseconds!
//CloseHandle( CreateThread( NULL, 0, SetStatusThread, (void *)wParam, 0, 0 ));
setStatusTimerId = SetTimer(0, 0, options.set_status_from_offline_delay, SetStatusThread);
+ firstSetOnline = FALSE;
} else {
previousMode = mcStatus;
mcStatus = (int)wParam;
diff --git a/metacontacts/version.h b/metacontacts/version.h index e68a2ca..bc63713 100644 --- a/metacontacts/version.h +++ b/metacontacts/version.h @@ -5,7 +5,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 12
#define __RELEASE_NUM 2
-#define __BUILD_NUM 3
+#define __BUILD_NUM 4
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
|