summaryrefslogtreecommitdiff
path: root/src/modules/chat/chat_svc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-15 14:53:22 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-15 14:53:22 +0000
commit156c91b93ca6674da6f7021b8579b62d79403f20 (patch)
tree4275a5dfd90d901d0c01912eb3d0ded87c17993b /src/modules/chat/chat_svc.cpp
parent80d0910aafedcb860aad11995aab0dc0ca3d7585 (diff)
correct way of colors & fonts initialization
git-svn-id: http://svn.miranda-ng.org/main/trunk@7666 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/chat/chat_svc.cpp')
-rw-r--r--src/modules/chat/chat_svc.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/modules/chat/chat_svc.cpp b/src/modules/chat/chat_svc.cpp
index 44d6be8c1b..d7cf19655d 100644
--- a/src/modules/chat/chat_svc.cpp
+++ b/src/modules/chat/chat_svc.cpp
@@ -533,28 +533,6 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam)
char* mods[3] = { "Chat", "ChatFonts" };
CallService("DBEditorpp/RegisterModule", (WPARAM)mods, 2);
- RegisterFonts();
- OptionsInit();
-
- CLISTMENUITEM mi = { sizeof(mi) };
- mi.position = -2000090001;
- mi.flags = CMIF_DEFAULT;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_CHAT_JOIN);
- mi.pszName = LPGEN("&Join");
- mi.pszService = "GChat/JoinChat";
- hJoinMenuItem = Menu_AddContactMenuItem(&mi);
-
- mi.position = -2000090000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_CHAT_LEAVE);
- mi.flags = CMIF_NOTOFFLINE;
- mi.pszName = LPGEN("&Leave");
- mi.pszService = "GChat/LeaveChat";
- hLeaveMenuItem = Menu_AddContactMenuItem(&mi);
-
- HookEvent(ME_FONT_RELOAD, FontsChanged);
- HookEvent(ME_SKIN2_ICONSCHANGED, IconsChanged);
- HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileyOptionsChanged);
-
ci.SetAllOffline(TRUE, NULL);
return 0;
}
@@ -595,6 +573,28 @@ void LoadChatModule(void)
ci.hSendEvent = CreateHookableEvent(ME_GC_EVENT);
ci.hBuildMenuEvent = CreateHookableEvent(ME_GC_BUILDMENU);
+
+ RegisterFonts();
+
+ CLISTMENUITEM mi = { sizeof(mi) };
+ mi.position = -2000090001;
+ mi.flags = CMIF_DEFAULT;
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_CHAT_JOIN);
+ mi.pszName = LPGEN("&Join");
+ mi.pszService = "GChat/JoinChat";
+ hJoinMenuItem = Menu_AddContactMenuItem(&mi);
+
+ mi.position = -2000090000;
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_CHAT_LEAVE);
+ mi.flags = CMIF_NOTOFFLINE;
+ mi.pszName = LPGEN("&Leave");
+ mi.pszService = "GChat/LeaveChat";
+ hLeaveMenuItem = Menu_AddContactMenuItem(&mi);
+
+ HookEvent(ME_FONT_RELOAD, FontsChanged);
+ HookEvent(ME_SKIN2_ICONSCHANGED, IconsChanged);
+ HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileyOptionsChanged);
+
bInited = true;
}