summaryrefslogtreecommitdiff
path: root/Plugins/extraicons/extraicons.cpp
diff options
context:
space:
mode:
authorpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-05-02 00:02:05 +0000
committerpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-05-02 00:02:05 +0000
commit74de73a0d9a2a40ed77ac2ee6a2714ceb7c633b0 (patch)
tree5510bb3e48a873f9a4eb4624751bdf2f91000b5f /Plugins/extraicons/extraicons.cpp
parent1460301afa7a98175e116b264d70351a62dc95b7 (diff)
extraicons: 0.2.3.0
* Fix for initial position of icons git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@173 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/extraicons/extraicons.cpp')
-rw-r--r--Plugins/extraicons/extraicons.cpp29
1 files changed, 3 insertions, 26 deletions
diff --git a/Plugins/extraicons/extraicons.cpp b/Plugins/extraicons/extraicons.cpp
index d7e8d88..cf87a3b 100644
--- a/Plugins/extraicons/extraicons.cpp
+++ b/Plugins/extraicons/extraicons.cpp
@@ -24,7 +24,7 @@
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
"Extra Icons Service",
- PLUGIN_MAKE_VERSION(0,2,1,0),
+ PLUGIN_MAKE_VERSION(0,2,3,0),
"Extra Icons Service",
"Ricardo Pescuma Domenecci",
"",
@@ -89,28 +89,6 @@ extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
return interfaces;
}
-static void IcoLib_Register(char *name, char *section, char *description, int id)
-{
- HICON hIcon = (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM) name);
- if (hIcon != NULL)
- return;
-
- SKINICONDESC sid = { 0 };
- sid.cbSize = sizeof(SKINICONDESC);
- sid.flags = SIDF_TCHAR;
- sid.pszName = name;
- sid.pszSection = section;
- sid.pszDescription = description;
-
- int cx = GetSystemMetrics(SM_CXSMICON);
- sid.hDefaultIcon = (HICON) LoadImage(hInst, MAKEINTRESOURCE(id), IMAGE_ICON, cx, cx, LR_DEFAULTCOLOR | LR_SHARED);
-
- CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
-
- if (sid.hDefaultIcon)
- DestroyIcon(sid.hDefaultIcon);
-}
-
extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
{
pluginLink = link;
@@ -283,7 +261,7 @@ static void LoadGroups(vector<ExtraIconGroup *> &groups)
continue;
mir_snprintf(setting, MAX_REGS(setting), "__group_%d", i);
- ExtraIconGroup *group = new ExtraIconGroup(setting); // TODO Remove name
+ ExtraIconGroup *group = new ExtraIconGroup(setting);
for (unsigned int j = 0; j < items; ++j)
{
@@ -395,14 +373,13 @@ int ExtraIcon_Register(WPARAM wParam, LPARAM lParam)
BaseExtraIcon *extra = GetExtraIconByName(ei->name);
if (extra != NULL)
{
- if (ei->type != extra->getType() || ei->type != EXTRAICON_TYPE_CALLBACK)
+ if (ei->type != extra->getType() || ei->type != EXTRAICON_TYPE_ICOLIB)
return 0;
// Found one, now merge it
if (stricmp(extra->getDescription(), desc))
{
- // TODO Handle group
string newDesc = extra->getDescription();
newDesc += " / ";
newDesc += desc;