summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-06 16:49:28 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-06 16:49:28 +0300
commit4b1fe58efea33f631851e4b715d72814775f3363 (patch)
treee3e0fd1bddddf43f1502d94dc4ccf7a0aebf9c7f /plugins
parent2baf1b9fc764b59f963f94faf01cbed28622717a (diff)
method CSrmmWindow::GetIEViewSelection is used once, therefore inlined
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Scriver/src/msgdialog.cpp21
-rw-r--r--plugins/Scriver/src/msgs.h1
2 files changed, 8 insertions, 14 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 55609342cd..4e066201e7 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -27,15 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define ENTERCLICKTIME 1000 //max time in ms during which a double-tap on enter will cause a send
-wchar_t* CSrmmWindow::GetIEViewSelection()
-{
- IEVIEWEVENT evt = { sizeof(evt) };
- evt.hwnd = m_hwndIeview;
- evt.hContact = m_hContact;
- evt.iType = IEE_GET_SELECTION;
- return mir_wstrdup((wchar_t*)CallService(MS_IEVIEW_EVENT, 0, (LPARAM)&evt));
-}
-
static wchar_t* GetQuotedTextW(wchar_t *text)
{
size_t i, j, l = mir_wstrlen(text);
@@ -1623,10 +1614,14 @@ INT_PTR CSrmmWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
st.codepage = 1200;
wchar_t *buffer = NULL;
- if (m_hwndIeview != NULL)
- buffer = GetIEViewSelection();
- else
- buffer = GetRichEditSelection(m_log.GetHwnd());
+ if (m_hwndIeview != NULL) {
+ IEVIEWEVENT evt = { sizeof(evt) };
+ evt.hwnd = m_hwndIeview;
+ evt.hContact = m_hContact;
+ evt.iType = IEE_GET_SELECTION;
+ buffer = mir_wstrdup((wchar_t*)CallService(MS_IEVIEW_EVENT, 0, (LPARAM)&evt));
+ }
+ else buffer = GetRichEditSelection(m_log.GetHwnd());
if (buffer != NULL) {
wchar_t *quotedBuffer = GetQuotedTextW(buffer);
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h
index 276959c0e8..64f4d6b05d 100644
--- a/plugins/Scriver/src/msgs.h
+++ b/plugins/Scriver/src/msgs.h
@@ -130,7 +130,6 @@ class CSrmmWindow : public CScriverWindow
InfobarWindowData *m_pInfobarData;
void GetContactUniqueId(char *buf, int maxlen);
- wchar_t* GetIEViewSelection();
HICON GetTabIcon();
void GetTitlebarIcon(struct TitleBarData *tbd);
void MessageDialogResize(int w, int h);