diff options
author | George Hazan <george.hazan@gmail.com> | 2016-05-11 20:46:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-05-11 20:46:18 +0000 |
commit | ba62eab90e0ff7741dfb2c6ad0be83521ac518df (patch) | |
tree | cff95a49cdd4b140e543f436703ace1fd3eb5be0 /plugins | |
parent | 0c978ce1b09bbb96c96a987eab1a0ae52d2ae014 (diff) |
smiley button also removed from chat window in Scriver
git-svn-id: http://svn.miranda-ng.org/main/trunk@16819 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Scriver/res/resource.rc | 1 | ||||
-rw-r--r-- | plugins/Scriver/src/chat/window.cpp | 23 | ||||
-rw-r--r-- | plugins/Scriver/src/resource.h | 1 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/dlgboxsubclass.cpp | 11 |
4 files changed, 8 insertions, 28 deletions
diff --git a/plugins/Scriver/res/resource.rc b/plugins/Scriver/res/resource.rc index 5fcf5bb658..6d0b45a9f1 100644 --- a/plugins/Scriver/res/resource.rc +++ b/plugins/Scriver/res/resource.rc @@ -232,7 +232,6 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
CONTROL "",IDC_CHAT_MESSAGE,"RichEdit50W",WS_VSCROLL | WS_TABSTOP | 0x1144,0,128,127,12,WS_EX_STATICEDGE
- CONTROL "&Emoticons",IDC_CHAT_SMILEY,"MButtonClass",WS_DISABLED | WS_TABSTOP,8,108,15,13,WS_EX_NOACTIVATE | 0x10000000L
CONTROL "&Bold",IDC_CHAT_BOLD,"MButtonClass",WS_DISABLED | WS_TABSTOP,24,108,15,13,WS_EX_NOACTIVATE | 0x10000000L
CONTROL "&Italic",IDC_CHAT_ITALICS,"MButtonClass",WS_DISABLED | WS_TABSTOP,36,108,15,13,WS_EX_NOACTIVATE | 0x10000000L
CONTROL "&Underline",IDC_CHAT_UNDERLINE,"MButtonClass",WS_DISABLED | WS_TABSTOP,52,108,15,13,WS_EX_NOACTIVATE | 0x10000000L
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index 8f4cfbba59..204bfe5c7d 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -27,7 +27,6 @@ static ToolbarButton toolbarButtons[] = { { LPGENT("Underline"), IDC_CHAT_UNDERLINE, 0, 0, 24 },
{ LPGENT("Text color"), IDC_CHAT_COLOR, 0, 0, 24 },
{ LPGENT("Background color"), IDC_CHAT_BKGCOLOR, 0, 0, 24 },
- { LPGENT("Smiley"), IDC_CHAT_SMILEY, 0, 8, 24 },
{ LPGENT("History"), IDC_CHAT_HISTORY, 1, 0, 24 },
{ LPGENT("Filter"), IDC_CHAT_FILTER, 1, 0, 24 },
{ LPGENT("Manager"), IDC_CHAT_CHANMGR, 1, 0, 24 },
@@ -77,7 +76,6 @@ static LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, static void InitButtons(HWND hwndDlg, SESSION_INFO *si)
{
- SendDlgItemMessage(hwndDlg, IDC_CHAT_SMILEY, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetCachedIcon("chat_smiley"));
SendDlgItemMessage(hwndDlg, IDC_CHAT_BOLD, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetCachedIcon("chat_bold"));
SendDlgItemMessage(hwndDlg, IDC_CHAT_ITALICS, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetCachedIcon("chat_italics"));
SendDlgItemMessage(hwndDlg, IDC_CHAT_UNDERLINE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetCachedIcon("chat_underline"));
@@ -89,7 +87,6 @@ static void InitButtons(HWND hwndDlg, SESSION_INFO *si) SendDlgItemMessage(hwndDlg, IDC_CHAT_FILTER, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetCachedIcon(si->bFilterEnabled ? "chat_filter" : "chat_filter2"));
SendDlgItemMessage(hwndDlg, IDOK, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetCachedIcon("scriver_SEND"));
- SendDlgItemMessage(hwndDlg, IDC_CHAT_SMILEY, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_CHAT_BOLD, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_CHAT_ITALICS, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_CHAT_UNDERLINE, BUTTONSETASFLATBTN, TRUE, 0);
@@ -101,7 +98,6 @@ static void InitButtons(HWND hwndDlg, SESSION_INFO *si) SendDlgItemMessage(hwndDlg, IDC_CHAT_FILTER, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDOK, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDC_CHAT_SMILEY, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Insert a smiley"), 0);
SendDlgItemMessage(hwndDlg, IDC_CHAT_BOLD, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Make the text bold (CTRL+B)"), 0);
SendDlgItemMessage(hwndDlg, IDC_CHAT_ITALICS, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Make the text italicized (CTRL+I)"), 0);
SendDlgItemMessage(hwndDlg, IDC_CHAT_UNDERLINE, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Make the text underlined (CTRL+U)"), 0);
@@ -1112,8 +1108,6 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR CallService(MS_IEVIEW_EVENT, 0, (LPARAM)&iee);
}
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHAT_SMILEY), TRUE);
-
SendDlgItemMessage(hwndDlg, IDC_CHAT_LOG, EM_HIDESELECTION, TRUE, 0);
SendMessage(hwndDlg, GC_SETWNDPROPS, 0, 0);
@@ -1748,23 +1742,6 @@ LABEL_SHOWWINDOW: }
break;
- case IDC_CHAT_SMILEY:
- GetWindowRect(GetDlgItem(hwndDlg, IDC_CHAT_SMILEY), &rc);
-
- SMADD_SHOWSEL3 smaddInfo;
- smaddInfo.cbSize = sizeof(SMADD_SHOWSEL3);
- smaddInfo.hwndParent = GetParent(hwndDlg);
- smaddInfo.hwndTarget = GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE);
- smaddInfo.targetMessage = EM_REPLACESEL;
- smaddInfo.targetWParam = TRUE;
- smaddInfo.Protocolname = si->pszModule;
- smaddInfo.Direction = 0;
- smaddInfo.xPosition = rc.left;
- smaddInfo.yPosition = rc.bottom;
- smaddInfo.hContact = si->hContact;
- CallService(MS_SMILEYADD_SHOWSELECTION, 0, (LPARAM)&smaddInfo);
- break;
-
case IDC_CHAT_HISTORY:
if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_CHAT_HISTORY))) {
MODULEINFO *pInfo = pci->MM_FindModule(si->pszModule);
diff --git a/plugins/Scriver/src/resource.h b/plugins/Scriver/src/resource.h index 6a48d04865..bfe983a996 100644 --- a/plugins/Scriver/src/resource.h +++ b/plugins/Scriver/src/resource.h @@ -172,7 +172,6 @@ #define IDC_INPUTLINESSPIN 1648
#define IDC_CHAT_LOG 5005
#define IDC_CHAT_SPLITTERX 5006
-#define IDC_CHAT_SMILEY 5007
#define IDC_CHAT_SPLITTERY 5008
#define IDC_CHAT_MESSAGE 5009
#define IDC_CHAT_BOLD 5010
diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp index 7f8e13779a..2f6663f051 100644 --- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp +++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp @@ -71,13 +71,16 @@ public: RECT CalcSmileyButtonPos(void)
{
RECT rect;
- POINT pt;
-
GetWindowRect(LButton, &rect);
+
+ POINT pt;
pt.y = rect.top;
+ MUUID muidScriver = { 0x84636f78, 0x2057, 0x4302, { 0x8a, 0x65, 0x23, 0xa1, 0x6d, 0x46, 0x84, 0x4c } };
+ int iShift = (IsPluginLoaded(muidScriver)) ? 28 : -28;
+
if ((GetWindowLongPtr(LButton, GWL_STYLE) & WS_VISIBLE) != 0)
- pt.x = rect.left - 28;
+ pt.x = rect.left + iShift;
else
pt.x = rect.left;
@@ -270,6 +273,8 @@ static int MsgDlgHook(WPARAM, LPARAM lParam) msgwnd->REdit = wndEvtData->hwndLog;
msgwnd->MEdit = wndEvtData->hwndInput;
msgwnd->LButton = GetDlgItem(wndEvtData->hwndWindow, MI_IDC_ADD);
+ if (msgwnd->LButton == NULL)
+ msgwnd->LButton = GetDlgItem(wndEvtData->hwndWindow, 5019);
// Get the protocol for this contact to display correct smileys.
char *protonam = GetContactProto(DecodeMetaContact(msgwnd->hContact));
|