summaryrefslogtreecommitdiff
path: root/plugins/ListeningTo
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-08-12 20:36:33 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-08-12 20:36:33 +0000
commit5d55c351109d18bb46b97c7e6142f6f321595849 (patch)
treee0423a19189dadc6ca8b5b72dd881aa97a2c1ea7 /plugins/ListeningTo
parent2e2390295cbf3f8f24a938bf957d3ecd5b86d3a6 (diff)
icons registration moved to Load()
git-svn-id: http://svn.miranda-ng.org/main/trunk@10173 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ListeningTo')
-rw-r--r--plugins/ListeningTo/src/listeningto.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp
index 7b9253b3ab..7dcceb47b1 100644
--- a/plugins/ListeningTo/src/listeningto.cpp
+++ b/plugins/ListeningTo/src/listeningto.cpp
@@ -103,6 +103,12 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
return &pluginInfo;
}
+static IconItem iconList[] =
+{
+ { LPGEN("Listening to (enabled)"), "listening_to_icon", IDI_LISTENINGTO },
+ { LPGEN("Listening to (disabled)"), "listening_off_icon", IDI_LISTENINGOFF },
+};
+
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
@@ -133,6 +139,9 @@ extern "C" int __declspec(dllexport) Load(void)
InitMusic();
InitOptions();
+ // icons
+ Icon_Register(hInst, LPGEN("ListeningTo"), iconList, SIZEOF(iconList));
+
// Extra icon support
hExtraIcon = ExtraIcon_Register(MODULE_NAME "_icon", LPGEN("Listening to music"), "listening_to_icon");
@@ -271,19 +280,10 @@ int AccListChanged(WPARAM wParam, LPARAM lParam)
// Called when all the modules are loaded
-static IconItem iconList[] =
-{
- { LPGEN("Listening to (enabled)"), "listening_to_icon", IDI_LISTENINGTO },
- { LPGEN("Listening to (disabled)"), "listening_off_icon", IDI_LISTENINGOFF },
-};
-
int ModulesLoaded(WPARAM, LPARAM)
{
EnableDisablePlayers();
- // icons
- Icon_Register(hInst, LPGEN("ListeningTo"), iconList, SIZEOF(iconList));
-
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
if (proto != NULL) {