summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/msgdialog.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-12-26 15:57:50 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-12-26 15:57:50 +0300
commit4ac8a5589cd54abe47f1c80c67b2a8265764528a (patch)
treef19de1b727375840a8aca83fcd84046699ba1f99 /plugins/TabSRMM/src/msgdialog.cpp
parent1b2a01f70d70425f84d5009fabc33e5142f2cf73 (diff)
TabSRMM:
- custom color chooser removed; - unused menu items removed; - version bump
Diffstat (limited to 'plugins/TabSRMM/src/msgdialog.cpp')
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp43
1 files changed, 3 insertions, 40 deletions
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 82c75e8783..f340f0d8a2 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -358,7 +358,7 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg)
m_pWnd->Invalidate();
}
-void TSAPI ShowMultipleControls(HWND hwndDlg, const UINT *controls, int cControls, int state)
+static void ShowMultipleControls(HWND hwndDlg, const UINT *controls, int cControls, int state)
{
for (int i = 0; i < cControls; i++)
Utils::showDlgControl(hwndDlg, controls[i], state);
@@ -513,7 +513,7 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
if (dat->m_bIsAutosizingInput)
selection = ID_SPLITTERCONTEXT_SETPOSITIONFORTHISSESSION;
else
- selection = TrackPopupMenu(GetSubMenu(PluginConfig.g_hMenuContext, 12), TPM_RETURNCMD, pt.x, pt.y, 0, hwndParent, nullptr);
+ selection = TrackPopupMenu(GetSubMenu(PluginConfig.g_hMenuContext, 8), TPM_RETURNCMD, pt.x, pt.y, 0, hwndParent, nullptr);
switch (selection) {
case ID_SPLITTERCONTEXT_SAVEFORTHISCONTACTONLY:
@@ -579,7 +579,6 @@ CSrmmWindow::CSrmmWindow()
m_btnOk.OnClick = Callback(this, &CSrmmWindow::onClick_Ok);
m_btnAdd.OnClick = Callback(this, &CSrmmWindow::onClick_Add);
m_btnQuote.OnClick = Callback(this, &CSrmmWindow::onClick_Quote);
- m_btnColor.OnClick = Callback(this, &CSrmmWindow::onClick_Color);
m_btnCancelAdd.OnClick = Callback(this, &CSrmmWindow::onClick_CancelAdd);
m_message.OnChange = Callback(this, &CSrmmWindow::onChange_Message);
@@ -1183,42 +1182,6 @@ void CSrmmWindow::onClick_Add(CCtrlButton*)
}
}
-void CSrmmWindow::onClick_Color(CCtrlButton *pButton)
-{
- CHARFORMAT2 cf;
- ZeroMemory(&cf, sizeof(CHARFORMAT2));
- cf.cbSize = sizeof(CHARFORMAT2);
- cf.dwMask = CFM_COLOR;
- cf.dwEffects = 0;
-
- RECT rc;
- GetWindowRect(pButton->GetHwnd(), &rc);
- int iSelection = TrackPopupMenu(GetSubMenu(PluginConfig.g_hMenuContext, 7), TPM_RETURNCMD, rc.left, rc.bottom, 0, m_hwnd, nullptr);
- if (iSelection == ID_FONT_CLEARALLFORMATTING) {
- cf.dwMask = CFM_BOLD | CFM_COLOR | CFM_ITALIC | CFM_UNDERLINE | CFM_STRIKEOUT;
- cf.crTextColor = M.GetDword(FONTMODULE, "Font16Col", 0);
- m_message.SendMsg(EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
- return;
- }
-
- if (iSelection == ID_FONT_DEFAULTCOLOR) {
- cf.crTextColor = M.GetDword(FONTMODULE, "Font16Col", 0);
- for (int i = 0; i < Utils::rtf_clrs.getCount(); i++)
- if (Utils::rtf_clrs[i].clr == cf.crTextColor)
- cf.crTextColor = RGB(GetRValue(cf.crTextColor), GetGValue(cf.crTextColor), GetBValue(cf.crTextColor) == 0 ? GetBValue(cf.crTextColor) + 1 : GetBValue(cf.crTextColor) - 1);
-
- m_message.SendMsg(EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
- return;
- }
-
- for (int i = 0; i < RTF_CTABLE_DEFSIZE; i++) {
- if (Utils::rtf_clrs[i].menuid == iSelection) {
- cf.crTextColor = Utils::rtf_clrs[i].clr;
- m_message.SendMsg(EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
- }
- }
-}
-
void CSrmmWindow::onClick_Quote(CCtrlButton*)
{
CHARRANGE sel;
@@ -2835,7 +2798,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
case WM_DRAWITEM:
- return MsgWindowDrawHandler(wParam, lParam);
+ return MsgWindowDrawHandler((DRAWITEMSTRUCT*)lParam);
case WM_APPCOMMAND:
{