summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-03-13 17:50:26 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-03-13 17:50:26 +0300
commit6a53de3a1f093a92126c0a86ec5f7ad52e3caf15 (patch)
tree1ad2a8af28b31966d67da9cea875e7a7c2b9025e /plugins
parentb10f9d1556172e721e5a0c345f67f4827408a6db (diff)
Group chats API:
- for #2574: fixes icons problem after unloading tabSRMM; - status icons extracted to the separate array; - another group chat icons are hidden completely to restrict access to them
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Scriver/res/chat/1.icobin502 -> 0 bytes
-rw-r--r--plugins/Scriver/res/chat/2.icobin502 -> 0 bytes
-rw-r--r--plugins/Scriver/res/chat/3.icobin502 -> 0 bytes
-rw-r--r--plugins/Scriver/res/chat/4.icobin502 -> 0 bytes
-rw-r--r--plugins/Scriver/res/chat/5.icobin502 -> 0 bytes
-rw-r--r--plugins/Scriver/res/chat/6.icobin502 -> 0 bytes
-rw-r--r--plugins/Scriver/res/resource.rc12
-rw-r--r--plugins/Scriver/src/globals.cpp6
-rw-r--r--plugins/Scriver/src/resource.h6
-rw-r--r--plugins/TabSRMM/TabSRMM_icons/NOVA/res/ICONS_NOVA.rc7
-rw-r--r--plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/2.icobin502 -> 0 bytes
-rw-r--r--plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/3.icobin502 -> 0 bytes
-rw-r--r--plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/4.icobin502 -> 0 bytes
-rw-r--r--plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/5.icobin502 -> 0 bytes
-rw-r--r--plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/6.icobin502 -> 0 bytes
-rw-r--r--plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/tag1.icobin286 -> 0 bytes
-rw-r--r--plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/tag2.icobin2862 -> 0 bytes
-rw-r--r--plugins/TabSRMM/TabSRMM_icons/resource.h8
-rw-r--r--plugins/TabSRMM/res/resource.rc2
-rw-r--r--plugins/TabSRMM/src/chat_options.cpp7
-rw-r--r--plugins/TabSRMM/src/chat_tools.cpp11
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp2
23 files changed, 8 insertions, 55 deletions
diff --git a/plugins/Scriver/res/chat/1.ico b/plugins/Scriver/res/chat/1.ico
deleted file mode 100644
index 61fa00e172..0000000000
--- a/plugins/Scriver/res/chat/1.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/Scriver/res/chat/2.ico b/plugins/Scriver/res/chat/2.ico
deleted file mode 100644
index 5c1dc06fbc..0000000000
--- a/plugins/Scriver/res/chat/2.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/Scriver/res/chat/3.ico b/plugins/Scriver/res/chat/3.ico
deleted file mode 100644
index f103719b68..0000000000
--- a/plugins/Scriver/res/chat/3.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/Scriver/res/chat/4.ico b/plugins/Scriver/res/chat/4.ico
deleted file mode 100644
index 47d8f35fe2..0000000000
--- a/plugins/Scriver/res/chat/4.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/Scriver/res/chat/5.ico b/plugins/Scriver/res/chat/5.ico
deleted file mode 100644
index 7008463787..0000000000
--- a/plugins/Scriver/res/chat/5.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/Scriver/res/chat/6.ico b/plugins/Scriver/res/chat/6.ico
deleted file mode 100644
index 8a681faeb7..0000000000
--- a/plugins/Scriver/res/chat/6.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/Scriver/res/resource.rc b/plugins/Scriver/res/resource.rc
index 51cf4dac29..4164a6a1af 100644
--- a/plugins/Scriver/res/resource.rc
+++ b/plugins/Scriver/res/resource.rc
@@ -502,18 +502,6 @@ IDI_FILTER ICON "chat/filter.ico"
IDI_NICKLIST ICON "chat/nicklist.ico"
-IDI_STATUS3 ICON "chat/4.ico"
-
-IDI_STATUS2 ICON "chat/3.ico"
-
-IDI_STATUS4 ICON "chat/5.ico"
-
-IDI_STATUS1 ICON "chat/2.ico"
-
-IDI_STATUS0 ICON "chat/1.ico"
-
-IDI_STATUS5 ICON "chat/6.ico"
-
IDI_OVERLAY ICON "chat/overlay.ico"
IDI_NICKLIST2 ICON "chat/nicklist2.ico"
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp
index 6c017b7266..1978bdbbd0 100644
--- a/plugins/Scriver/src/globals.cpp
+++ b/plugins/Scriver/src/globals.cpp
@@ -72,12 +72,6 @@ static IconItem iconList2[] =
{ LPGEN("Hide nick list"), "nicklist", IDI_NICKLIST }, // 12
{ LPGEN("Show nick list"), "nicklist2", IDI_NICKLIST2 }, // 13
{ LPGEN("Icon overlay"), "overlay", IDI_OVERLAY }, // 14
- { LPGEN("Status 1 (10x10)"), "status0", IDI_STATUS0, 10}, // 15
- { LPGEN("Status 2 (10x10)"), "status1", IDI_STATUS1, 10}, // 16
- { LPGEN("Status 3 (10x10)"), "status2", IDI_STATUS2, 10}, // 17
- { LPGEN("Status 4 (10x10)"), "status3", IDI_STATUS3, 10}, // 18
- { LPGEN("Status 5 (10x10)"), "status4", IDI_STATUS4, 10}, // 19
- { LPGEN("Status 6 (10x10)"), "status5", IDI_STATUS5, 10}, // 20
};
static IconItem iconList3[] =
diff --git a/plugins/Scriver/src/resource.h b/plugins/Scriver/src/resource.h
index 14f62efbaa..4793e60cde 100644
--- a/plugins/Scriver/src/resource.h
+++ b/plugins/Scriver/src/resource.h
@@ -59,12 +59,6 @@
#define IDI_ADDSTATUS 441
#define IDI_REMSTATUS 442
#define IDI_ACTION 443
-#define IDI_STATUS3 453
-#define IDI_STATUS2 454
-#define IDI_STATUS4 455
-#define IDI_STATUS1 456
-#define IDI_STATUS0 457
-#define IDI_STATUS5 458
#define IDI_OVERLAY 460
#define IDI_NICKLIST2 461
#define IDI_FILTER2 462
diff --git a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/ICONS_NOVA.rc b/plugins/TabSRMM/TabSRMM_icons/NOVA/res/ICONS_NOVA.rc
index 4b819348ad..d256512598 100644
--- a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/ICONS_NOVA.rc
+++ b/plugins/TabSRMM/TabSRMM_icons/NOVA/res/ICONS_NOVA.rc
@@ -74,8 +74,6 @@ IDI_CONFIGSIDEBAR ICON "sbaroptions.ico"
IDI_RECENTLIST ICON "recentlist.ico"
IDI_USERPREFS ICON "userprefs.ico"
-IDI_TAG1 ICON "chat\\tag1.ico"
-IDI_TAG2 ICON "chat\\tag2.ico"
IDI_TOPICBUT ICON "chat\\topicbut.ico"
IDI_JOIN ICON "chat\\join.ico"
IDI_TOPIC ICON "chat\\topic.ico"
@@ -95,12 +93,7 @@ IDI_BKGCOLOR ICON "chat\\bkgcolor.ico"
IDI_CHANMGR ICON "chat\\window.ico"
IDI_FILTER ICON "chat\\filter.ico"
IDI_BLANK ICON "chat\\blank.ico"
-IDI_STATUS3 ICON "chat\\4.ico"
-IDI_STATUS2 ICON "chat\\3.ico"
-IDI_STATUS4 ICON "chat\\5.ico"
-IDI_STATUS1 ICON "chat\\2.ico"
IDI_STATUS0 ICON "chat\\blank.ico"
-IDI_STATUS5 ICON "chat\\6.ico"
IDI_OVERLAY ICON "chat\\overlay.ico"
IDI_FILTER2 ICON "chat\\filter2.ico"
IDI_SHOWNICKLIST ICON "chat\\nicklist_show.ico"
diff --git a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/2.ico b/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/2.ico
deleted file mode 100644
index 5c1dc06fbc..0000000000
--- a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/2.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/3.ico b/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/3.ico
deleted file mode 100644
index f103719b68..0000000000
--- a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/3.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/4.ico b/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/4.ico
deleted file mode 100644
index 47d8f35fe2..0000000000
--- a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/4.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/5.ico b/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/5.ico
deleted file mode 100644
index 7008463787..0000000000
--- a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/5.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/6.ico b/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/6.ico
deleted file mode 100644
index 8a681faeb7..0000000000
--- a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/6.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/tag1.ico b/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/tag1.ico
deleted file mode 100644
index 4db0312d9d..0000000000
--- a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/tag1.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/tag2.ico b/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/tag2.ico
deleted file mode 100644
index 5b5197a9cd..0000000000
--- a/plugins/TabSRMM/TabSRMM_icons/NOVA/res/chat/tag2.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/TabSRMM/TabSRMM_icons/resource.h b/plugins/TabSRMM/TabSRMM_icons/resource.h
index dcd14ae711..180af77975 100644
--- a/plugins/TabSRMM/TabSRMM_icons/resource.h
+++ b/plugins/TabSRMM/TabSRMM_icons/resource.h
@@ -76,12 +76,6 @@
#define IDI_FILTER 203
#define IDI_FILTER2 204
#define IDI_OVERLAY 205
-#define IDI_STATUS3 206
-#define IDI_STATUS2 207
-#define IDI_STATUS4 208
-#define IDI_STATUS1 209
-#define IDI_STATUS0 210
-#define IDI_STATUS5 211
#define IDI_BLANK 212
#define IDI_SHOWNICKLIST 213
#define IDI_HIDENICKLIST 214
@@ -102,8 +96,6 @@
#define IDI_REMSTATUS 261
#define IDI_ACTION 262
#define IDI_HIGHLIGHT 263
-#define IDI_TAG1 264
-#define IDI_TAG2 265
diff --git a/plugins/TabSRMM/res/resource.rc b/plugins/TabSRMM/res/resource.rc
index e89cb0eba5..dc5fdca0c8 100644
--- a/plugins/TabSRMM/res/resource.rc
+++ b/plugins/TabSRMM/res/resource.rc
@@ -9,7 +9,6 @@
//
#include <winres.h>
#include "..\..\..\include\statusmodes.h"
-#include "..\..\..\include\chat_resource.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -874,7 +873,6 @@ END
BEGIN
"#include <winres.h>\r\n"
"#include ""..\\..\\..\\include\\statusmodes.h""\r\n"
- "#include ""..\\..\\..\\include\\chat_resource.h""\r\n"
"\0"
END
diff --git a/plugins/TabSRMM/src/chat_options.cpp b/plugins/TabSRMM/src/chat_options.cpp
index eb503962bd..8dc2d8a2b6 100644
--- a/plugins/TabSRMM/src/chat_options.cpp
+++ b/plugins/TabSRMM/src/chat_options.cpp
@@ -183,13 +183,6 @@ static IconItem _icons[] =
{
{ LPGEN("Window Icon"), "chat_window", IDI_CHANMGR },
{ LPGEN("Icon overlay"), "chat_overlay", IDI_OVERLAY },
-
- { LPGEN("Status 1 (10x10)"), "chat_status0", IDI_STATUS0 },
- { LPGEN("Status 2 (10x10)"), "chat_status1", IDI_STATUS1 },
- { LPGEN("Status 3 (10x10)"), "chat_status2", IDI_STATUS2 },
- { LPGEN("Status 4 (10x10)"), "chat_status3", IDI_STATUS3 },
- { LPGEN("Status 5 (10x10)"), "chat_status4", IDI_STATUS4 },
- { LPGEN("Status 6 (10x10)"), "chat_status5", IDI_STATUS5 }
};
static IconItem _logicons[] =
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp
index 612f82a317..6d06b3c25c 100644
--- a/plugins/TabSRMM/src/chat_tools.cpp
+++ b/plugins/TabSRMM/src/chat_tools.cpp
@@ -194,7 +194,7 @@ passed:
}
if (iNewEvent == GC_EVENT_MESSAGE) {
- ShowPopup(si->hContact, si, g_chatApi.hIcons[ICON_MESSAGE], si->pszModule, si->ptszName, clr ? clr : g_chatApi.aFonts[9].color,
+ ShowPopup(si->hContact, si, g_chatApi.getIcon(GC_EVENT_MESSAGE), si->pszModule, si->ptszName, clr ? clr : g_chatApi.aFonts[9].color,
TranslateT("%s%s says:%s %s"), bbStart, gce->pszNick.w, bbEnd, g_chatApi.RemoveFormatting(gce->pszText.w));
}
else oldDoPopup(si, gce);
@@ -292,15 +292,16 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
// dialog event processing
if (dat) {
+ HICON hIconHighlight = g_chatApi.getIcon(GC_EVENT_HIGHLIGHT), hIconMessage = g_chatApi.getIcon(GC_EVENT_MESSAGE);
HICON hNotifyIcon = (bManyFix && !bInactive) ? 0 : g_chatApi.getIcon(iEvent);
- BOOL bForcedIcon = (hNotifyIcon == g_chatApi.hIcons[ICON_HIGHLIGHT] || hNotifyIcon == g_chatApi.hIcons[ICON_MESSAGE]);
+ BOOL bForcedIcon = (hNotifyIcon == hIconHighlight || hNotifyIcon == hIconMessage);
if ((iEvent & si->iLogTrayFlags) || bForcedIcon) {
if (!bActiveTab) {
- if (hNotifyIcon == g_chatApi.hIcons[ICON_HIGHLIGHT])
+ if (hNotifyIcon == hIconHighlight)
dat->m_iFlashIcon = hNotifyIcon;
else {
- if (dat->m_iFlashIcon != g_chatApi.hIcons[ICON_HIGHLIGHT] && dat->m_iFlashIcon != g_chatApi.hIcons[ICON_MESSAGE])
+ if (dat->m_iFlashIcon != hIconHighlight && dat->m_iFlashIcon != hIconMessage)
dat->m_iFlashIcon = hNotifyIcon;
}
dat->m_bCanFlashTab = TRUE;
@@ -344,7 +345,7 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
}
HICON hIcon = (HICON)SendMessage(dat->m_pContainer->m_hwnd, WM_GETICON, ICON_BIG, 0);
- if (hNotifyIcon == g_chatApi.hIcons[ICON_HIGHLIGHT] || (hIcon != g_chatApi.hIcons[ICON_MESSAGE] && hIcon != g_chatApi.hIcons[ICON_HIGHLIGHT])) {
+ if (hNotifyIcon == hIconHighlight || (hIcon != hIconMessage && hIcon != hIconHighlight)) {
dat->m_pContainer->SetIcon(dat, hNotifyIcon);
dat->m_pContainer->m_flags.m_bNeedsUpdateTitle = true;
}
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index 36c712279d..547105fd7a 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -198,7 +198,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
HICON hIcon;
if (dis->itemData > 0)
- hIcon = (dis->itemData & 0x10000000) ? g_chatApi.hIcons[ICON_HIGHLIGHT] : PluginConfig.g_IconMsgEvent;
+ hIcon = (dis->itemData & 0x10000000) ? g_chatApi.getIcon(GC_EVENT_HIGHLIGHT) : PluginConfig.g_IconMsgEvent;
else if (dat != nullptr) {
hIcon = dat->GetMyContactIcon(nullptr);
idle = dat->m_idle;
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 0350f55db8..677efc63e9 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -2923,7 +2923,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
int nickIndex = 0;
for (int i = 0; i < STATUSICONCOUNT; i++) {
- if (hIcon == g_chatApi.hIcons[ICON_STATUS0 + i]) {
+ if (hIcon == g_chatApi.hStatusIcons[i]) {
nickIndex = i;
break;
}