diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-16 14:01:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-16 14:01:25 +0000 |
commit | a39c5799008f43603593198980f9dae818f11cc3 (patch) | |
tree | f19575afc7e6bbe81e1ae804b94e05ce1cb2f184 /plugins/Scriver/src/chat/main.cpp | |
parent | e5ea3aa43eddf6ec4bfb86e7c39e6898e21c6490 (diff) |
- StdChat specific icons management moved back to StdChat;
- fix for chat custom menus;
git-svn-id: http://svn.miranda-ng.org/main/trunk@7680 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src/chat/main.cpp')
-rw-r--r-- | plugins/Scriver/src/chat/main.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/plugins/Scriver/src/chat/main.cpp b/plugins/Scriver/src/chat/main.cpp index 6c26bc6fd4..5a2cb0854c 100644 --- a/plugins/Scriver/src/chat/main.cpp +++ b/plugins/Scriver/src/chat/main.cpp @@ -29,6 +29,24 @@ HMENU g_hMenu = NULL; GlobalLogSettings g_Settings;
+void LoadModuleIcons(MODULEINFO *mi)
+{
+ HIMAGELIST hList = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 0, 0);
+
+ int overlayIcon = ImageList_AddIcon(hList, GetCachedIcon("chat_overlay"));
+ ImageList_SetOverlayImage(hList, overlayIcon, 1);
+
+ int index = ImageList_AddIcon(hList, LoadSkinnedProtoIcon(mi->pszModule, ID_STATUS_ONLINE));
+ mi->hOnlineIcon = ImageList_GetIcon(hList, index, ILD_TRANSPARENT);
+ mi->hOnlineTalkIcon = ImageList_GetIcon(hList, index, ILD_TRANSPARENT | INDEXTOOVERLAYMASK(1));
+
+ index = ImageList_AddIcon(hList, LoadSkinnedProtoIcon(mi->pszModule, ID_STATUS_OFFLINE));
+ mi->hOfflineIcon = ImageList_GetIcon(hList, index, ILD_TRANSPARENT);
+ mi->hOfflineTalkIcon = ImageList_GetIcon(hList, index, ILD_TRANSPARENT | INDEXTOOVERLAYMASK(1));
+
+ ImageList_Destroy(hList);
+}
+
static void OnAddLog(SESSION_INFO *si, int isOk)
{
if (isOk && si->hWnd)
@@ -93,11 +111,19 @@ static void OnFlashWindow(SESSION_INFO *si, int bInactive) SendMessage(si->hWnd, GC_SETMESSAGEHIGHLIGHT, 0, 0);
}
+static void OnCreateModule(MODULEINFO *mi)
+{
+ LoadModuleIcons(mi);
+ mi->hOnlineIconBig = LoadSkinnedProtoIconBig(mi->pszModule, ID_STATUS_ONLINE);
+ mi->hOfflineIconBig = LoadSkinnedProtoIconBig(mi->pszModule, ID_STATUS_OFFLINE);
+}
+
int Chat_Load()
{
mir_getCI(&g_Settings);
pci->cbModuleInfo = sizeof(MODULEINFO);
pci->cbSession = sizeof(SESSION_INFO);
+ pci->OnCreateModule = OnCreateModule;
pci->OnNewUser = OnNewUser;
pci->OnSetStatus = OnSetStatus;
|