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/ExtraIcon.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/ExtraIcon.cpp')
-rw-r--r-- | Plugins/extraicons/ExtraIcon.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/Plugins/extraicons/ExtraIcon.cpp b/Plugins/extraicons/ExtraIcon.cpp index 696613b..52047a5 100644 --- a/Plugins/extraicons/ExtraIcon.cpp +++ b/Plugins/extraicons/ExtraIcon.cpp @@ -19,8 +19,8 @@ #include "commons.h"
-ExtraIcon::ExtraIcon(int id, const char *name) :
- id(id), name(name), slot(-1), position(1000)
+ExtraIcon::ExtraIcon(const char *name) :
+ name(name), slot(-1), position(1000)
{
}
@@ -53,11 +53,6 @@ void ExtraIcon::setPosition(int position) this->position = position;
}
-int ExtraIcon::getID() const
-{
- return id;
-}
-
bool ExtraIcon::isEnabled() const
{
return slot >= 0;
@@ -85,7 +80,14 @@ int ExtraIcon::compare(const ExtraIcon *other) const int ret = getPosition() - other->getPosition();
if (ret != 0)
return ret;
- return getID() - other->getID();
+
+ int id = 0;
+ if (getType() != EXTRAICON_TYPE_GROUP)
+ id = ((BaseExtraIcon*) this)->getID();
+ int otherId = 0;
+ if (other->getType() != EXTRAICON_TYPE_GROUP)
+ otherId = ((BaseExtraIcon*) other)->getID();
+ return id - otherId;
}
bool ExtraIcon::operator==(const ExtraIcon & other) const
@@ -123,9 +125,3 @@ bool ExtraIcon::operator>=(const ExtraIcon & other) const int c = compare(&other);
return c >= 0;
}
-
-int ExtraIcon::ClistSetExtraIcon(HANDLE hContact, int slot, HANDLE hImage)
-{
- return Clist_SetExtraIcon(hContact, slot, hImage);
-}
-
|