diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 16 | ||||
-rw-r--r-- | plugins/TabSRMM/src/controls.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 4 |
3 files changed, 19 insertions, 3 deletions
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index f0184f719e..e509d05ed1 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -3203,6 +3203,22 @@ LABEL_SHOWWINDOW: cf.dwEffects |= CFE_UNDERLINE; SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf); + break; + + case IDC_SELFTYPING: + // Typing support for GCW_PRIVMESS sessions + if (si->iType == GCW_PRIVMESS) { + if (dat->hContact) { + int iCurrentTypingMode = db_get_b(dat->hContact, SRMSGMOD, SRMSGSET_TYPING, M.GetByte(SRMSGMOD, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW)); + + if (dat->nTypeMode == PROTOTYPE_SELFTYPING_ON && iCurrentTypingMode) { + DM_NotifyTyping(dat, PROTOTYPE_SELFTYPING_OFF); + dat->nTypeMode = PROTOTYPE_SELFTYPING_OFF; + } + db_set_b(dat->hContact, SRMSGMOD, SRMSGSET_TYPING, (BYTE)!iCurrentTypingMode); + } + } + break; } break; diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp index 2e99b8f7bc..4980784fc4 100644 --- a/plugins/TabSRMM/src/controls.cpp +++ b/plugins/TabSRMM/src/controls.cpp @@ -1013,7 +1013,7 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR mir_sntprintf(wBuf, SIZEOF(wBuf), TranslateT("Sounds are %s. Click to toggle status, hold SHIFT and click to set for all open containers"),
pContainer->dwFlags & CNT_NOSOUND ? TranslateT("disabled") : TranslateT("enabled"));
- else if (sid->dwId == MSG_ICON_UTN && dat && dat->bType == SESSIONTYPE_IM) {
+ else if (sid->dwId == MSG_ICON_UTN && dat && (dat->bType == SESSIONTYPE_IM || dat->si->iType == GCW_PRIVMESS)) {
int mtnStatus = db_get_b(dat->hContact, SRMSGMOD, SRMSGSET_TYPING, M.GetByte(SRMSGMOD, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW));
mir_sntprintf(wBuf, SIZEOF(wBuf), TranslateT("Sending typing notifications is %s."),
mtnStatus ? TranslateT("enabled") : TranslateT("disabled"));
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index fc91c4e0a0..7b23100b3c 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -1952,7 +1952,7 @@ void DrawStatusIcons(TWindowData *dat, HDC hDC, RECT r, int gap) cx_icon, cy_icon, 0, NULL, DI_NORMAL); } else if (si->dwId == MSG_ICON_UTN) { - if (dat->bType == SESSIONTYPE_IM) { + if (dat->bType == SESSIONTYPE_IM || dat->si->iType == GCW_PRIVMESS) { DrawIconEx(hDC, x, y, PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING], cx_icon, cy_icon, 0, NULL, DI_NORMAL); DrawIconEx(hDC, x, y, db_get_b(dat->hContact, SRMSGMOD, SRMSGSET_TYPING, M.GetByte(SRMSGMOD, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW)) ? @@ -2007,7 +2007,7 @@ void SI_CheckStatusIconClick(TWindowData *dat, HWND hwndFrom, POINT pt, RECT r, InvalidateRect(dat->pContainer->hwndStatus, NULL, TRUE); } } - else if (si->dwId == MSG_ICON_UTN && code != NM_RCLICK && dat->bType == SESSIONTYPE_IM) { + else if (si->dwId == MSG_ICON_UTN && code != NM_RCLICK && (dat->bType == SESSIONTYPE_IM || dat->si->iType == GCW_PRIVMESS)) { SendMessage(dat->pContainer->hwndActive, WM_COMMAND, IDC_SELFTYPING, 0); InvalidateRect(dat->pContainer->hwndStatus, NULL, TRUE); } |