diff options
-rw-r--r-- | include/delphi/m_skin.inc | 3 | ||||
-rw-r--r-- | include/m_extraicons.h | 4 | ||||
-rw-r--r-- | include/m_skin.h | 1 | ||||
-rw-r--r-- | libs/win32/mir_app.lib | bin | 190716 -> 190492 bytes | |||
-rw-r--r-- | libs/win64/mir_app.lib | bin | 186618 -> 186412 bytes | |||
-rw-r--r-- | plugins/AuthState/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/SecureIM/src/loadicons.cpp | 2 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/ignore.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/CMPluginBase.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/ei_baseIcon.cpp | 21 | ||||
-rw-r--r-- | src/mir_app/src/ei_callbackIcon.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/ei_defaulticons.cpp | 8 | ||||
-rw-r--r-- | src/mir_app/src/ei_groupIcon.cpp | 8 | ||||
-rw-r--r-- | src/mir_app/src/ei_icolibIcon.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/ei_options.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/ei_services.cpp | 14 | ||||
-rw-r--r-- | src/mir_app/src/extraicons.h | 24 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/skinicons.cpp | 13 |
20 files changed, 46 insertions, 68 deletions
diff --git a/include/delphi/m_skin.inc b/include/delphi/m_skin.inc index b1cf7e3acc..27c3d8a86e 100644 --- a/include/delphi/m_skin.inc +++ b/include/delphi/m_skin.inc @@ -95,9 +95,6 @@ function Skin_LoadIcon(iconId:int; big:byte) : HICON; stdcall; function Skin_GetIconHandle(iconId:int) : THANDLE; stdcall;
external AppDLL name 'Skin_GetIconHandle';
-function Skin_GetIconName(iconId:int) : PAnsiChar; stdcall;
- external AppDLL name 'Skin_GetIconName';
-
// status mode icons. NOTE: These are deprecated in favour of LoadSkinnedProtoIcon()
const
SKINICON_STATUS_OFFLINE = 0;
diff --git a/include/m_extraicons.h b/include/m_extraicons.h index 30f306b1f4..d5a4c39ee9 100644 --- a/include/m_extraicons.h +++ b/include/m_extraicons.h @@ -109,10 +109,10 @@ EXTERN_C MIR_APP_DLL(void) KillModuleExtraIcons(HPLUGIN pPlugin); #define EIF_DISABLED_BY_DEFAULT 0x0001
-EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterCallback(const char *name, const char *description, const char *descIcon,
+EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterCallback(const char *name, const char *description, HANDLE descIcon,
MIRANDAHOOK RebuildIcons, MIRANDAHOOK ApplyIcon, MIRANDAHOOKPARAM OnClick = nullptr, LPARAM onClickParam = 0, int flags = 0);
-EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterIcolib(const char *name, const char *description, const char *descIcon = nullptr,
+EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterIcolib(const char *name, const char *description, HANDLE descIcon = nullptr,
MIRANDAHOOKPARAM OnClick = nullptr, LPARAM onClickParam = 0, int flags = 0);
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/include/m_skin.h b/include/m_skin.h index 33f110e017..5d0e7f05bb 100644 --- a/include/m_skin.h +++ b/include/m_skin.h @@ -96,7 +96,6 @@ EXTERN_C MIR_APP_DLL(HICON) Skin_LoadIcon(int idx, bool big = false);
EXTERN_C MIR_APP_DLL(HANDLE) Skin_GetIconHandle(int idx);
-EXTERN_C MIR_APP_DLL(char*) Skin_GetIconName(int idx);
// status mode icons. NOTE: These are deprecated in favour of LoadSkinProtoIcon()
#define SKINICON_STATUS_OFFLINE 0
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib Binary files differindex 759c5d1b4a..8d6dba2944 100644 --- a/libs/win32/mir_app.lib +++ b/libs/win32/mir_app.lib diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib Binary files differindex b1b5a76d8a..e3edd45568 100644 --- a/libs/win64/mir_app.lib +++ b/libs/win64/mir_app.lib diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp index ffc7e229f5..fe60e1c114 100644 --- a/plugins/AuthState/src/main.cpp +++ b/plugins/AuthState/src/main.cpp @@ -152,7 +152,7 @@ int onPrebuildContactMenu(WPARAM hContact, LPARAM) int onModulesLoaded(WPARAM, LPARAM)
{
// extra icons
- hExtraIcon = ExtraIcon_RegisterIcolib("authstate", LPGEN("Auth state"), iconList[ICON_BOTH].szName);
+ hExtraIcon = ExtraIcon_RegisterIcolib("authstate", LPGEN("Auth state"), iconList[ICON_BOTH].hIcolib);
// Set initial value for all contacts
for (auto &hContact : Contacts())
diff --git a/plugins/SecureIM/src/loadicons.cpp b/plugins/SecureIM/src/loadicons.cpp index 6ae33f233d..5a1eea67a3 100644 --- a/plugins/SecureIM/src/loadicons.cpp +++ b/plugins/SecureIM/src/loadicons.cpp @@ -42,7 +42,7 @@ static icons[] = { IDI_OV_RSA, TBL_ICO, ICO_OV_RSA, MODULENAME "/" LPGEN("Overlays"), "sim_ov_rsa", LPGEN("RSA/AES mode") },
};
-HINSTANCE LoadIconsPack(const char* szIconsPack)
+HINSTANCE LoadIconsPack(const char *szIconsPack)
{
HINSTANCE hNewIconInst = LoadLibrary(szIconsPack);
if (hNewIconInst != nullptr) {
diff --git a/protocols/ICQ-WIM/src/ignore.cpp b/protocols/ICQ-WIM/src/ignore.cpp index 63bcc48d72..66501858df 100644 --- a/protocols/ICQ-WIM/src/ignore.cpp +++ b/protocols/ICQ-WIM/src/ignore.cpp @@ -38,7 +38,7 @@ public: bool OnInitDialog() override { HIMAGELIST hImageList = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 2, 0); - ImageList_AddIcon(hImageList, IcoLib_GetIcon(Skin_GetIconName(SKINICON_OTHER_DELETE))); + ImageList_AddIcon(hImageList, Skin_LoadIcon(SKINICON_OTHER_DELETE)); m_list.SetImageList(hImageList, LVSIL_SMALL); m_list.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT | LVS_EX_SUBITEMIMAGES | LVS_EX_GRIDLINES); diff --git a/src/mir_app/src/CMPluginBase.cpp b/src/mir_app/src/CMPluginBase.cpp index ceb91f4f29..a18a3e15ff 100644 --- a/src/mir_app/src/CMPluginBase.cpp +++ b/src/mir_app/src/CMPluginBase.cpp @@ -287,7 +287,7 @@ HICON CMPluginBase::getIcon(int iconId, bool big) HANDLE CMPluginBase::getIconHandle(int iconId) { IcolibItem *p = (IcolibItem*)alloca(sizeof(IcolibItem)); - p->default_indx = iconId; + p->default_indx = -iconId; return m_arIcons.find(p); } diff --git a/src/mir_app/src/ei_baseIcon.cpp b/src/mir_app/src/ei_baseIcon.cpp index bc60215be9..0cca055e09 100644 --- a/src/mir_app/src/ei_baseIcon.cpp +++ b/src/mir_app/src/ei_baseIcon.cpp @@ -23,13 +23,16 @@ Boston, MA 02111-1307, USA. #include "extraicons.h" -BaseExtraIcon::BaseExtraIcon(const char *name, const wchar_t *description, const char *descIcon, MIRANDAHOOKPARAM OnClick, LPARAM param) : +BaseExtraIcon::BaseExtraIcon(const char *name, const wchar_t *description, HANDLE descIcon, MIRANDAHOOKPARAM OnClick, LPARAM param) : ExtraIcon(name), m_OnClick(OnClick), m_onClickParam(param), m_tszDescription(mir_wstrdup(description)), - m_szDescIcon(mir_strdup(descIcon)) + m_hDescIcon(descIcon) { + if (!IcoLib_IsManaged((HICON)descIcon)) + m_hDescIcon = IcoLib_GetIconHandle((const char *)descIcon); + m_id = registeredExtraIcons.getCount() + 1; } @@ -48,19 +51,9 @@ const wchar_t* BaseExtraIcon::getDescription() const return TranslateW_LP(m_tszDescription, m_pPlugin); } -void BaseExtraIcon::setDescription(const wchar_t *desc) -{ - m_tszDescription = mir_wstrdup(desc); -} - -const char* BaseExtraIcon::getDescIcon() const -{ - return m_szDescIcon; -} - -void BaseExtraIcon::setDescIcon(const char *icon) +HANDLE BaseExtraIcon::getDescIcon() const { - m_szDescIcon = mir_strdup(icon); + return m_hDescIcon; } void BaseExtraIcon::onClick(MCONTACT hContact) diff --git a/src/mir_app/src/ei_callbackIcon.cpp b/src/mir_app/src/ei_callbackIcon.cpp index 262ccc347d..2eb223c121 100644 --- a/src/mir_app/src/ei_callbackIcon.cpp +++ b/src/mir_app/src/ei_callbackIcon.cpp @@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. #include "extraicons.h" -CallbackExtraIcon::CallbackExtraIcon(const char *_name, const wchar_t *_description, const char *_descIcon, +CallbackExtraIcon::CallbackExtraIcon(const char *_name, const wchar_t *_description, HANDLE _descIcon, MIRANDAHOOK _RebuildIcons, MIRANDAHOOK _ApplyIcon, MIRANDAHOOKPARAM _OnClick, LPARAM _param) : BaseExtraIcon(_name, _description, _descIcon, _OnClick, _param), m_pfnRebuildIcons(_RebuildIcons), m_pfnApplyIcon(_ApplyIcon), m_needToRebuild(true) diff --git a/src/mir_app/src/ei_defaulticons.cpp b/src/mir_app/src/ei_defaulticons.cpp index 39cb7c273a..300e36bcdd 100644 --- a/src/mir_app/src/ei_defaulticons.cpp +++ b/src/mir_app/src/ei_defaulticons.cpp @@ -290,17 +290,17 @@ static int ProtocolOnClick(WPARAM wParam, LPARAM, LPARAM) void DefaultExtraIcons_Load() { hExtraChat = ExtraIcon_RegisterIcolib("chat_activity", LPGEN("Chat activity"), "ChatActivity"); - hExtraVisibility = ExtraIcon_RegisterIcolib("visibility", "Visibility", Skin_GetIconName(SKINICON_OTHER_VISIBLE_ALL)); + hExtraVisibility = ExtraIcon_RegisterIcolib("visibility", "Visibility", Skin_GetIconHandle(SKINICON_OTHER_VISIBLE_ALL)); hExtraGender = ExtraIcon_RegisterIcolib("gender", "Gender", "gender_male", nullptr, 0, EIF_DISABLED_BY_DEFAULT); - hExtraProto = ExtraIcon_RegisterCallback("protocol", "Account", Skin_GetIconName(SKINICON_OTHER_ACCMGR), + hExtraProto = ExtraIcon_RegisterCallback("protocol", "Account", Skin_GetIconHandle(SKINICON_OTHER_ACCMGR), &ProtocolRebuildIcons, &ProtocolApplyIcon, &ProtocolOnClick, 0, EIF_DISABLED_BY_DEFAULT); for (auto &p : infos) { p.hIcolib = Skin_GetIconHandle(p.iSkinIcon); if (p.OnClick) - p.hExtraIcon = ExtraIcon_RegisterIcolib(p.name, p.desc, Skin_GetIconName(p.iSkinIcon), DefaultOnClick, (LPARAM)&p, p.flags); + p.hExtraIcon = ExtraIcon_RegisterIcolib(p.name, p.desc, Skin_GetIconHandle(p.iSkinIcon), DefaultOnClick, (LPARAM)&p, p.flags); else - p.hExtraIcon = ExtraIcon_RegisterIcolib(p.name, p.desc, Skin_GetIconName(p.iSkinIcon), nullptr, 0, p.flags); + p.hExtraIcon = ExtraIcon_RegisterIcolib(p.name, p.desc, Skin_GetIconHandle(p.iSkinIcon), nullptr, 0, p.flags); } for (auto &hContact : Contacts()) { diff --git a/src/mir_app/src/ei_groupIcon.cpp b/src/mir_app/src/ei_groupIcon.cpp index fffea046f7..0f1313d297 100644 --- a/src/mir_app/src/ei_groupIcon.cpp +++ b/src/mir_app/src/ei_groupIcon.cpp @@ -177,13 +177,13 @@ const wchar_t* ExtraIconGroup::getDescription() const return m_tszDescription; } -const char *ExtraIconGroup::getDescIcon() const +HANDLE ExtraIconGroup::getDescIcon() const { for (auto &p : m_items) - if (!IsEmpty(p->getDescIcon())) - return p->getDescIcon(); + if (HANDLE ret = p->getDescIcon()) + return ret; - return ""; + return nullptr; } int ExtraIconGroup::getType() const diff --git a/src/mir_app/src/ei_icolibIcon.cpp b/src/mir_app/src/ei_icolibIcon.cpp index df9b33da05..bdb3b16125 100644 --- a/src/mir_app/src/ei_icolibIcon.cpp +++ b/src/mir_app/src/ei_icolibIcon.cpp @@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. #include "IcoLib.h" -IcolibExtraIcon::IcolibExtraIcon(const char *_name, const wchar_t *_description, const char *_descIcon, MIRANDAHOOKPARAM _OnClick, LPARAM _param) : +IcolibExtraIcon::IcolibExtraIcon(const char *_name, const wchar_t *_description, HANDLE _descIcon, MIRANDAHOOKPARAM _OnClick, LPARAM _param) : BaseExtraIcon(_name, _description, _descIcon, _OnClick, _param) { db_set_resident(EI_MODULE_NAME, _name); diff --git a/src/mir_app/src/ei_options.cpp b/src/mir_app/src/ei_options.cpp index 64137ece40..8c213e209d 100644 --- a/src/mir_app/src/ei_options.cpp +++ b/src/mir_app/src/ei_options.cpp @@ -117,7 +117,7 @@ class CExtraIconOptsDlg : public CDlgBase BaseExtraIcon *extra = registeredExtraIcons[group.data[i] - 1]; ids->add(extra->getID()); - if (img == 0 && !IsEmpty(extra->getDescIcon())) + if (img == 0 && extra->getDescIcon() != nullptr) img = extra->getID(); if (i > 0) @@ -421,7 +421,7 @@ public: for (auto &extra : registeredExtraIcons) { extra->setID(registeredExtraIcons.indexOf(&extra)+1); - HICON hIcon = IcoLib_GetIcon(extra->getDescIcon()); + HICON hIcon = IcoLib_GetIconByHandle(extra->getDescIcon()); if (hIcon == nullptr) ImageList_AddIcon(hImageList, hBlankIcon); else { diff --git a/src/mir_app/src/ei_services.cpp b/src/mir_app/src/ei_services.cpp index 65cab195c6..ab09af39ca 100644 --- a/src/mir_app/src/ei_services.cpp +++ b/src/mir_app/src/ei_services.cpp @@ -350,9 +350,8 @@ static void EI_PostCreate(BaseExtraIcon *extra, const char *name, int flags) } } -EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterCallback(const char *name, const char *description, const char *descIcon, - MIRANDAHOOK RebuildIcons, MIRANDAHOOK ApplyIcon, - MIRANDAHOOKPARAM OnClick, LPARAM onClickParam, int flags) +EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterCallback(const char *name, const char *description, HANDLE descIcon, + MIRANDAHOOK RebuildIcons, MIRANDAHOOK ApplyIcon, MIRANDAHOOKPARAM OnClick, LPARAM onClickParam, int flags) { // EXTRAICON_TYPE_CALLBACK if (IsEmpty(name) || IsEmpty(description)) @@ -367,14 +366,13 @@ EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterCallback(const char *name, const ptrW tszDesc(mir_a2u(description)); - BaseExtraIcon *extra = new CallbackExtraIcon(name, tszDesc, descIcon == nullptr ? "" : descIcon, RebuildIcons, ApplyIcon, OnClick, onClickParam); + BaseExtraIcon *extra = new CallbackExtraIcon(name, tszDesc, descIcon, RebuildIcons, ApplyIcon, OnClick, onClickParam); extra->m_pPlugin = &GetPluginByInstance(GetInstByAddress(RebuildIcons)); EI_PostCreate(extra, name, flags); return extra; } -EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterIcolib(const char *name, const char *description, const char *descIcon, - MIRANDAHOOKPARAM OnClick, LPARAM onClickParam, int flags) +EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterIcolib(const char *name, const char *description, HANDLE descIcon, MIRANDAHOOKPARAM OnClick, LPARAM onClickParam, int flags) { if (IsEmpty(name) || IsEmpty(description)) return nullptr; @@ -387,7 +385,7 @@ EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterIcolib(const char *name, const ch return nullptr; // Found one, now merge it - if (!IsEmpty(descIcon)) + if (descIcon) extra->setDescIcon(descIcon); if (OnClick != nullptr) @@ -401,7 +399,7 @@ EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterIcolib(const char *name, const ch } } else { - extra = new IcolibExtraIcon(name, tszDesc, descIcon == nullptr ? "" : descIcon, OnClick, onClickParam); + extra = new IcolibExtraIcon(name, tszDesc, descIcon, OnClick, onClickParam); extra->m_pPlugin = &GetPluginByInstance(GetInstByAddress((void*)name)); EI_PostCreate(extra, name, flags); } diff --git a/src/mir_app/src/extraicons.h b/src/mir_app/src/extraicons.h index 9c72dc3bad..67838ebdf0 100644 --- a/src/mir_app/src/extraicons.h +++ b/src/mir_app/src/extraicons.h @@ -60,7 +60,7 @@ public: virtual const char *getName() const;
virtual const wchar_t *getDescription() const = 0;
- virtual const char *getDescIcon() const = 0;
+ virtual HANDLE getDescIcon() const = 0;
virtual int getType() const = 0;
virtual int getSlot() const;
@@ -91,13 +91,19 @@ protected: class BaseExtraIcon : public ExtraIcon
{
public:
- BaseExtraIcon(const char *name, const wchar_t *description, const char *descIcon, MIRANDAHOOKPARAM OnClick, LPARAM param);
+ BaseExtraIcon(const char *name, const wchar_t *description, HANDLE descIcon, MIRANDAHOOKPARAM OnClick, LPARAM param);
virtual ~BaseExtraIcon();
virtual const wchar_t* getDescription() const;
- virtual void setDescription(const wchar_t *desc);
- virtual const char* getDescIcon() const;
- virtual void setDescIcon(const char *icon);
+ virtual void setDescription(const wchar_t *desc) {
+ m_tszDescription = mir_wstrdup(desc);
+ }
+
+ virtual HANDLE getDescIcon() const;
+ void setDescIcon(HANDLE icon) {
+ m_hDescIcon = icon;
+ }
+
virtual int getType() const = 0;
virtual void onClick(MCONTACT hContact);
@@ -107,7 +113,7 @@ public: protected:
ptrW m_tszDescription;
- ptrA m_szDescIcon;
+ HANDLE m_hDescIcon;
MIRANDAHOOKPARAM m_OnClick;
LPARAM m_onClickParam;
};
@@ -118,7 +124,7 @@ protected: class CallbackExtraIcon : public BaseExtraIcon
{
public:
- CallbackExtraIcon(const char *name, const wchar_t *description, const char *descIcon,
+ CallbackExtraIcon(const char *name, const wchar_t *description, HANDLE descIcon,
MIRANDAHOOK RebuildIcons, MIRANDAHOOK ApplyIcon, MIRANDAHOOKPARAM OnClick, LPARAM param);
virtual ~CallbackExtraIcon();
@@ -143,7 +149,7 @@ private: class IcolibExtraIcon : public BaseExtraIcon
{
public:
- IcolibExtraIcon(const char *name, const wchar_t *description, const char *descIcon, MIRANDAHOOKPARAM OnClick, LPARAM param);
+ IcolibExtraIcon(const char *name, const wchar_t *description, HANDLE descIcon, MIRANDAHOOKPARAM OnClick, LPARAM param);
virtual ~IcolibExtraIcon();
virtual int getType() const;
@@ -175,7 +181,7 @@ public: virtual int setIconByName(MCONTACT hContact, const char *icon);
virtual const wchar_t* getDescription() const;
- virtual const char* getDescIcon() const;
+ virtual HANDLE getDescIcon() const;
virtual int getType() const;
virtual int getPosition() const;
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index ffce4e29f0..8ff63cddf4 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -22,7 +22,6 @@ IcoLib_RemoveIcon @20 IcoLib_RemoveIconByHandle @21
IcoLib_Release @22
IcoLib_AddRef @23
-Skin_GetIconName @24
??0CProtoIntDlgBase@@QAE@ABV0@@Z @25 NONAME
??0CProtoIntDlgBase@@QAE@PAUPROTO_INTERFACE@@H@Z @26 NONAME
??0PROTO_INTERFACE@@QAE@ABU0@@Z @27 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 1c3b8e9832..8c725df9d3 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -22,7 +22,6 @@ IcoLib_RemoveIcon @20 IcoLib_RemoveIconByHandle @21
IcoLib_Release @22
IcoLib_AddRef @23
-Skin_GetIconName @24
??0CProtoIntDlgBase@@QEAA@AEBV0@@Z @25 NONAME
??0CProtoIntDlgBase@@QEAA@PEAUPROTO_INTERFACE@@H@Z @26 NONAME
??0PROTO_INTERFACE@@QEAA@AEBU0@@Z @27 NONAME
diff --git a/src/mir_app/src/skinicons.cpp b/src/mir_app/src/skinicons.cpp index 8daff88fa2..5c08661183 100644 --- a/src/mir_app/src/skinicons.cpp +++ b/src/mir_app/src/skinicons.cpp @@ -357,19 +357,6 @@ MIR_APP_DLL(HANDLE) Skin_GetIconHandle(int idx) return nullptr;
}
-MIR_APP_DLL(char*) Skin_GetIconName(int idx)
-{
- static char szIconName[100];
-
- for (int i = 0; i < _countof(mainIcons); i++) {
- if (idx == mainIcons[i].id) {
- mir_snprintf(szIconName, "%s%d", mainIconsFmt, i);
- return szIconName;
- }
- }
- return nullptr;
-}
-
MIR_APP_DLL(HICON) Skin_LoadIcon(int idx, bool big)
{
// Query for global status icons
|