summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Nudge/src/main.cpp5
-rw-r--r--plugins/Nudge/src/stdafx.h1
-rw-r--r--plugins/TabSRMM/res/resource.rc2
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp5
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp1
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp3
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp9
-rw-r--r--plugins/TabSRMM/src/msgs.h2
-rw-r--r--plugins/TabSRMM/src/resource.h1
9 files changed, 5 insertions, 24 deletions
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index 721eb3e520..d0f6943aed 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -248,6 +248,9 @@ static int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam)
static int TabsrmmButtonInit(WPARAM, LPARAM)
{
+ HOTKEYDESC hkd = { "srmm_nudge", LPGEN("Send nudge"), BB_HK_SECTION, 0, HOTKEYCODE(HOTKEYF_CONTROL, 'N'), LPARAM(hInst) };
+ Hotkey_Register(&hkd);
+
BBButton bbd = {};
bbd.pszModuleName = "Nudge";
bbd.pwszTooltip = LPGENW("Send Nudge");
@@ -255,8 +258,8 @@ static int TabsrmmButtonInit(WPARAM, LPARAM)
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_CANBEHIDDEN;
bbd.hIcon = iconList[0].hIcolib;
bbd.dwButtonID = 6000;
+ bbd.pszHotkey = hkd.pszName;
Srmm_AddButton(&bbd);
-
return 0;
}
diff --git a/plugins/Nudge/src/stdafx.h b/plugins/Nudge/src/stdafx.h
index 4ecefe6d34..db45931958 100644
--- a/plugins/Nudge/src/stdafx.h
+++ b/plugins/Nudge/src/stdafx.h
@@ -13,6 +13,7 @@
#include <m_popup.h>
#include <m_message.h>
#include <m_ignore.h>
+#include <m_hotkeys.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_database.h>
diff --git a/plugins/TabSRMM/res/resource.rc b/plugins/TabSRMM/res/resource.rc
index 5035997a5a..1347eb1094 100644
--- a/plugins/TabSRMM/res/resource.rc
+++ b/plugins/TabSRMM/res/resource.rc
@@ -763,8 +763,6 @@ BEGIN
MENUITEM "Send &later", ID_SENDMENU_SENDLATER
MENUITEM SEPARATOR
MENUITEM "Send unsafe (ignore timeouts)", ID_SENDMENU_SENDWITHOUTTIMEOUTS
- MENUITEM SEPARATOR
- MENUITEM "Send nudge", ID_SENDMENU_SENDNUDGE
END
POPUP "Protomenu"
BEGIN
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index e65ac89e63..3aaf459a05 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -367,8 +367,6 @@ LRESULT CTabBaseDlg::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPar
CheckMenuItem(submenu, ID_SENDMENU_SENDLATER, MF_BYCOMMAND | (m_sendMode & SMODE_SENDLATER ? MF_CHECKED : MF_UNCHECKED));
CheckMenuItem(submenu, ID_SENDMENU_SENDWITHOUTTIMEOUTS, MF_BYCOMMAND | (m_sendMode & SMODE_NOACK ? MF_CHECKED : MF_UNCHECKED));
- EnableMenuItem(submenu, ID_SENDMENU_SENDNUDGE, MF_BYCOMMAND | ((ProtoServiceExists(m_cache->getActiveProto(), PS_SEND_NUDGE) && ServiceExists(MS_NUDGE_SEND)) ? MF_ENABLED : MF_GRAYED));
-
if (lParam)
iSelection = TrackPopupMenu(submenu, TPM_RETURNCMD, rc.left, rc.bottom, 0, m_hwnd, nullptr);
else
@@ -382,9 +380,6 @@ LRESULT CTabBaseDlg::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPar
else if (IsWindow(GetDlgItem(m_hwnd, IDC_CLIST)))
DestroyWindow(GetDlgItem(m_hwnd, IDC_CLIST));
break;
- case ID_SENDMENU_SENDNUDGE:
- SendNudge();
- break;
case ID_SENDMENU_SENDDEFAULT:
m_sendMode = 0;
break;
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index 914b0d89c7..10d092cb5e 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -44,7 +44,6 @@ static HOTKEYDESC _hotkeydescs[] = {
{ "tabsrmm_paste_and_send", LPGEN("Paste and send"), TABSRMM_HK_SECTION_GENERIC, 0, HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'D'), TABSRMM_HK_PASTEANDSEND },
{ "tabsrmm_uprefs", LPGEN("Contact's messaging preferences"), TABSRMM_HK_SECTION_IM, 0, HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'C'), TABSRMM_HK_SETUSERPREFS },
{ "tabsrmm_copts", LPGEN("Container options"), TABSRMM_HK_SECTION_GENERIC, 0, HOTKEYCODE(HOTKEYF_CONTROL, 'O'), TABSRMM_HK_CONTAINEROPTIONS },
- { "tabsrmm_nudge", LPGEN("Send nudge"), TABSRMM_HK_SECTION_IM, 0, HOTKEYCODE(HOTKEYF_CONTROL, 'N'), TABSRMM_HK_NUDGE },
{ "tabsrmm_sendfile", LPGEN("Send a file"), TABSRMM_HK_SECTION_IM, 0, HOTKEYCODE(HOTKEYF_ALT, 'F'), TABSRMM_HK_SENDFILE },
{ "tabsrmm_quote", LPGEN("Quote message"), TABSRMM_HK_SECTION_IM, 0, HOTKEYCODE(HOTKEYF_ALT, 'Q'), TABSRMM_HK_QUOTEMSG },
{ "tabsrmm_sendlater", LPGEN("Toggle send later"), TABSRMM_HK_SECTION_IM, 0, HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'S'), TABSRMM_HK_TOGGLESENDLATER },
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 298fc77b1b..9dd5412534 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -1553,9 +1553,6 @@ int CSrmmWindow::OnFilter(MSGFILTER *pFilter)
case TABSRMM_HK_SETUSERPREFS:
CallService(MS_TABMSG_SETUSERPREFS, m_hContact, 0);
return _dlgReturn(m_hwnd, 1);
- case TABSRMM_HK_NUDGE:
- SendNudge();
- return _dlgReturn(m_hwnd, 1);
case TABSRMM_HK_SENDFILE:
CallService(MS_FILE_SENDFILE, m_hContact, 0);
return _dlgReturn(m_hwnd, 1);
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 9800e43e42..6447692995 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -1621,15 +1621,6 @@ void CTabBaseDlg::EnableSending(bool bMode) const
EnableSendButton(bMode);
}
-void CTabBaseDlg::SendNudge() const
-{
- if (ProtoServiceExists(m_cache->getActiveProto(), PS_SEND_NUDGE) && ServiceExists(MS_NUDGE_SEND))
- CallService(MS_NUDGE_SEND, m_cache->getActiveContact(), 0);
- else
- SendMessage(m_hwnd, DM_ACTIVATETOOLTIP, IDC_SRMM_MESSAGE,
- (LPARAM)TranslateT("Either the nudge plugin is not installed or the contact's protocol does not support sending a nudge event."));
-}
-
void CTabBaseDlg::GetClientIcon()
{
if (m_hClientIcon)
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index 96950956d3..2382d0fe86 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -435,7 +435,6 @@ public:
void PlayIncomingSound() const;
void SendHBitmapAsFile(HBITMAP hbmp) const;
void SaveSplitter();
- void SendNudge() const;
void SetDialogToType();
void SetMessageLog();
void ShowPicture(bool showNewPic);
@@ -1022,7 +1021,6 @@ struct SIDEBARITEM {
#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
diff --git a/plugins/TabSRMM/src/resource.h b/plugins/TabSRMM/src/resource.h
index 7bb37ca28b..a5f3c241d5 100644
--- a/plugins/TabSRMM/src/resource.h
+++ b/plugins/TabSRMM/src/resource.h
@@ -737,7 +737,6 @@
#define ID_PANELPICMENU_RESETTHEAVATAR 40218
#define ID_EDITOR_PASTEANDSENDIMMEDIATELY 40221
#define ID_HELP_ABOUTTABSRMM 40223
-#define ID_SENDMENU_SENDNUDGE 40228
#define ID_SPLITTERCONTEXT_SAVEGLOBALFORALLSESSIONS 40229
#define ID_SPLITTERCONTEXT_SAVEFORTHISCONTACTONLY 40230
#define ID_SPLITTERCONTEXT_FORGETTHECHANGES 40231