diff options
author | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2009-04-30 15:54:18 +0000 |
---|---|---|
committer | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2009-04-30 15:54:18 +0000 |
commit | 9451a687c9f422b54d1cbb21f6d8648dd2036845 (patch) | |
tree | 1a5c76396fc5b7527e78636df6b0ec02138a96c1 /Plugins/extraicons/BaseExtraIcon.cpp | |
parent | 6a1cf551e14639349eda6295575cf04e9e770580 (diff) |
extraicons: 0.2.0.0
+ Allows group/ungroup of icons
+ New options dialog
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@170 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/extraicons/BaseExtraIcon.cpp')
-rw-r--r-- | Plugins/extraicons/BaseExtraIcon.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Plugins/extraicons/BaseExtraIcon.cpp b/Plugins/extraicons/BaseExtraIcon.cpp index 54a8a2b..f1aea54 100644 --- a/Plugins/extraicons/BaseExtraIcon.cpp +++ b/Plugins/extraicons/BaseExtraIcon.cpp @@ -21,7 +21,7 @@ BaseExtraIcon::BaseExtraIcon(int id, const char *name, const char *description, const char *descIcon,
MIRANDAHOOKPARAM OnClick, LPARAM param) :
- ExtraIcon(id, name), description(description), descIcon(descIcon), OnClick(OnClick), onClickParam(param)
+ ExtraIcon(name), id(id), description(description), descIcon(descIcon), OnClick(OnClick), onClickParam(param)
{
}
@@ -29,6 +29,17 @@ BaseExtraIcon::~BaseExtraIcon() {
}
+void BaseExtraIcon::setOnClick(MIRANDAHOOKPARAM OnClick, LPARAM param)
+{
+ this->OnClick = OnClick;
+ this->onClickParam = param;
+}
+
+int BaseExtraIcon::getID() const
+{
+ return id;
+}
+
const char *BaseExtraIcon::getDescription() const
{
return description.c_str();
@@ -57,3 +68,12 @@ void BaseExtraIcon::onClick(HANDLE hContact) OnClick((WPARAM) hContact, (LPARAM) ConvertToClistSlot(slot), onClickParam);
}
+int BaseExtraIcon::ClistSetExtraIcon(HANDLE hContact, HANDLE hImage)
+{
+ ExtraIcon *tmp = extraIconsByHandle[id - 1];
+ if (tmp != this)
+ return tmp->ClistSetExtraIcon(hContact, hImage);
+ else
+ return Clist_SetExtraIcon(hContact, slot, hImage);
+}
+
|