diff options
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/buttonsbar.cpp | 21 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 25 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 28 | ||||
-rw-r--r-- | plugins/TabSRMM/src/hotkeyhandler.cpp | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 19 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 57 | ||||
-rw-r--r-- | plugins/TabSRMM/src/resource.h | 1 |
9 files changed, 28 insertions, 128 deletions
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index 7c39d01b8c..6d08d323cb 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -21,16 +21,6 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM) bbd.pwszTooltip = LPGENW("Info button"); Srmm_AddButton(&bbd); - if (PluginConfig.g_SmileyAddAvail) { - bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_CREATEBYID; - bbd.dwButtonID = IDC_SMILEYBTN; - bbd.iButtonWidth = 0; - bbd.dwDefPos = 30; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[9]; - bbd.pwszTooltip = LPGENW("Insert emoticon"); - Srmm_AddButton(&bbd); - } - bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISPUSHBUTTON | BBBF_CANBEHIDDEN | BBBF_CREATEBYID; bbd.dwButtonID = IDC_FONTBOLD; bbd.dwDefPos = 40; @@ -62,7 +52,6 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM) bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_ISARROWBUTTON | BBBF_CREATEBYID; bbd.dwButtonID = IDOK; bbd.dwDefPos = 10; - bbd.iButtonWidth = 51; bbd.hIcon = PluginConfig.g_buttonBarIconHandles[6]; bbd.pwszTooltip = LPGENW("Send message\nClick dropdown arrow for sending options"); Srmm_AddButton(&bbd); @@ -70,7 +59,6 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM) bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID; bbd.dwButtonID = IDC_SAVE; bbd.dwDefPos = 20; - bbd.iButtonWidth = 0; bbd.hIcon = PluginConfig.g_buttonBarIconHandles[8]; bbd.pwszTooltip = LPGENW("Close session"); Srmm_AddButton(&bbd); @@ -78,7 +66,6 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM) bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID; bbd.dwButtonID = IDC_QUOTE; bbd.dwDefPos = 30; - bbd.iButtonWidth = 0; bbd.hIcon = PluginConfig.g_buttonBarIconHandles[4]; bbd.pwszTooltip = LPGENW("Quote last message OR selected text"); Srmm_AddButton(&bbd); @@ -86,7 +73,6 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM) bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID; bbd.dwButtonID = IDC_TIME; bbd.dwDefPos = 40; - bbd.iButtonWidth = 0; bbd.hIcon = PluginConfig.g_buttonBarIconHandles[2]; bbd.pwszTooltip = LPGENW("Message log options"); Srmm_AddButton(&bbd); @@ -94,7 +80,6 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM) bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID; bbd.dwButtonID = IDC_HISTORY; bbd.dwDefPos = 50; - bbd.iButtonWidth = 0; bbd.hIcon = PluginConfig.g_buttonBarIconHandles[0]; bbd.pwszTooltip = LPGENW("View user's history"); Srmm_AddButton(&bbd); @@ -102,7 +87,6 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM) bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID; bbd.dwButtonID = IDC_PIC; bbd.dwDefPos = 60; - bbd.iButtonWidth = 0; bbd.hIcon = PluginConfig.g_buttonBarIconHandles[7]; bbd.pwszTooltip = LPGENW("Edit user notes"); Srmm_AddButton(&bbd); @@ -112,7 +96,6 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM) bbd.dwButtonID = 1; bbd.pszModuleName = "tb_splitter"; bbd.dwDefPos = 31; - bbd.iButtonWidth = 22; bbd.hIcon = 0; bbd.pwszTooltip = 0; Srmm_AddButton(&bbd); @@ -138,7 +121,6 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM) bbd.bbbFlags = BBBF_ISCHATBUTTON | BBBF_ISPUSHBUTTON | BBBF_CREATEBYID; bbd.dwButtonID = IDC_BKGCOLOR; bbd.dwDefPos = 81; - bbd.iButtonWidth = 22; bbd.hIcon = PluginConfig.g_buttonBarIconHandles[16]; bbd.pwszTooltip = LPGENW("Change background color"); Srmm_AddButton(&bbd); @@ -146,7 +128,6 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM) bbd.bbbFlags = BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID; bbd.dwButtonID = IDC_SHOWNICKLIST; bbd.dwDefPos = 22; - bbd.iButtonWidth = 22; bbd.hIcon = PluginConfig.g_buttonBarIconHandles[19]; bbd.pwszTooltip = LPGENW("Toggle nick list"); Srmm_AddButton(&bbd); @@ -154,7 +135,6 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM) bbd.bbbFlags = BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID; bbd.dwButtonID = IDC_FILTER; bbd.dwDefPos = 24; - bbd.iButtonWidth = 22; bbd.hIcon = PluginConfig.g_buttonBarIconHandles[18]; bbd.pwszTooltip = LPGENW("Event filter - right click to setup, left click to activate/deactivate"); Srmm_AddButton(&bbd); @@ -162,7 +142,6 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM) bbd.bbbFlags = BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID; bbd.dwButtonID = IDC_CHANMGR; bbd.dwDefPos = 33; - bbd.iButtonWidth = 22; bbd.hIcon = PluginConfig.g_buttonBarIconHandles[17]; bbd.pwszTooltip = LPGENW("Channel manager"); Srmm_AddButton(&bbd); diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 423320a909..67d25d9174 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -1647,7 +1647,6 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(3, 3)); SendDlgItemMessage(hwndDlg, IDC_CHAT_LOG, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(3, 3)); dat->Panel->loadHeight(); - Utils::enableDlgControl(hwndDlg, IDC_SMILEYBTN, true); if (PluginConfig.g_hMenuTrayUnread != 0 && dat->hContact != 0 && dat->szProto != NULL) UpdateTrayMenu(0, dat->wStatus, dat->szProto, dat->szStatus, dat->hContact, FALSE); @@ -1712,7 +1711,6 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar case GC_SETWNDPROPS: InitButtons(hwndDlg, si); - ConfigureSmileyButton(dat); SendDlgItemMessage(hwndDlg, IDC_CHAT_LOG, EM_SETBKGNDCOLOR, 0, M.GetDword(FONTMODULE, SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR)); DM_InitRichEdit(dat); @@ -2740,28 +2738,6 @@ LABEL_SHOWWINDOW: } break; - case IDC_SMILEY: - case IDC_SMILEYBTN: - if (lParam == 0) - GetWindowRect(GetDlgItem(hwndDlg, IDC_SMILEYBTN), &rc); - else - GetWindowRect((HWND)lParam, &rc); - { - SMADD_SHOWSEL3 smaddInfo = { sizeof(smaddInfo) }; - 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.top + 24; - smaddInfo.hContact = si->hContact; - smaddInfo.hwndParent = dat->pContainer->hwnd; - if (PluginConfig.g_SmileyAddAvail) - 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); @@ -3217,7 +3193,6 @@ LABEL_SHOWWINDOW: break; case DM_SMILEYOPTIONSCHANGED: - ConfigureSmileyButton(dat); SendMessage(hwndDlg, GC_REDRAWLOG, 0, 1); break; diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index d4d0ee5983..8aeb9d5bcb 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -171,9 +171,6 @@ LRESULT TSAPI DM_GenericHotkeysCheck(MSG *message, TWindowData *dat) dat->Panel->setActive(!dat->Panel->isActive()); dat->Panel->showHide(); return 1; - case TABSRMM_HK_EMOTICONS: - SendMessage(hwndDlg, WM_COMMAND, IDC_SMILEYBTN, 0); - return 1; case TABSRMM_HK_TOGGLETOOLBAR: SendMessage(hwndDlg, WM_COMMAND, IDC_TOGGLETOOLBAR, 0); return 1; @@ -267,31 +264,6 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, T CallService(MS_HISTORY_SHOWCONTACTHISTORY, dat->hContact, 0); break; - case IDC_SMILEYBTN: - if (dat->bShowSmileys && PluginConfig.g_SmileyAddAvail) { - MCONTACT hContact = dat->cache->getActiveContact(); - if (CheckValidSmileyPack(dat->cache->getProto(), hContact) != 0) { - if (lParam == 0) - GetWindowRect(GetDlgItem(hwndDlg, IDC_SMILEYBTN), &rc); - else - GetWindowRect((HWND)lParam, &rc); - - SMADD_SHOWSEL3 smaddInfo = { 0 }; - smaddInfo.cbSize = sizeof(SMADD_SHOWSEL3); - smaddInfo.hwndTarget = GetDlgItem(hwndDlg, IDC_MESSAGE); - smaddInfo.targetMessage = EM_REPLACESEL; - smaddInfo.targetWParam = TRUE; - smaddInfo.Protocolname = const_cast<char *>(dat->cache->getProto()); - smaddInfo.Direction = 0; - smaddInfo.xPosition = rc.left; - smaddInfo.yPosition = rc.top + 24; - smaddInfo.hwndParent = hwndContainer; - smaddInfo.hContact = hContact; - CallService(MS_SMILEYADD_SHOWSELECTION, (WPARAM)hwndContainer, (LPARAM)&smaddInfo); - } - } - break; - case IDC_TIME: submenu = GetSubMenu(PluginConfig.g_hMenuContext, 2); MsgWindowUpdateMenu(dat, submenu, MENU_LOGMENU); diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp index 35233489fd..9425bcb192 100644 --- a/plugins/TabSRMM/src/hotkeyhandler.cpp +++ b/plugins/TabSRMM/src/hotkeyhandler.cpp @@ -50,7 +50,6 @@ static HOTKEYDESC _hotkeydescs[] = { { 0, "tabsrmm_sendlater", LPGEN("Toggle send later"), TABSRMM_HK_SECTION_IM, 0, HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'S'), TABSRMM_HK_TOGGLESENDLATER },
{ 0, "tabsrmm_send", LPGEN("Send message"), TABSRMM_HK_SECTION_GENERIC, 0, 0, TABSRMM_HK_SEND },
- { 0, "tabsrmm_emot", LPGEN("Smiley selector"), TABSRMM_HK_SECTION_GENERIC, 0, HOTKEYCODE(HOTKEYF_ALT, 'E'), TABSRMM_HK_EMOTICONS },
{ 0, "tabsrmm_hist", LPGEN("Show message history"), TABSRMM_HK_SECTION_GENERIC, 0, HOTKEYCODE(HOTKEYF_ALT, 'H'), TABSRMM_HK_HISTORY },
{ 0, "tabsrmm_sendmenu", LPGEN("Show send menu"), TABSRMM_HK_SECTION_IM, 0, HOTKEYCODE(HOTKEYF_CONTROL, 'S'), TABSRMM_HK_SENDMENU },
{ 0, "tabsrmm_protomenu", LPGEN("Show protocol menu"), TABSRMM_HK_SECTION_IM, 0, HOTKEYCODE(HOTKEYF_CONTROL, 'P'), TABSRMM_HK_PROTOMENU },
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index cb92cdf4e0..8a7660a4c1 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -413,8 +413,6 @@ void TSAPI SetDialogToType(HWND hwndDlg) if (!dat->SendFormat)
ShowMultipleControls(hwndDlg, formatControls, _countof(formatControls), SW_HIDE);
- ConfigureSmileyButton(dat);
-
if (dat->pContainer->hwndActive == hwndDlg)
UpdateReadChars(dat);
@@ -2940,7 +2938,6 @@ quote_from_last: break;
case DM_SMILEYOPTIONSCHANGED:
- ConfigureSmileyButton(dat);
SendMessage(hwndDlg, DM_REMAKELOG, 0, 0);
break;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index d07dc77e1b..cbda23fd94 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -1652,25 +1652,6 @@ void TSAPI LoadOverrideTheme(TContainerData *pContainer) LoadThemeDefaults(pContainer);
}
-void TSAPI ConfigureSmileyButton(TWindowData *dat)
-{
- HWND hwndDlg = dat->hwnd;
- int nrSmileys = 0;
- int showToolbar = dat->pContainer->dwFlags & CNT_HIDETOOLBAR ? 0 : 1;
- int iItemID = IDC_SMILEYBTN;
-
- if (PluginConfig.g_SmileyAddAvail) {
- nrSmileys = CheckValidSmileyPack(dat->cache->getActiveProto(), dat->cache->getActiveContact());
- dat->bShowSmileys = true;
- }
-
- if (nrSmileys == 0 || dat->hContact == 0)
- dat->bShowSmileys = false;
-
- Utils::showDlgControl(hwndDlg, iItemID, (dat->bShowSmileys && showToolbar) ? SW_SHOW : SW_HIDE);
- Utils::enableDlgControl(hwndDlg, iItemID, dat->bShowSmileys);
-}
-
HICON TSAPI GetXStatusIcon(const TWindowData *dat)
{
BYTE xStatus = dat->cache->getXStatusId();
diff --git a/plugins/TabSRMM/src/msgdlgutils.h b/plugins/TabSRMM/src/msgdlgutils.h index 0563e33832..1b2e94beb8 100644 --- a/plugins/TabSRMM/src/msgdlgutils.h +++ b/plugins/TabSRMM/src/msgdlgutils.h @@ -63,7 +63,6 @@ void TSAPI HandlePasteAndSend(const TWindowData *dat); int TSAPI MsgWindowDrawHandler(WPARAM wParam, LPARAM lParam, TWindowData *dat);
void TSAPI LoadOverrideTheme(TContainerData *pContainer);
void TSAPI LoadThemeDefaults(TContainerData *pContainer);
-void TSAPI ConfigureSmileyButton(TWindowData *dat);
int TSAPI CutContactName(const wchar_t *szold, wchar_t *sznew, size_t size);
void TSAPI SendNudge(const TWindowData *dat);
void TSAPI EnableSendButton(const TWindowData *dat, int iMode);
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 38911e1741..0f05fc04e6 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -914,35 +914,34 @@ struct TABSRMM_SessionInfo { * core hotkey service ids
*/
-#define TABSRMM_HK_LASTUNREAD 2
-#define TABSRMM_HK_LASTRECENT 4
-#define TABSRMM_HK_PASTEANDSEND 8
-#define TABSRMM_HK_SETUSERPREFS 9
-#define TABSRMM_HK_CONTAINEROPTIONS 10
-#define TABSRMM_HK_NUDGE 11
-#define TABSRMM_HK_SENDFILE 12
-#define TABSRMM_HK_QUOTEMSG 13
-#define TABSRMM_HK_SEND 14
-#define TABSRMM_HK_EMOTICONS 15
-#define TABARMM_HK_TOGGLEINFOPANEL 16
-#define TABSRMM_HK_HISTORY 17
-#define TABSRMM_HK_TOGGLETOOLBAR 18
-#define TABSRMM_HK_TOGGLEMULTISEND 19
-#define TABSRMM_HK_TOGGLERTL 20
-#define TABSRMM_HK_USERMENU 21
-#define TABSRMM_HK_USERDETAILS 22
-#define TABSRMM_HK_TOGGLEINFOPANEL 23
-#define TABSRMM_HK_CLEARLOG 24
-#define TABSRMM_HK_EDITNOTES 25
-#define TABSRMM_HK_TOGGLESENDLATER 26
-#define TABSRMM_HK_TOGGLESIDEBAR 27
-#define TABSRMM_HK_CHANNELMGR 28
-#define TABSRMM_HK_FILTERTOGGLE 29
-#define TABSRMM_HK_LISTTOGGLE 30
-#define TABSRMM_HK_MUC_SHOWSERVER 31
-#define TABSRMM_HK_CLOSE_OTHER 32
-#define TABSRMM_HK_SENDMENU 33
-#define TABSRMM_HK_PROTOMENU 34
+#define TABSRMM_HK_LASTUNREAD 2
+#define TABSRMM_HK_LASTRECENT 4
+#define TABSRMM_HK_PASTEANDSEND 8
+#define TABSRMM_HK_SETUSERPREFS 9
+#define TABSRMM_HK_CONTAINEROPTIONS 10
+#define TABSRMM_HK_NUDGE 11
+#define TABSRMM_HK_SENDFILE 12
+#define TABSRMM_HK_QUOTEMSG 13
+#define TABSRMM_HK_SEND 14
+#define TABARMM_HK_TOGGLEINFOPANEL 16
+#define TABSRMM_HK_HISTORY 17
+#define TABSRMM_HK_TOGGLETOOLBAR 18
+#define TABSRMM_HK_TOGGLEMULTISEND 19
+#define TABSRMM_HK_TOGGLERTL 20
+#define TABSRMM_HK_USERMENU 21
+#define TABSRMM_HK_USERDETAILS 22
+#define TABSRMM_HK_TOGGLEINFOPANEL 23
+#define TABSRMM_HK_CLEARLOG 24
+#define TABSRMM_HK_EDITNOTES 25
+#define TABSRMM_HK_TOGGLESENDLATER 26
+#define TABSRMM_HK_TOGGLESIDEBAR 27
+#define TABSRMM_HK_CHANNELMGR 28
+#define TABSRMM_HK_FILTERTOGGLE 29
+#define TABSRMM_HK_LISTTOGGLE 30
+#define TABSRMM_HK_MUC_SHOWSERVER 31
+#define TABSRMM_HK_CLOSE_OTHER 32
+#define TABSRMM_HK_SENDMENU 33
+#define TABSRMM_HK_PROTOMENU 34
#define TABSRMM_HK_SECTION_IM LPGEN("Message windows - IM")
#define TABSRMM_HK_SECTION_GENERIC LPGEN("Message windows - all")
diff --git a/plugins/TabSRMM/src/resource.h b/plugins/TabSRMM/src/resource.h index 029ae6c4d9..610daca35e 100644 --- a/plugins/TabSRMM/src/resource.h +++ b/plugins/TabSRMM/src/resource.h @@ -179,7 +179,6 @@ #define IDC_DELAY_ERR 1102
#define IDC_RTL 1103
#define IDC_PIC 1104
-#define IDC_SMILEYBTN 1105
#define IDC_FONTBOLD 1106
#define IDC_FONTITALIC 1107
#define IDC_FONTUNDERLINE 1108
|