diff options
author | George Hazan <george.hazan@gmail.com> | 2024-10-24 18:07:19 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-10-24 18:07:19 +0300 |
commit | 1dc3cf591258453a282785335fa8107663d4811b (patch) | |
tree | fa49c417e5c5973ede0bb4f09c7bd7941521281f | |
parent | 6927078455e017dac4b274e5aaee99ed9ce93109 (diff) |
fixes #4758 (StdMsg/Scriver: добавить кнопку "зачеркнутый текст")
-rw-r--r-- | include/m_srmm_int.h | 2 | ||||
-rw-r--r-- | plugins/Scriver/res/chat/strike.ico | bin | 0 -> 1150 bytes | |||
-rw-r--r-- | plugins/Scriver/res/resource.rc | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/globals.cpp | 17 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.cpp | 11 | ||||
-rw-r--r-- | plugins/Scriver/src/resource.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/buttonsbar.cpp | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 2 | ||||
-rw-r--r-- | src/core/stdmsg/res/resource.rc | 2 | ||||
-rw-r--r-- | src/core/stdmsg/res/strike.ico | bin | 0 -> 1150 bytes | |||
-rw-r--r-- | src/core/stdmsg/src/chat_options.cpp | 1 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 11 | ||||
-rw-r--r-- | src/core/stdmsg/src/resource.h | 1 | ||||
-rw-r--r-- | src/mir_app/src/srmm_base.cpp | 7 |
15 files changed, 42 insertions, 19 deletions
diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h index d860704cac..2c2bc53c5a 100644 --- a/include/m_srmm_int.h +++ b/include/m_srmm_int.h @@ -331,7 +331,7 @@ protected: CCtrlMButton m_btnCloseQuote;
CCtrlButton m_btnColor, m_btnBkColor, m_btnOk;
- CCtrlButton m_btnBold, m_btnItalic, m_btnUnderline;
+ CCtrlButton m_btnBold, m_btnItalic, m_btnUnderline, m_btnStrikeout;
CCtrlButton m_btnHistory, m_btnChannelMgr, m_btnNickList, m_btnFilter;
void onClick_BIU(CCtrlButton *);
diff --git a/plugins/Scriver/res/chat/strike.ico b/plugins/Scriver/res/chat/strike.ico Binary files differnew file mode 100644 index 0000000000..6cd770f384 --- /dev/null +++ b/plugins/Scriver/res/chat/strike.ico diff --git a/plugins/Scriver/res/resource.rc b/plugins/Scriver/res/resource.rc index 487a396b6e..eaff37e35c 100644 --- a/plugins/Scriver/res/resource.rc +++ b/plugins/Scriver/res/resource.rc @@ -456,6 +456,8 @@ IDI_BBOLD ICON "chat/bold.ico" IDI_BITALICS ICON "chat/italic.ico"
+IDI_STRIKEOUT ICON "chat/strike.ico"
+
IDI_JOIN ICON "chat/join.ico"
IDI_TOPIC ICON "chat/topic.ico"
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index a6e7023f36..aa9966bcbe 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -52,14 +52,15 @@ static IconItem iconList2[] = { LPGEN("Bold"), "bold", IDI_BBOLD }, // 4
{ LPGEN("Italics"), "italics", IDI_BITALICS }, // 5
{ LPGEN("Underlined"), "underline", IDI_BUNDERLINE }, // 6
- { LPGEN("Smiley button"), "smiley", IDI_SMILEY }, // 7
- { LPGEN("Room history"), "history", IDI_HISTORY }, // 8
- { LPGEN("Room settings"), "settings", IDI_TOPICBUT }, // 9
- { LPGEN("Event filter disabled"), "filter", IDI_FILTER }, // 10
- { LPGEN("Event filter enabled"), "filter2", IDI_FILTER2 }, // 11
- { LPGEN("Hide nick list"), "nicklist", IDI_NICKLIST }, // 12
- { LPGEN("Show nick list"), "nicklist2", IDI_NICKLIST2 }, // 13
- { LPGEN("Icon overlay"), "overlay", IDI_OVERLAY }, // 14
+ { LPGEN("Strike through"), "strikeout", IDI_STRIKEOUT }, // 7
+ { LPGEN("Smiley button"), "smiley", IDI_SMILEY }, // 8
+ { LPGEN("Room history"), "history", IDI_HISTORY }, // 9
+ { LPGEN("Room settings"), "settings", IDI_TOPICBUT }, // 10
+ { LPGEN("Event filter disabled"), "filter", IDI_FILTER }, // 11
+ { LPGEN("Event filter enabled"), "filter2", IDI_FILTER2 }, // 12
+ { LPGEN("Hide nick list"), "nicklist", IDI_NICKLIST }, // 13
+ { LPGEN("Show nick list"), "nicklist2", IDI_NICKLIST2 }, // 14
+ { LPGEN("Icon overlay"), "overlay", IDI_OVERLAY }, // 15
};
static IconItem iconList3[] =
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 7414955646..ee34ee0b91 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -417,15 +417,22 @@ int RegisterToolbarIcons(WPARAM, LPARAM) bbd.pwszTooltip = LPGENW("Make the text underlined (Ctrl+U)");
g_plugin.addButton(&bbd);
- bbd.dwButtonID = IDC_SRMM_COLOR;
+ bbd.dwButtonID = IDC_SRMM_STRIKEOUT;
bbd.dwDefPos = 25;
+ bbd.hIcon = g_plugin.getIconHandle(IDI_STRIKEOUT);
+ bbd.pwszText = LPGENW("&Strike-through ");
+ bbd.pwszTooltip = LPGENW("Make the text strike-through");
+ g_plugin.addButton(&bbd);
+
+ bbd.dwButtonID = IDC_SRMM_COLOR;
+ bbd.dwDefPos = 30;
bbd.hIcon = g_plugin.getIconHandle(IDI_COLOR);
bbd.pwszText = LPGENW("&Color");
bbd.pwszTooltip = LPGENW("Select a foreground color for the text (Ctrl+K)");
g_plugin.addButton(&bbd);
bbd.dwButtonID = IDC_SRMM_BKGCOLOR;
- bbd.dwDefPos = 30;
+ bbd.dwDefPos = 35;
bbd.hIcon = g_plugin.getIconHandle(IDI_BKGCOLOR);
bbd.pwszText = LPGENW("&Background color");
bbd.pwszTooltip = LPGENW("Select a background color for the text (Ctrl+L)");
diff --git a/plugins/Scriver/src/resource.h b/plugins/Scriver/src/resource.h index 9fc3b2e7dc..7b8c990c7f 100644 --- a/plugins/Scriver/src/resource.h +++ b/plugins/Scriver/src/resource.h @@ -43,6 +43,7 @@ #define IDI_BUNDERLINE 420
#define IDI_BBOLD 421
#define IDI_BITALICS 422
+#define IDI_STRIKEOUT 423
#define IDI_TOPICBUT 424
#define IDI_BKGCOLOR 425
#define IDI_CHANMGR 426
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index 95a49fe61b..7d1a1bcebe 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -39,7 +39,6 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM) bbd.pwszTooltip = LPGENW("Underlined text"); g_plugin.addButton(&bbd); - bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISPUSHBUTTON | BBBF_CANBEHIDDEN | BBBF_CREATEBYID | BBBF_NOREADONLY; bbd.dwButtonID = IDC_SRMM_STRIKEOUT; bbd.dwDefPos = 70; bbd.hIcon = g_plugin.getIconHandle(IDI_STRIKEOUT); diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 2a1f028379..794c4078a3 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -325,8 +325,7 @@ CMsgDialog::CMsgDialog(int iDlgId, MCONTACT hContact) : timerAwayMsg(this, 100),
m_btnAdd(this, IDC_ADD),
m_btnQuote(this, IDC_QUOTE),
- m_btnCancelAdd(this, IDC_CANCELADD),
- m_btnStrikeout(this, IDC_SRMM_STRIKEOUT)
+ m_btnCancelAdd(this, IDC_CANCELADD)
{
m_hContact = hContact;
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index b1c30b00c5..e734f5f30e 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -550,7 +550,7 @@ public: SESSION_INFO *m_pLastSession;
CTimer timerAwayMsg;
- CCtrlButton m_btnAdd, m_btnQuote, m_btnCancelAdd, m_btnStrikeout;
+ CCtrlButton m_btnAdd, m_btnQuote, m_btnCancelAdd;
public:
CMsgDialog(int dlgId, MCONTACT hContact);
diff --git a/src/core/stdmsg/res/resource.rc b/src/core/stdmsg/res/resource.rc index 33682f7e14..e5f80a1d86 100644 --- a/src/core/stdmsg/res/resource.rc +++ b/src/core/stdmsg/res/resource.rc @@ -357,6 +357,8 @@ IDI_BBOLD ICON "bold.ico" IDI_BITALICS ICON "italics.ico"
+IDI_STRIKEOUT ICON "strike.ico"
+
IDI_BSMILEY ICON "smiley.ico"
IDI_JOIN ICON "join.ico"
diff --git a/src/core/stdmsg/res/strike.ico b/src/core/stdmsg/res/strike.ico Binary files differnew file mode 100644 index 0000000000..6cd770f384 --- /dev/null +++ b/src/core/stdmsg/res/strike.ico diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp index 9755a3218c..836498c2fb 100644 --- a/src/core/stdmsg/src/chat_options.cpp +++ b/src/core/stdmsg/src/chat_options.cpp @@ -31,6 +31,7 @@ static IconItem iconList1[] = { LPGEN("Bold"), "bold", IDI_BBOLD }, { LPGEN("Italics"), "italics", IDI_BITALICS }, { LPGEN("Underlined"), "underline", IDI_BUNDERLINE }, + { LPGEN("Strike through"), "strikeout", IDI_STRIKEOUT }, { LPGEN("Smiley button"), "smiley", IDI_BSMILEY }, { LPGEN("Room history"), "history", IDI_HISTORY }, { LPGEN("Room settings"), "settings", IDI_TOPICBUT }, diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index b4583d9020..63a4da05b4 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -377,15 +377,22 @@ int RegisterToolbarIcons(WPARAM, LPARAM) bbd.pwszTooltip = LPGENW("Make the text underlined (Ctrl+U)");
g_plugin.addButton(&bbd);
- bbd.dwButtonID = IDC_SRMM_COLOR;
+ bbd.dwButtonID = IDC_SRMM_STRIKEOUT;
bbd.dwDefPos = 25;
+ bbd.hIcon = g_plugin.getIconHandle(IDI_STRIKEOUT);
+ bbd.pwszText = LPGENW("&Strike-through ");
+ bbd.pwszTooltip = LPGENW("Make the text strike-through");
+ g_plugin.addButton(&bbd);
+
+ bbd.dwButtonID = IDC_SRMM_COLOR;
+ bbd.dwDefPos = 30;
bbd.hIcon = g_plugin.getIconHandle(IDI_COLOR);
bbd.pwszText = LPGENW("&Color");
bbd.pwszTooltip = LPGENW("Select a foreground color for the text (Ctrl+K)");
g_plugin.addButton(&bbd);
bbd.dwButtonID = IDC_SRMM_BKGCOLOR;
- bbd.dwDefPos = 30;
+ bbd.dwDefPos = 35;
bbd.hIcon = g_plugin.getIconHandle(IDI_BKGCOLOR);
bbd.pwszText = LPGENW("&Background color");
bbd.pwszTooltip = LPGENW("Select a background color for the text (Ctrl+L)");
diff --git a/src/core/stdmsg/src/resource.h b/src/core/stdmsg/src/resource.h index 8e5b4ea0d7..f5de2ae35b 100644 --- a/src/core/stdmsg/src/resource.h +++ b/src/core/stdmsg/src/resource.h @@ -10,6 +10,7 @@ #define IDD_CONTAINER 107
#define IDD_OPT_TABS 108
#define IDD_OPT_MSGHIST 109
+#define IDI_STRIKEOUT 110
#define IDI_BUNDERLINE 120
#define IDI_BBOLD 121
#define IDI_BITALICS 122
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp index aa286bd762..4c6d621b80 100644 --- a/src/mir_app/src/srmm_base.cpp +++ b/src/mir_app/src/srmm_base.cpp @@ -48,6 +48,7 @@ CSrmmBaseDialog::CSrmmBaseDialog(CMPluginBase &pPlugin, int idDialog, MCONTACT h m_btnItalic(this, IDC_SRMM_ITALICS),
m_btnUnderline(this, IDC_SRMM_UNDERLINE),
+ m_btnStrikeout(this, IDC_SRMM_STRIKEOUT),
m_Quote(this, IDC_SRMM_QUOTE),
m_btnCloseQuote(this, IDC_SRMM_CLOSEQUOTE, SKINICON_OTHER_DELETE, LPGEN("Remove quoting")),
@@ -58,7 +59,7 @@ CSrmmBaseDialog::CSrmmBaseDialog(CMPluginBase &pPlugin, int idDialog, MCONTACT h {
m_btnColor.OnClick = Callback(this, &CSrmmBaseDialog::onClick_Color);
m_btnBkColor.OnClick = Callback(this, &CSrmmBaseDialog::onClick_BkColor);
- m_btnBold.OnClick = m_btnItalic.OnClick = m_btnUnderline.OnClick = Callback(this, &CSrmmBaseDialog::onClick_BIU);
+ m_btnBold.OnClick = m_btnItalic.OnClick = m_btnUnderline.OnClick = m_btnStrikeout.OnClick = Callback(this, &CSrmmBaseDialog::onClick_BIU);
m_btnHistory.OnClick = Callback(this, &CSrmmBaseDialog::onClick_History);
m_btnChannelMgr.OnClick = Callback(this, &CSrmmBaseDialog::onClick_ChanMgr);
@@ -960,7 +961,7 @@ void CSrmmBaseDialog::onClick_BIU(CCtrlButton *pButton) CHARFORMAT2 cf;
cf.cbSize = sizeof(CHARFORMAT2);
- cf.dwMask = CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE;
+ cf.dwMask = CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_STRIKEOUT;
cf.dwEffects = 0;
if (IsDlgButtonChecked(m_hwnd, IDC_SRMM_BOLD))
@@ -969,6 +970,8 @@ void CSrmmBaseDialog::onClick_BIU(CCtrlButton *pButton) cf.dwEffects |= CFE_ITALIC;
if (IsDlgButtonChecked(m_hwnd, IDC_SRMM_UNDERLINE))
cf.dwEffects |= CFE_UNDERLINE;
+ if (IsDlgButtonChecked(m_hwnd, IDC_SRMM_STRIKEOUT))
+ cf.dwEffects |= CFM_STRIKEOUT;
m_message.SendMsg(EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
}
|