summaryrefslogtreecommitdiff
path: root/plugins/AuthState/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-03-19 17:12:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-03-19 17:12:32 +0300
commite8f5997b1543b7a5768dda75c39ae3ac191e1a32 (patch)
tree78b59cb88cb270e9d57a260b0dc6746ec0ed5131 /plugins/AuthState/src
parentbe033094b81ececb2fd911b0212d3542491212f5 (diff)
fixes #2786 (AuthState: remove "Enable menu item" option)
Diffstat (limited to 'plugins/AuthState/src')
-rw-r--r--plugins/AuthState/src/main.cpp10
-rw-r--r--plugins/AuthState/src/options.cpp3
-rw-r--r--plugins/AuthState/src/resource.h1
-rw-r--r--plugins/AuthState/src/stdafx.h2
4 files changed, 3 insertions, 13 deletions
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp
index 62edf829b9..10a2962b49 100644
--- a/plugins/AuthState/src/main.cpp
+++ b/plugins/AuthState/src/main.cpp
@@ -58,7 +58,6 @@ CMPlugin::CMPlugin() :
PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx),
bUseAuthIcon(MODULENAME, "EnableAuthIcon", 1),
bUseGrantIcon(MODULENAME, "EnableGrantIcon", 1),
- bContactMenuItem(MODULENAME, "MenuItem", 0),
bIconsForRecentContacts(MODULENAME, "EnableOnlyForRecent", 0)
{
}
@@ -133,11 +132,6 @@ INT_PTR onAuthMenuSelected(WPARAM hContact, LPARAM)
int onPrebuildContactMenu(WPARAM hContact, LPARAM)
{
- if (!g_plugin.bContactMenuItem) {
- Menu_ShowItem(hUserMenu, false);
- return 0;
- }
-
char *proto = Proto_GetBaseAccountName((MCONTACT)hContact);
if (!proto)
return 0;
@@ -181,9 +175,9 @@ int CMPlugin::Load()
CMenuItem mi(&g_plugin);
SET_UID(mi, 0xc5a784ea, 0x8b07, 0x4b95, 0xa2, 0xb2, 0x84, 0x9d, 0x87, 0x43, 0x7e, 0xda);
mi.position = -1999901005;
- mi.flags = CMIF_UNICODE;
- mi.name.w = LPGENW("Enable AuthState icons");
+ mi.name.a = LPGEN("Enable AuthState icons");
mi.pszService = "AuthState/MenuItem";
hUserMenu = Menu_AddContactMenuItem(&mi);
+ Menu_ConfigureItem(hUserMenu, MCI_OPT_DISABLED, TRUE);
return 0;
}
diff --git a/plugins/AuthState/src/options.cpp b/plugins/AuthState/src/options.cpp
index 8ff821714b..9ea7b6b17b 100644
--- a/plugins/AuthState/src/options.cpp
+++ b/plugins/AuthState/src/options.cpp
@@ -23,7 +23,6 @@ class COptionsDialog : public CDlgBase
{
CCtrlCheck m_chkAuthIcon;
CCtrlCheck m_chkGrantIcon;
- CCtrlCheck m_chkMenuItem;
CCtrlCheck m_chkOnlyForRecent;
public:
@@ -31,12 +30,10 @@ public:
CDlgBase(g_plugin, IDD_AUTHSTATE_OPT),
m_chkAuthIcon(this, IDC_AUTHICON),
m_chkGrantIcon(this, IDC_GRANTICON),
- m_chkMenuItem(this, IDC_ENABLEMENUITEM),
m_chkOnlyForRecent(this, IDC_ICONSFORRECENT)
{
CreateLink(m_chkAuthIcon, g_plugin.bUseAuthIcon);
CreateLink(m_chkGrantIcon, g_plugin.bUseGrantIcon);
- CreateLink(m_chkMenuItem, g_plugin.bContactMenuItem);
CreateLink(m_chkOnlyForRecent, g_plugin.bIconsForRecentContacts);
}
diff --git a/plugins/AuthState/src/resource.h b/plugins/AuthState/src/resource.h
index 9e3a220c78..abc6cb753a 100644
--- a/plugins/AuthState/src/resource.h
+++ b/plugins/AuthState/src/resource.h
@@ -8,7 +8,6 @@
#define IDD_AUTHSTATE_OPT 103
#define IDC_AUTHICON 1002
#define IDC_GRANTICON 1003
-#define IDC_ENABLEMENUITEM 1005
#define IDC_ICONSFORRECENT 1006
// Next default values for new objects
diff --git a/plugins/AuthState/src/stdafx.h b/plugins/AuthState/src/stdafx.h
index 84487e182a..1a0b4a781c 100644
--- a/plugins/AuthState/src/stdafx.h
+++ b/plugins/AuthState/src/stdafx.h
@@ -42,7 +42,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
- CMOption<BYTE> bUseAuthIcon, bUseGrantIcon, bContactMenuItem, bIconsForRecentContacts;
+ CMOption<BYTE> bUseAuthIcon, bUseGrantIcon, bIconsForRecentContacts;
int Load() override;
};