summaryrefslogtreecommitdiff
path: root/tools/_deprecated/Yahoo/src/icolib.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-10-11 21:05:12 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-10-11 21:05:12 +0300
commitb0f3e30460fc26ef4fe59bc161b0fddd8eeb9a08 (patch)
treecbf0676fc37229beb184b1858efd0147c7e0935d /tools/_deprecated/Yahoo/src/icolib.cpp
parentf07689fbf39405ef5a3e3dafb340c9c8f74897f6 (diff)
Yahoo & YahooGroups plugins moved to _deprecated
Diffstat (limited to 'tools/_deprecated/Yahoo/src/icolib.cpp')
-rw-r--r--tools/_deprecated/Yahoo/src/icolib.cpp57
1 files changed, 57 insertions, 0 deletions
diff --git a/tools/_deprecated/Yahoo/src/icolib.cpp b/tools/_deprecated/Yahoo/src/icolib.cpp
new file mode 100644
index 0000000000..886ad3578a
--- /dev/null
+++ b/tools/_deprecated/Yahoo/src/icolib.cpp
@@ -0,0 +1,57 @@
+/*
+ * $Id: util.c 3936 2006-10-02 06:58:19Z ghazan $
+ *
+ * myYahoo Miranda Plugin
+ *
+ * Authors: Gennady Feldman (aka Gena01)
+ * Laurent Marechal (aka Peorth)
+ *
+ * This code is under GPL and is based on AIM, MSN and Miranda source code.
+ * I want to thank Robert Rainwater and George Hazan for their code and support
+ * and for answering some of my questions during development of this plugin.
+ */
+#include "stdafx.h"
+#include <m_langpack.h>
+#include <win2k.h>
+#include "m_icolib.h"
+
+#include "resource.h"
+
+static IconItem iconList[] =
+{
+ { LPGEN("Main"), "yahoo", IDI_YAHOO },
+ { LPGEN("Mail"), "mail", IDI_INBOX },
+ { LPGEN("Profile"), "profile", IDI_PROFILE },
+ { LPGEN("Refresh"), "refresh", IDI_REFRESH },
+ { LPGEN("Address Book"), "yab", IDI_YAB },
+ { LPGEN("Set Status"), "set_status", IDI_SET_STATUS },
+ { LPGEN("Calendar"), "calendar", IDI_CALENDAR }
+};
+
+void IconsInit(void)
+{
+ Icon_Register(hInstance, "Protocols/YAHOO", iconList, _countof(iconList), "YAHOO");
+}
+
+HICON LoadIconEx(const char* name, bool big)
+{
+ char szSettingName[100];
+ mir_snprintf(szSettingName, "YAHOO_%s", name);
+ return IcoLib_GetIcon(szSettingName, big);
+}
+
+HANDLE GetIconHandle(int iconId)
+{
+ for (unsigned i = 0; i < _countof(iconList); i++)
+ if (iconList[i].defIconID == iconId)
+ return iconList[i].hIcolib;
+
+ return NULL;
+}
+
+void ReleaseIconEx(const char* name, bool big)
+{
+ char szSettingName[100];
+ mir_snprintf(szSettingName, "YAHOO_%s", name);
+ IcoLib_Release(szSettingName, big);
+}