summaryrefslogtreecommitdiff
path: root/plugins/NotesAndReminders/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-03-17 18:43:17 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-03-17 18:43:17 +0300
commit7515702ee563399f869f850a327855e7051d5424 (patch)
tree5030a2c0ad27c0311d959fcbaae55fa12291d00f /plugins/NotesAndReminders/src
parent50fa3cf77478d4ac62c836c8397e6bd20243a1af (diff)
fixes #2777 (Notes and Reminders: убрать настройку "Добавлять пункты в меню контакта")
Diffstat (limited to 'plugins/NotesAndReminders/src')
-rw-r--r--plugins/NotesAndReminders/src/main.cpp10
-rw-r--r--plugins/NotesAndReminders/src/options.cpp14
-rw-r--r--plugins/NotesAndReminders/src/resource.h1
-rw-r--r--plugins/NotesAndReminders/src/stdafx.h2
4 files changed, 11 insertions, 16 deletions
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp
index f717e33e4d..d3ad2c6d21 100644
--- a/plugins/NotesAndReminders/src/main.cpp
+++ b/plugins/NotesAndReminders/src/main.cpp
@@ -72,11 +72,10 @@ int OnTopToolBarInit(WPARAM, LPARAM)
static void addMenuItem(CMenuItem &mi)
{
- if (g_plugin.bAddContListMI) {
- HGENMENU save = mi.root; mi.root = nullptr;
- Menu_AddContactMenuItem(&mi);
- mi.root = save;
- }
+ HGENMENU save = mi.root; mi.root = nullptr;
+ Menu_AddContactMenuItem(&mi);
+ mi.root = save;
+
Menu_AddMainMenuItem(&mi);
}
@@ -170,7 +169,6 @@ static int OnPreShutdown(WPARAM, LPARAM)
CMPlugin::CMPlugin() :
PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx),
- bAddContListMI(MODULENAME, "AddContactMenuItems", true),
bShowNotesAtStart(MODULENAME, "ShowNotesAtStart", true),
bShowNoteButtons(MODULENAME, "ShowNoteButtons", true),
bShowScrollbar(MODULENAME, "ShowScrollbar", true),
diff --git a/plugins/NotesAndReminders/src/options.cpp b/plugins/NotesAndReminders/src/options.cpp
index 3aa14ff5af..dd198455e2 100644
--- a/plugins/NotesAndReminders/src/options.cpp
+++ b/plugins/NotesAndReminders/src/options.cpp
@@ -200,17 +200,19 @@ class CNROptionsDlg : public CDlgBase
cmbDate.SetCurSel(g_NoteTitleDate ? g_NoteTitleDate - 1 : cmbDate.GetCount()-1);
cmbTime.SetCurSel(g_NoteTitleTime ? g_NoteTitleTime - 1 : cmbTime.GetCount()-1);
- SendDlgItemMessage(m_hwnd, IDC_SLIDER_TRANSPARENCY, TBM_SETPOS, TRUE, 255 - g_Transparency);
+ slider.SetPosition(255 - g_Transparency);
}
CCtrlEdit edtBrowser, edtEmail;
CCtrlCombo cmbDate, cmbTime;
- CCtrlCheck chkHide, chkMenus, chkButtons, chkScroll, chkClose, chkMSI;
+ CCtrlCheck chkHide, chkButtons, chkScroll, chkClose, chkMSI;
CCtrlButton btnBrowse, btnReset;
+ CCtrlSlider slider;
public:
CNROptionsDlg() :
CDlgBase(g_plugin, IDD_STNOTEOPTIONS),
+ slider(this, IDC_SLIDER_TRANSPARENCY, 255 - MIN_ALPHA),
edtEmail(this, IDC_EDIT_EMAILSMS),
edtBrowser(this, IDC_EDIT_ALTBROWSER),
cmbDate(this, IDC_COMBODATE),
@@ -218,7 +220,6 @@ public:
chkMSI(this, IDC_CHECK_MSI),
chkHide(this, IDC_CHECK_HIDENOTES),
chkClose(this, IDC_CHECK_CLOSE),
- chkMenus(this, IDC_CHECK_MENUS),
chkScroll(this, IDC_CHECK_SCROLLBARS),
chkButtons(this, IDC_CHECK_BUTTONS),
btnReset(this, IDC_BUTTON_RESET),
@@ -229,15 +230,12 @@ public:
CreateLink(chkMSI, g_plugin.bUseMSI);
CreateLink(chkClose, g_plugin.bCloseAfterAddReminder);
- CreateLink(chkMenus, g_plugin.bAddContListMI);
CreateLink(chkScroll, g_plugin.bShowScrollbar);
CreateLink(chkButtons, g_plugin.bShowNoteButtons);
}
bool OnInitDialog() override
{
- SendDlgItemMessage(m_hwnd, IDC_SLIDER_TRANSPARENCY, TBM_SETRANGE, TRUE, MAKELONG(0, 255 - MIN_ALPHA));
-
cmbDate.ResetContent();
for (auto &it : dateFormats)
cmbDate.AddString(it.lpszUI);
@@ -266,7 +264,7 @@ public:
BOOL LB;
g_NoteWidth = GetDlgItemInt(m_hwnd, IDC_EDIT_WIDTH, &LB, FALSE);
g_NoteHeight = GetDlgItemInt(m_hwnd, IDC_EDIT_HEIGHT, &LB, FALSE);
- g_Transparency = 255 - SendDlgItemMessage(m_hwnd, IDC_SLIDER_TRANSPARENCY, TBM_GETPOS, 0, 0);
+ g_Transparency = 255 - slider.GetPosition();
g_NoteTitleDate = (cmbDate.GetCurSel()+1) % cmbDate.GetCount();
g_NoteTitleTime = (cmbTime.GetCurSel()+1) % cmbTime.GetCount();
@@ -328,7 +326,7 @@ public:
replaceStr(g_RemindSMS, nullptr);
replaceStr(g_lpszAltBrowser, nullptr);
- g_plugin.bShowNotesAtStart = g_plugin.bAddContListMI = g_plugin.bShowScrollbar = g_plugin.bShowNoteButtons = true;
+ g_plugin.bShowNotesAtStart = g_plugin.bShowScrollbar = g_plugin.bShowNoteButtons = true;
g_plugin.bCloseAfterAddReminder = g_plugin.bUseMSI = true;
g_NoteTitleDate = 1;
diff --git a/plugins/NotesAndReminders/src/resource.h b/plugins/NotesAndReminders/src/resource.h
index a03b3755e3..d74d0aaf14 100644
--- a/plugins/NotesAndReminders/src/resource.h
+++ b/plugins/NotesAndReminders/src/resource.h
@@ -38,7 +38,6 @@
#define IDC_DAILY 1009
#define IDC_CHECK_HIDENOTES 1010
#define IDC_WEEKLY 1010
-#define IDC_CHECK_MENUS 1011
#define IDC_MONTHLY 1011
#define IDC_EDIT_WIDTH 1012
#define IDC_EDIT_HEIGHT 1013
diff --git a/plugins/NotesAndReminders/src/stdafx.h b/plugins/NotesAndReminders/src/stdafx.h
index e5d1ddc3ad..37d4382e78 100644
--- a/plugins/NotesAndReminders/src/stdafx.h
+++ b/plugins/NotesAndReminders/src/stdafx.h
@@ -40,7 +40,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
- CMOption<BYTE> bShowNotesAtStart, bShowScrollbar, bAddContListMI, bShowNoteButtons;
+ CMOption<BYTE> bShowNotesAtStart, bShowScrollbar, bShowNoteButtons;
CMOption<BYTE> bCloseAfterAddReminder, bUseMSI;
int Load() override;