summaryrefslogtreecommitdiff
path: root/src/core/stdchat
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-17 15:14:41 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-17 15:14:41 +0000
commit81cc0996f38dca205fe283e24d64df6e9cea7c10 (patch)
tree4c09ebfb8966e30ee84b2f1d8e4f84d5795fb8e0 /src/core/stdchat
parentd7d4fc4e61b3b0271a4dac9d04283f5237ed514e (diff)
- icons management also moved to core;
- forced ReloadSettings() after initialization git-svn-id: http://svn.miranda-ng.org/main/trunk@7690 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/stdchat')
-rw-r--r--src/core/stdchat/src/chat.h1
-rw-r--r--src/core/stdchat/src/main.cpp36
2 files changed, 4 insertions, 33 deletions
diff --git a/src/core/stdchat/src/chat.h b/src/core/stdchat/src/chat.h
index c8433da7ef..f7f8a5ef09 100644
--- a/src/core/stdchat/src/chat.h
+++ b/src/core/stdchat/src/chat.h
@@ -143,7 +143,6 @@ struct COLORCHOOSER
//main.c
void LoadIcons(void);
-void LoadLogIcons(void);
//colorchooser.c
INT_PTR CALLBACK DlgProcColorToolWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
diff --git a/src/core/stdchat/src/main.cpp b/src/core/stdchat/src/main.cpp
index 95fd00ef68..9d70355fd8 100644
--- a/src/core/stdchat/src/main.cpp
+++ b/src/core/stdchat/src/main.cpp
@@ -261,7 +261,9 @@ extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
mir_getCLI();
-
+
+ AddIcons();
+
CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENT("Chat module") };
mir_getCI(&data);
pci->OnAddUser = OnAddUser;
@@ -286,13 +288,11 @@ extern "C" __declspec(dllexport) int Load(void)
pci->OnSetStatusBar = OnSetStatusBar;
pci->OnFlashWindow = OnFlashWindow;
pci->ShowRoom = ShowRoom;
+ pci->ReloadSettings();
g_hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_MENU));
- AddIcons();
LoadIcons();
- OnLoadSettings();
-
HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
return 0;
@@ -311,36 +311,8 @@ extern "C" __declspec(dllexport) int Unload(void)
return 0;
}
-void LoadLogIcons(void)
-{
- pci->hIcons[ICON_ACTION] = LoadIconEx("log_action", FALSE);
- pci->hIcons[ICON_ADDSTATUS] = LoadIconEx("log_addstatus", FALSE);
- pci->hIcons[ICON_HIGHLIGHT] = LoadIconEx("log_highlight", FALSE);
- pci->hIcons[ICON_INFO] = LoadIconEx("log_info", FALSE);
- pci->hIcons[ICON_JOIN] = LoadIconEx("log_join", FALSE);
- pci->hIcons[ICON_KICK] = LoadIconEx("log_kick", FALSE);
- pci->hIcons[ICON_MESSAGE] = LoadIconEx("log_message_in", FALSE);
- pci->hIcons[ICON_MESSAGEOUT] = LoadIconEx("log_message_out", FALSE);
- pci->hIcons[ICON_NICK] = LoadIconEx("log_nick", FALSE);
- pci->hIcons[ICON_NOTICE] = LoadIconEx("log_notice", FALSE);
- pci->hIcons[ICON_PART] = LoadIconEx("log_part", FALSE);
- pci->hIcons[ICON_QUIT] = LoadIconEx("log_quit", FALSE);
- pci->hIcons[ICON_REMSTATUS] = LoadIconEx("log_removestatus", FALSE);
- pci->hIcons[ICON_TOPIC] = LoadIconEx("log_topic", FALSE);
- pci->hIcons[ICON_STATUS1] = LoadIconEx("status1", FALSE);
- pci->hIcons[ICON_STATUS2] = LoadIconEx("status2", FALSE);
- pci->hIcons[ICON_STATUS3] = LoadIconEx("status3", FALSE);
- pci->hIcons[ICON_STATUS4] = LoadIconEx("status4", FALSE);
- pci->hIcons[ICON_STATUS0] = LoadIconEx("status0", FALSE);
- pci->hIcons[ICON_STATUS5] = LoadIconEx("status5", FALSE);
-}
-
void LoadIcons(void)
{
- memset(pci->hIcons, 0, sizeof(pci->hIcons));
-
- LoadLogIcons();
-
hIconsList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 0, 100);
ImageList_AddIcon(hIconsList, LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
ImageList_AddIcon(hIconsList, LoadIconEx("overlay", FALSE));