diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-01 23:07:21 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-01 23:07:21 +0300 |
commit | 32814854d5eec107221424656dca122887e3de3f (patch) | |
tree | 6834c44d3f62920de508c676ab59f88f5b57dc40 | |
parent | b65a92e65f9010a0166f7dcd954b0ce58f2b6cc4 (diff) |
tabSRMM: old perversion removed
-rw-r--r-- | include/m_skin.h | 44 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat_options.cpp | 43 | ||||
-rw-r--r-- | src/mir_app/src/pluginopts.cpp | 116 | ||||
-rw-r--r-- | src/mir_app/src/resource.h | 4 | ||||
-rw-r--r-- | src/mir_app/src/skinicons.cpp | 11 |
5 files changed, 77 insertions, 141 deletions
diff --git a/include/m_skin.h b/include/m_skin.h index ed70659eb2..3fb83846ec 100644 --- a/include/m_skin.h +++ b/include/m_skin.h @@ -67,30 +67,26 @@ #define SKINICON_OTHER_EMPTYBLOB 225
#define SKINICON_OTHER_UNICODE 226
#define SKINICON_OTHER_ANSI 227
-#define SKINICON_OTHER_LOADED 228
-#define SKINICON_OTHER_NOTLOADED 229
-#define SKINICON_OTHER_UNDO 230
-#define SKINICON_OTHER_WINDOW 231
-#define SKINICON_OTHER_WINDOWS 232
-#define SKINICON_OTHER_ACCMGR 233
-#define SKINICON_OTHER_MAINMENU 234
-#define SKINICON_OTHER_STATUS 235
-#define SKINICON_CHAT_JOIN 236
-#define SKINICON_CHAT_LEAVE 237
-#define SKINICON_OTHER_STATUS_LOCKED 238
-#define SKINICON_OTHER_GROUP 239
-#define SKINICON_OTHER_ON 240
-#define SKINICON_OTHER_OFF 241
-#define SKINICON_OTHER_LOADEDGRAY 242
-#define SKINICON_OTHER_NOTLOADEDGRAY 243
-#define SKINICON_OTHER_VISIBLE_ALL 244
-#define SKINICON_OTHER_INVISIBLE_ALL 245
-#define SKINICON_OTHER_FRAME 246
-#define SKINICON_AUTH_ADD 247
-#define SKINICON_AUTH_REQUEST 248
-#define SKINICON_AUTH_GRANT 249
-#define SKINICON_AUTH_REVOKE 250
-#define SKINICON_OTHER_GROUPADD 251
+#define SKINICON_OTHER_UNDO 228
+#define SKINICON_OTHER_WINDOW 229
+#define SKINICON_OTHER_WINDOWS 230
+#define SKINICON_OTHER_ACCMGR 231
+#define SKINICON_OTHER_MAINMENU 232
+#define SKINICON_OTHER_STATUS 233
+#define SKINICON_CHAT_JOIN 234
+#define SKINICON_CHAT_LEAVE 235
+#define SKINICON_OTHER_STATUS_LOCKED 236
+#define SKINICON_OTHER_GROUP 237
+#define SKINICON_OTHER_ON 238
+#define SKINICON_OTHER_OFF 239
+#define SKINICON_OTHER_VISIBLE_ALL 240
+#define SKINICON_OTHER_INVISIBLE_ALL 241
+#define SKINICON_OTHER_FRAME 242
+#define SKINICON_AUTH_ADD 243
+#define SKINICON_AUTH_REQUEST 244
+#define SKINICON_AUTH_GRANT 245
+#define SKINICON_AUTH_REVOKE 246
+#define SKINICON_OTHER_GROUPADD 247
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda skin
diff --git a/plugins/TabSRMM/src/chat_options.cpp b/plugins/TabSRMM/src/chat_options.cpp index 99a26c069f..723b832a37 100644 --- a/plugins/TabSRMM/src/chat_options.cpp +++ b/plugins/TabSRMM/src/chat_options.cpp @@ -90,7 +90,8 @@ static ColorOptionsList _tabclrs[] = { extern LOGFONT lfDefault;
-static FontOptionsList IM_fontOptionsList[] = {
+static FontOptionsList IM_fontOptionsList[] =
+{
{ LPGENW(">> Outgoing messages"), RGB(50, 50, 50), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
{ LPGENW(">> Outgoing misc events"), RGB(50, 50, 50), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
{ LPGENW("<< Incoming messages"), RGB(50, 50, 50), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
@@ -115,7 +116,8 @@ static FontOptionsList IM_fontOptionsList[] = { { LPGENW("* Symbols (outgoing)"), RGB(50, 50, 50), L"Webdings", SYMBOL_CHARSET, 0, -12 },
};
-static FontOptionsList IP_fontOptionsList[] = {
+static FontOptionsList IP_fontOptionsList[] =
+{
{ LPGENW("Nickname"), RGB(0, 0, 0), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
{ LPGENW("UIN"), RGB(0, 0, 0), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
{ LPGENW("Status"), RGB(0, 0, 0), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
@@ -124,12 +126,9 @@ static FontOptionsList IP_fontOptionsList[] = { { LPGENW("Window caption (skinned mode)"), RGB(255, 255, 255), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
};
-static FontOptionsList *fontOptionsList = IM_fontOptionsList;
-static int fontCount = MSGDLGFONTCOUNT;
-
struct branch_t
{
- wchar_t* szDescr;
+ wchar_t* szDescr;
char* szDBName;
int iMode;
BYTE bDefault;
@@ -176,10 +175,12 @@ void LoadMsgDlgFont(int section, int i, LOGFONT *lf, COLORREF* colour, char *szM char str[32];
int db_idx = (section == FONTSECTION_IM) ? i : i + 100;
- FontOptionsList *fol = fontOptionsList;
+ FontOptionsList *fol;
switch (section) {
case FONTSECTION_IM: fol = IM_fontOptionsList; break;
case FONTSECTION_IP: fol = IP_fontOptionsList; break;
+ default:
+ return;
}
if (colour) {
@@ -289,13 +290,14 @@ void RegisterFontServiceFonts() strncpy(fid.dbSettingsGroup, FONTMODULE, _countof(fid.dbSettingsGroup));
- for (int i = 0; i < _countof(IM_fontOptionsList); i++) {
+ int i = 0;
+ for (auto &it : IM_fontOptionsList) {
fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS;
- LoadMsgDlgFont(FONTSECTION_IM, i, &lf, &fontOptionsList[i].colour, FONTMODULE);
- mir_snprintf(fid.setting, "Font%d", i);
+ LoadMsgDlgFont(FONTSECTION_IM, i, &lf, &it.colour, FONTMODULE);
+ mir_snprintf(fid.setting, "Font%d", i++);
fid.order = i;
- wcsncpy(fid.name, fontOptionsList[i].szDescr, _countof(fid.name));
- fid.deffontsettings.colour = fontOptionsList[i].colour;
+ wcsncpy(fid.name, it.szDescr, _countof(fid.name));
+ fid.deffontsettings.colour = it.colour;
fid.deffontsettings.size = (char)lf.lfHeight;
fid.deffontsettings.style = (lf.lfWeight >= FW_BOLD ? FONTF_BOLD : 0) | (lf.lfItalic ? FONTF_ITALIC : 0);
fid.deffontsettings.charset = lf.lfCharSet;
@@ -347,17 +349,17 @@ void RegisterFontServiceFonts() g_plugin.addFont(&fid);
}
- fontOptionsList = IP_fontOptionsList;
+ i = 0;
fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS;
wcsncpy(fid.group, LPGENW("Message sessions") L"/" LPGENW("Info Panel"), _countof(fid.group));
wcsncpy(fid.backgroundGroup, LPGENW("Message sessions") L"/" LPGENW("Info Panel"), _countof(fid.backgroundGroup));
wcsncpy(fid.backgroundName, LPGENW("Fields background"), _countof(fid.backgroundName));
- for (int i = 0; i < IPFONTCOUNT; i++) {
- LoadMsgDlgFont(FONTSECTION_IP, i, &lf, &fontOptionsList[i].colour, FONTMODULE);
- mir_snprintf(fid.setting, "Font%d", i + 100);
- fid.order = i + 100;
- wcsncpy(fid.name, fontOptionsList[i].szDescr, _countof(fid.name));
- fid.deffontsettings.colour = fontOptionsList[i].colour;
+ for (auto &it : IP_fontOptionsList) {
+ LoadMsgDlgFont(FONTSECTION_IP, i, &lf, &it.colour, FONTMODULE);
+ mir_snprintf(fid.setting, "Font%d", i+100);
+ fid.order = i+100;
+ wcsncpy(fid.name, it.szDescr, _countof(fid.name));
+ fid.deffontsettings.colour = it.colour;
fid.deffontsettings.size = (char)lf.lfHeight;
fid.deffontsettings.style = (lf.lfWeight >= FW_BOLD ? FONTF_BOLD : 0) | (lf.lfItalic ? FONTF_ITALIC : 0);
fid.deffontsettings.charset = lf.lfCharSet;
@@ -370,11 +372,12 @@ void RegisterFontServiceFonts() wcsncpy(fid.group, LPGENW("Message sessions"), _countof(fid.group));
}
g_plugin.addFont(&fid);
+ i++;
}
wcsncpy(cid.group, LPGENW("Message sessions") L"/" LPGENW("Group chats"), _countof(cid.group));
strncpy(cid.dbSettingsGroup, CHAT_MODULE, _countof(cid.dbSettingsGroup));
- for (int i = 0; i <= 7; i++) {
+ for (i = 0; i <= 7; i++) {
mir_snprintf(cid.setting, "NickColor%d", i);
wcsncpy(cid.name, chatcolorsnames[i], _countof(cid.name));
cid.order = i + 1;
diff --git a/src/mir_app/src/pluginopts.cpp b/src/mir_app/src/pluginopts.cpp index b3eac035e1..973a5094e5 100644 --- a/src/mir_app/src/pluginopts.cpp +++ b/src/mir_app/src/pluginopts.cpp @@ -37,6 +37,7 @@ struct PluginListItemData wchar_t fileName[MAX_PATH];
HINSTANCE hInst;
int flags, stdPlugin;
+ bool bRequiresRestart, bWasLoaded;
wchar_t *author, *description, *copyright, *homepage;
MUUID uuid;
@@ -101,18 +102,18 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA *fd, wchar_t *path, WPARAM, LPARAM }
else ppb = &GetPluginByInstance(hInst);
- PluginListItemData *dat = (PluginListItemData*)mir_alloc(sizeof(PluginListItemData));
+ PluginListItemData *dat = (PluginListItemData*)mir_calloc(sizeof(PluginListItemData));
dat->hInst = hInst;
dat->flags = ppb->getInfo().flags;
+ dat->bWasLoaded = hInst != nullptr;
- dat->stdPlugin = 0;
if (pIds != nullptr)
dat->importIds(pIds);
else {
typedef MUUID* (__cdecl * Miranda_Plugin_Interfaces)(void);
Miranda_Plugin_Interfaces pFunc = (Miranda_Plugin_Interfaces)GetProcAddress(ppb->getInst(), "MirandaPluginInterfaces");
if (pFunc) {
- MUUID* pPascalIds = pFunc();
+ MUUID *pPascalIds = pFunc();
if (pPascalIds != nullptr)
dat->importIds(pPascalIds);
}
@@ -122,14 +123,15 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA *fd, wchar_t *path, WPARAM, LPARAM wcsncpy_s(dat->fileName, fd->cFileName, _TRUNCATE);
HWND hwndList = (HWND)lParam;
-
- LVITEM it = { 0 };
- // column 1: Checkbox + Enable/disabled icons
- it.mask = LVIF_PARAM | LVIF_IMAGE;
- it.iImage = (hInst != nullptr) ? 2 : 3;
bool bNoCheckbox = (dat->flags & STATIC_PLUGIN) != 0;
if (bNoCheckbox || hasMuuid(pIds, MIID_CLIST) || hasMuuid(pIds, MIID_SSL))
- it.iImage += 2;
+ dat->bRequiresRestart = true;
+
+ LVITEM it = { 0 };
+ // column 1: Checkbox + Unicode/ANSI icon + filename
+ it.mask = LVIF_PARAM | LVIF_IMAGE | LVIF_TEXT;
+ it.iImage = (dat->flags & UNICODE_AWARE) ? 0 : 1;
+ it.pszText = fd->cFileName;
it.lParam = (LPARAM)dat;
int iRow = ListView_InsertItem(hwndList, &it);
@@ -137,14 +139,7 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA *fd, wchar_t *path, WPARAM, LPARAM ListView_SetItemState(hwndList, iRow, bNoCheckbox ? 0x3000 : 0x2000, LVIS_STATEIMAGEMASK);
if (iRow != -1) {
- // column 2: Unicode/ANSI icon + filename
- it.mask = LVIF_IMAGE | LVIF_TEXT;
- it.iItem = iRow;
- it.iSubItem = 1;
- it.iImage = (dat->flags & UNICODE_AWARE) ? 0 : 1;
- it.pszText = fd->cFileName;
- ListView_SetItem(hwndList, &it);
-
+ // column 2: plugin short name
const PLUGININFOEX &ppi = ppb->getInfo();
dat->author = sttUtf8auto(ppi.author);
dat->copyright = sttUtf8auto(ppi.copyright);
@@ -156,13 +151,12 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA *fd, wchar_t *path, WPARAM, LPARAM memset(&dat->uuid, 0, sizeof(dat->uuid));
wchar_t *shortNameT = mir_a2u(ppi.shortName);
- // column 3: plugin short name
if (shortNameT) {
- ListView_SetItemText(hwndList, iRow, 2, shortNameT);
+ ListView_SetItemText(hwndList, iRow, 1, shortNameT);
mir_free(shortNameT);
}
- // column4: version number
+ // column 3: version number
DWORD unused, verInfoSize = GetFileVersionInfoSize(buf, &unused);
if (verInfoSize != 0) {
UINT blockSize;
@@ -175,7 +169,7 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA *fd, wchar_t *path, WPARAM, LPARAM }
else mir_snwprintf(buf, L"%d.%d.%d.%d", HIBYTE(HIWORD(ppi.version)), LOBYTE(HIWORD(ppi.version)), HIBYTE(LOWORD(ppi.version)), LOBYTE(LOWORD(ppi.version)));
- ListView_SetItemText(hwndList, iRow, 3, buf);
+ ListView_SetItemText(hwndList, iRow, 2, buf);
arPluginList.insert(dat);
}
else mir_free(dat);
@@ -282,7 +276,6 @@ public: m_timer.OnEvent = Callback(this, &CPluginOptDlg::onTimer);
m_plugList.OnItemChanged = Callback(this, &CPluginOptDlg::list_ItemChanged);
- m_plugList.OnClick = Callback(this, &CPluginOptDlg::list_OnClick);
m_plugList.OnKeyDown = Callback(this, &CPluginOptDlg::list_OnKeyDown);
}
@@ -291,18 +284,10 @@ public: HIMAGELIST hIml = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 4, 0);
ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_UNICODE);
ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_ANSI);
- ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_LOADED);
- ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_NOTLOADED);
- ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_LOADEDGRAY);
- ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_NOTLOADEDGRAY);
m_plugList.SetImageList(hIml, LVSIL_SMALL);
LVCOLUMN col;
col.mask = LVCF_TEXT | LVCF_WIDTH;
- col.pszText = L"";
- col.cx = 40;
- m_plugList.InsertColumn(0, &col);
-
col.pszText = TranslateT("Plugin");
col.cx = 180;
m_plugList.InsertColumn(1, &col);
@@ -312,7 +297,7 @@ public: m_plugList.InsertColumn(2, &col);
col.pszText = TranslateT("Version");
- col.cx = 75;
+ col.cx = 115;
m_plugList.InsertColumn(3, &col);
m_plugList.SetExtendedListViewStyleEx(0, LVS_EX_SUBITEMIMAGES | LVS_EX_CHECKBOXES | LVS_EX_LABELTIP | LVS_EX_FULLROWSELECT);
@@ -336,9 +321,6 @@ public: m_plugList.SetColumnWidth(2, max);
m_plugList.SortItems(SortPlugins, (LPARAM)m_hwnd);
-
- m_hEvent1 = HookEventMessage(ME_SYSTEM_MODULELOAD, m_hwnd, WM_USER + 1);
- m_hEvent2 = HookEventMessage(ME_SYSTEM_MODULEUNLOAD, m_hwnd, WM_USER + 2);
return true;
}
@@ -349,7 +331,7 @@ public: for (int iRow = 0; iRow != -1;) {
wchar_t buf[1024];
- m_plugList.GetItemText(iRow, 1, buf, _countof(buf));
+ m_plugList.GetItemText(iRow, 0, buf, _countof(buf));
int iState = m_plugList.GetItemState(iRow, LVIS_STATEIMAGEMASK);
SetPluginOnWhiteList(buf, (iState & 0x2000) ? 1 : 0);
@@ -363,22 +345,24 @@ public: lvi.mask = LVIF_IMAGE;
PluginListItemData *dat = (PluginListItemData*)lvi.lParam;
- if (iState == 0x2000) {
- // enabling plugin
- if (lvi.iImage == 3 || lvi.iImage == 5) {
- if (lvi.iImage == 3)
+ if (iState == 0x2000) { // enabling plugin
+ if (!dat->bWasLoaded) {
+ if (!dat->bRequiresRestart) {
LoadPluginDynamically(dat);
+ dat->bWasLoaded = true;
+ }
else {
bufRestart.AppendFormat(L" - %s\n", buf);
needRestart = true;
}
}
}
- else {
- // disabling plugin
- if (lvi.iImage == 2 || lvi.iImage == 4) {
- if (lvi.iImage == 2)
+ else { // disabling plugin
+ if (dat->bWasLoaded) {
+ if (!dat->bRequiresRestart) {
UnloadPluginDynamically(dat);
+ dat->bWasLoaded = false;
+ }
else {
bufRestart.AppendFormat(L" - %s\n", buf);
needRestart = true;
@@ -421,52 +405,6 @@ public: }
}
- INT_PTR DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) override
- {
- if (uMsg == WM_USER + 1 || uMsg == WM_USER + 2) {
- LVITEM lvi;
- lvi.mask = LVIF_PARAM | LVIF_IMAGE;
- lvi.iSubItem = 0;
- for (lvi.iItem = 0; m_plugList.GetItem(&lvi); lvi.iItem++) {
- PluginListItemData *dat = (PluginListItemData*)lvi.lParam;
- if (dat->hInst == (HINSTANCE)lParam) {
- lvi.iImage = uMsg - WM_USER + 1;
- m_plugList.SetItem(&lvi);
- break;
- }
- }
- }
-
- return CDlgBase::DlgProc(uMsg, wParam, lParam);
- }
-
- void list_OnClick(CCtrlListView::TEventInfo *evt)
- {
- auto hdr = evt->nmlv;
-
- LVHITTESTINFO hi;
- hi.pt.x = hdr->ptAction.x;
- hi.pt.y = hdr->ptAction.y;
- m_plugList.SubItemHitTest(&hi);
- // Dynamically load/unload a plugin
- if (hi.iSubItem == 0 && (hi.flags & LVHT_ONITEMICON)) {
- LVITEM lvi = { 0 };
- lvi.mask = LVIF_IMAGE | LVIF_PARAM;
- lvi.stateMask = -1;
- lvi.iItem = hi.iItem;
- lvi.iSubItem = 0;
- if (m_plugList.GetItem(&lvi)) {
- PluginListItemData *dat = (PluginListItemData*)lvi.lParam;
- if (lvi.iImage == 3)
- LoadPluginDynamically(dat); // load plugin
- else if (lvi.iImage == 2)
- UnloadPluginDynamically(dat); // unload plugin
-
- LoadStdPlugins();
- }
- }
- }
-
void onTimer(CTimer*)
{
m_timer.Stop();
diff --git a/src/mir_app/src/resource.h b/src/mir_app/src/resource.h index 3b30327ac1..e1a6047fa0 100644 --- a/src/mir_app/src/resource.h +++ b/src/mir_app/src/resource.h @@ -18,8 +18,6 @@ #define IDD_OPT_PROTOCOLORDER 109
#define IDD_OPT_ICOLIB 110
#define IDD_ICOLIB_IMPORT 111
-#define IDI_LOADED_GRAY 113
-#define IDI_NOTLOADED_GRAY 114
#define IDD_ADDED 115
#define IDD_ENTER_STRING 116
#define IDI_ADDGROUP 117
@@ -102,10 +100,8 @@ #define IDI_UNICODE 218
#define IDI_ANSI 219
#define IDD_INFO_SUMMARY 220
-#define IDI_LOADED 220
#define IDD_INFO_CONTACT 221
#define IDR_CREDITS 221
-#define IDI_NOTLOADED 221
#define IDD_INFO_BACKGROUND 222
#define IDD_INFO_NOTES 223
#define IDD_ADDEMAIL 226
diff --git a/src/mir_app/src/skinicons.cpp b/src/mir_app/src/skinicons.cpp index 4cb9361e23..24a4d6b5e5 100644 --- a/src/mir_app/src/skinicons.cpp +++ b/src/mir_app/src/skinicons.cpp @@ -67,8 +67,8 @@ static struct StandardIconDescription mainIcons[] = { SKINICON_OTHER_EMPTYBLOB, LPGEN("Empty blob"), -IDI_EMPTYBLOB, 0, nullptr }, // 26
{ SKINICON_OTHER_UNICODE, LPGEN("Unicode plugin"), -IDI_UNICODE, 0, nullptr }, // 27
{ SKINICON_OTHER_ANSI, LPGEN("ANSI plugin"), -IDI_ANSI, 0, nullptr }, // 28
- { SKINICON_OTHER_LOADED, LPGEN("Running plugin"), -IDI_LOADED, 0, nullptr }, // 29
- { SKINICON_OTHER_NOTLOADED, LPGEN("Unloaded plugin"), -IDI_NOTLOADED, 0, nullptr }, // 30
+ { -1, LPGEN("Unused"), 0, 0, nullptr }, // 29
+ { -1, LPGEN("Unused"), 0, 0, nullptr }, // 30
{ SKINICON_OTHER_UNDO, LPGEN("Undo"), -IDI_UNDO, 0, nullptr }, // 31
{ SKINICON_OTHER_WINDOW, LPGEN("Window"), -IDI_WINDOW, 0, nullptr }, // 32
{ SKINICON_OTHER_WINDOWS, LPGEN("System"), -IDI_WINDOWS, 0, nullptr }, // 33
@@ -82,8 +82,8 @@ static struct StandardIconDescription mainIcons[] = { SKINICON_OTHER_GROUP, LPGEN("Move to group"), -IDI_MOVETOGROUP, 0, nullptr }, // 41
{ SKINICON_OTHER_ON, LPGEN("On"), -IDI_ON, 0, nullptr }, // 42
{ SKINICON_OTHER_OFF, LPGEN("Off"), -IDI_OFF, 0, nullptr }, // 43
- { SKINICON_OTHER_LOADEDGRAY, LPGEN("Running core plugin"), -IDI_LOADED_GRAY, 0, nullptr }, // 44
- { SKINICON_OTHER_NOTLOADEDGRAY, LPGEN("Non-loadable plugin"), -IDI_NOTLOADED_GRAY, 0, nullptr }, // 45
+ { -1, LPGEN("Unused"), 0, 0, nullptr }, // 44
+ { -1, LPGEN("Unused"), 0, 0, nullptr }, // 45
{ SKINICON_OTHER_FRAME, LPGEN("Frames"), -IDI_FRAME, 0, nullptr }, // 46
{ SKINICON_OTHER_GROUPADD, LPGEN("Add group"), -IDI_ADDGROUP, 0, nullptr }, // 47
{ SKINICON_AUTH_ADD, LPGEN("Add to list"), -IDI_AUTH_ADD, 0, nullptr }, // 48
@@ -392,6 +392,9 @@ int LoadSkinIcons(void) // Add main icons to list
for (int i = 0; i < _countof(mainIcons); i++) {
+ if (mainIcons[i].id == -1)
+ continue;
+
mir_snprintf(iconName, "%s%d", mainIconsFmt, i);
sid.section.a = mainIcons[i].section == nullptr ? (char*)LPGEN("Main icons") : (char*)mainIcons[i].section;
sid.description.a = (char*)mainIcons[i].description;
|