summaryrefslogtreecommitdiff
path: root/src/modules/clist/clc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-30 20:09:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-30 20:09:34 +0000
commit0edc13560169b35dc38e2923f0d240531221cd03 (patch)
treef9612a145ab9a864f188815bfb289a6e74c4431e /src/modules/clist/clc.cpp
parentcdff820aeb7d935d18fb66027102f69ec96bf92c (diff)
- contact's base proto is cached now
- settings cache structure had been changed git-svn-id: http://svn.miranda-ng.org/main/trunk@2119 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/clist/clc.cpp')
-rw-r--r--src/modules/clist/clc.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/modules/clist/clc.cpp b/src/modules/clist/clc.cpp
index dba24ad84b..71461f83e9 100644
--- a/src/modules/clist/clc.cpp
+++ b/src/modules/clist/clc.cpp
@@ -52,7 +52,7 @@ void fnClcOptionsChanged(void)
cli.pfnClcBroadcast(INTM_RELOADOPTIONS, 0, 0);
}
-HMENU fnBuildGroupPopupMenu(struct ClcGroup* group)
+HMENU fnBuildGroupPopupMenu(ClcGroup* group)
{
HMENU hMenu = LoadMenu(cli.hInst, MAKEINTRESOURCE(IDR_CONTEXT));
HMENU hGroupMenu = GetSubMenu(hMenu, 2);
@@ -69,8 +69,11 @@ HMENU fnBuildGroupPopupMenu(struct ClcGroup* group)
static int ClcSettingChanged(WPARAM wParam, LPARAM lParam)
{
+ if ((HANDLE)wParam == NULL)
+ return 0;
+
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
- if ((HANDLE)wParam != NULL && !strcmp(cws->szModule, "CList")) {
+ if ( !strcmp(cws->szModule, "CList")) {
if ( !strcmp(cws->szSetting, "MyHandle")) {
cli.pfnInvalidateDisplayNameCacheEntry((HANDLE) wParam);
cli.pfnClcBroadcast(INTM_NAMECHANGED, wParam, lParam);
@@ -90,8 +93,8 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam)
cli.pfnClcBroadcast(INTM_GROUPSCHANGED, wParam, lParam);
}
else {
- char* szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
- if (szProto != NULL && (HANDLE) wParam != NULL) {
+ char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
+ if (szProto != NULL) {
char *id = NULL;
if ( !strcmp(cws->szModule, "Protocol") && !strcmp(cws->szSetting, "p"))
cli.pfnClcBroadcast(INTM_PROTOCHANGED, wParam, lParam);