diff options
author | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2009-04-23 04:31:27 +0000 |
---|---|---|
committer | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2009-04-23 04:31:27 +0000 |
commit | 3892d0da37e70a6c0106e57dad835e9a67933b02 (patch) | |
tree | 4ae8600d4eb5acce08a42b68d1d218c4e47153cc /Plugins/extraicons/CallbackExtraIcon.cpp | |
parent | d27127d44576580e3a0000590b6179f06cc67b8e (diff) |
extraicons: start of group code
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@168 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/extraicons/CallbackExtraIcon.cpp')
-rw-r--r-- | Plugins/extraicons/CallbackExtraIcon.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/Plugins/extraicons/CallbackExtraIcon.cpp b/Plugins/extraicons/CallbackExtraIcon.cpp index 4ea8574..b80675d 100644 --- a/Plugins/extraicons/CallbackExtraIcon.cpp +++ b/Plugins/extraicons/CallbackExtraIcon.cpp @@ -21,7 +21,7 @@ CallbackExtraIcon::CallbackExtraIcon(int id, const char *name, const char *description, const char *descIcon,
MIRANDAHOOK RebuildIcons, MIRANDAHOOK ApplyIcon, MIRANDAHOOKPARAM OnClick, LPARAM param) :
- ExtraIcon(id, name, description, descIcon, OnClick, param), RebuildIcons(RebuildIcons), ApplyIcon(ApplyIcon),
+ BaseExtraIcon(id, name, description, descIcon, OnClick, param), RebuildIcons(RebuildIcons), ApplyIcon(ApplyIcon),
needToRebuild(true)
{
}
@@ -35,11 +35,6 @@ int CallbackExtraIcon::getType() const return EXTRAICON_TYPE_CALLBACK;
}
-bool CallbackExtraIcon::needToRebuildIcons()
-{
- return needToRebuild;
-}
-
void CallbackExtraIcon::rebuildIcons()
{
if (!isEnabled())
@@ -57,13 +52,21 @@ void CallbackExtraIcon::applyIcon(HANDLE hContact) if (!isEnabled() || hContact == NULL)
return;
+ if (needToRebuild)
+ rebuildIcons();
+
ApplyIcon((WPARAM) hContact, 0);
}
-int CallbackExtraIcon::setIcon(HANDLE hContact, void *icon)
+int CallbackExtraIcon::setIcon(int id, HANDLE hContact, void *icon)
{
- if (!isEnabled() || hContact == NULL)
+ if (!isEnabled() || hContact == NULL || id != this->id)
return -1;
- return Clist_SetExtraIcon(hContact, slot, (HANDLE) icon);
+ return ClistSetExtraIcon(hContact, slot, (HANDLE) icon);
}
+
+void CallbackExtraIcon::storeIcon(HANDLE hContact, void *icon)
+{
+}
+
|