summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-08-20 04:48:12 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-08-20 04:48:12 +0000
commit286ba17e0ca8e025941c8c3d454ea5c1b83b78e3 (patch)
tree6f62c5cd9e9540f8897371bb580987db47b2b3e0
parent51eb51ae0c417a76dbbd9533639e533d63597842 (diff)
fix creating MYSPACE/srmmicon setting for any contact when window is opened
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@328 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r--MySpace/srmm_icon.cpp17
-rw-r--r--MySpace/version.h2
2 files changed, 10 insertions, 9 deletions
diff --git a/MySpace/srmm_icon.cpp b/MySpace/srmm_icon.cpp
index 4aaa78f..6283237 100644
--- a/MySpace/srmm_icon.cpp
+++ b/MySpace/srmm_icon.cpp
@@ -11,17 +11,18 @@ int WindowEvent(WPARAM wParam, LPARAM lParam) {
if(wd->uType != MSG_WINDOW_EVT_OPEN) return 0;
HANDLE hContact = wd->hContact, hSub = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
- //if(!hSub) return 0;
-
+
bool hide = false;
- if((hSub == 0 && !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)MODULE)) || (hSub != 0 && !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hSub, (LPARAM)MODULE)))
+ if((hSub == 0 && !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)MODULE)) || (hSub && !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hSub, (LPARAM)MODULE)))
hide = true;
- StatusIconData sid = {0};
- sid.cbSize = sizeof(sid);
- sid.szModule = MODULE;
- sid.flags = (hide ? MBF_HIDDEN : 0);
- CallService(MS_MSG_MODIFYICON, (WPARAM)wd->hContact, (LPARAM)&sid);
+ if(hSub || !hide) { // avoid writing db param for non-myspace and non-meta contacts
+ StatusIconData sid = {0};
+ sid.cbSize = sizeof(sid);
+ sid.szModule = MODULE;
+ sid.flags = (hide ? MBF_HIDDEN : 0);
+ CallService(MS_MSG_MODIFYICON, (WPARAM)wd->hContact, (LPARAM)&sid);
+ }
return 0;
}
diff --git a/MySpace/version.h b/MySpace/version.h
index d4ce78f..c59f4bb 100644
--- a/MySpace/version.h
+++ b/MySpace/version.h
@@ -5,7 +5,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 0
#define __RELEASE_NUM 5
-#define __BUILD_NUM 10
+#define __BUILD_NUM 11
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM