summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/stdmsg/res/resource.rc2
-rw-r--r--src/core/stdmsg/res/strike.icobin0 -> 1150 bytes
-rw-r--r--src/core/stdmsg/src/chat_options.cpp1
-rw-r--r--src/core/stdmsg/src/msgs.cpp11
-rw-r--r--src/core/stdmsg/src/resource.h1
-rw-r--r--src/mir_app/src/srmm_base.cpp7
6 files changed, 18 insertions, 4 deletions
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
new file mode 100644
index 0000000000..6cd770f384
--- /dev/null
+++ b/src/core/stdmsg/res/strike.ico
Binary files differ
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);
}