diff options
author | George Hazan <george.hazan@gmail.com> | 2013-08-14 23:19:55 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-08-14 23:19:55 +0000 |
commit | b74f4d512e0a03263ff30d13990a679f9e580fdb (patch) | |
tree | d01ce2dc72fe34d98c7c6dec7eb11f92ed1e5d44 /plugins/TabSRMM | |
parent | 9cb9726232452d2b2cabf6913770e6f404cab952 (diff) |
- fix for a nasty bug in tabSRMM popup headers;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@5696 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/chat/clist.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/services.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 12 | ||||
-rw-r--r-- | plugins/TabSRMM/src/controls.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/eventpopups.cpp | 122 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 348 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/infopanel.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/mim.cpp | 123 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 26 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msglog.cpp | 24 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgoptions.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/nen.h | 5 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendlater.cpp | 14 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendlater.h | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendqueue.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/taskbar.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/themes.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/typingnotify.cpp | 4 |
22 files changed, 364 insertions, 376 deletions
diff --git a/plugins/TabSRMM/src/chat/clist.cpp b/plugins/TabSRMM/src/chat/clist.cpp index 7667cc7d7a..644fdf2338 100644 --- a/plugins/TabSRMM/src/chat/clist.cpp +++ b/plugins/TabSRMM/src/chat/clist.cpp @@ -68,7 +68,7 @@ HANDLE CList_AddRoom(const char* pszModule, const TCHAR* pszRoom, const TCHAR* p return hContact;
// here we create a new one since no one is to be found
- if ((hContact = (HANDLE) CallService(MS_DB_CONTACT_ADD, 0, 0)) == NULL)
+ if ((hContact = (HANDLE)CallService(MS_DB_CONTACT_ADD, 0, 0)) == NULL)
return NULL;
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)pszModule);
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index 4af30980bb..e346526e08 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -446,7 +446,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT else lstrcpyn(newcontactname, _T("_U_"), SIZEOF(newcontactname));
char *szProto = GetContactProto(newData.hContact);
- WORD wStatus = (szProto == NULL) ? ID_STATUS_OFFLINE : db_get_w((HANDLE) newData.hContact, szProto, "Status", ID_STATUS_OFFLINE);
+ WORD wStatus = (szProto == NULL) ? ID_STATUS_OFFLINE : db_get_w((HANDLE)newData.hContact, szProto, "Status", ID_STATUS_OFFLINE);
char *szStatus = (char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,
(szProto == NULL) ? ID_STATUS_OFFLINE : db_get_w((HANDLE)newData.hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 0627872d04..7ba1c799db 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -260,7 +260,7 @@ static void Chat_UpdateWindowState(TWindowData *dat, UINT msg) }
#if defined(__FEAT_EXP_AUTOSPLITTER)
- if (dat->fIsAutosizingInput && dat->iInputAreaHeight == -1) {
+ if (dat->bIsAutosizingInput && dat->iInputAreaHeight == -1) {
dat->iInputAreaHeight = 0;
SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_REQUESTRESIZE, 0, 0);
}
@@ -402,7 +402,7 @@ static int RoomWndResize(HWND hwndDlg, LPARAM lParam, UTILRESIZECONTROL *urc) GetClientRect(hwndDlg, &rcTabs);
int TabHeight = rcTabs.bottom - rcTabs.top;
- if (dat->fIsAutosizingInput)
+ if (dat->bIsAutosizingInput)
Utils::showDlgControl(hwndDlg, IDC_SPLITTERY, SW_HIDE);
if (si->iType != GCW_SERVER) {
@@ -493,7 +493,7 @@ static int RoomWndResize(HWND hwndDlg, LPARAM lParam, UTILRESIZECONTROL *urc) urc->rcItem.top = urc->dlgNewSize.cy - si->iSplitterY + 3;
urc->rcItem.bottom = urc->dlgNewSize.cy; // - 1 ;
- if (dat->fIsAutosizingInput)
+ if (dat->bIsAutosizingInput)
urc->rcItem.top -= DPISCALEY_S(1);
if (bBottomToolbar && bToolbar)
@@ -1885,7 +1885,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar dat->hwnd = hwndDlg;
si->hWnd = hwndDlg;
si->dat = dat;
- dat->fIsAutosizingInput = IsAutoSplitEnabled(dat);
+ dat->bIsAutosizingInput = IsAutoSplitEnabled(dat);
dat->fLimitedUpdate = false;
dat->iInputAreaHeight = -1;
if (!dat->pContainer->settings->fPrivate)
@@ -1897,7 +1897,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar si->iSplitterY = g_Settings.iSplitterY;
}
#if defined(__FEAT_EXP_AUTOSPLITTER)
- if (dat->fIsAutosizingInput)
+ if (dat->bIsAutosizingInput)
si->iSplitterY = GetDefaultMinimumInputHeight(dat);
#endif
dat->pWnd = 0;
@@ -3590,7 +3590,7 @@ LABEL_SHOWWINDOW: TABSRMM_FireEvent(dat->hContact, hwndDlg, MSG_WINDOW_EVT_CLOSING, 0);
- if (!dat->fIsAutosizingInput)
+ if (!dat->bIsAutosizingInput)
db_set_w(NULL, "Chat", "SplitterX", (WORD)g_Settings.iSplitterX);
if (dat->pContainer->settings->fPrivate && !IsAutoSplitEnabled(dat))
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp index bce477db36..6cd346f2dc 100644 --- a/plugins/TabSRMM/src/controls.cpp +++ b/plugins/TabSRMM/src/controls.cpp @@ -321,8 +321,8 @@ LONG_PTR CMenuBar::customDrawWorker(NMCUSTOMDRAW *nm) (PluginConfig.m_fillColor ? PluginConfig.m_genericTxtColor :
(uState & (CDIS_SELECTED | CDIS_HOT | CDIS_MARKED)) ? ::GetSysColor(COLOR_HIGHLIGHTTEXT) : ::GetSysColor(COLOR_BTNTEXT));
- ::SetBkMode(m_hdcDraw, TRANSPARENT);
- CSkin::RenderText(m_hdcDraw, m_hTheme, szText, &nmtb->nmcd.rc, DT_SINGLELINE | DT_VCENTER | DT_CENTER, CSkin::m_glowSize, clr);
+ ::SetBkMode(m_hdcDraw, TRANSPARENT);
+ CSkin::RenderText(m_hdcDraw, m_hTheme, szText, &nmtb->nmcd.rc, DT_SINGLELINE | DT_VCENTER | DT_CENTER, CSkin::m_glowSize, clr);
}
if (iIndex == 0)
::DrawIconEx(m_hdcDraw, (nmtb->nmcd.rc.left + nmtb->nmcd.rc.right) / 2 - 8,
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index 3664a87b50..d27087dae1 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -401,9 +401,7 @@ static int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATAT* pdata) {
pdata->iActionTaken = TRUE;
if (mask & MASK_OPEN) {
- int i;
-
- for (i=0; i < pdata->nrMerged; i++) {
+ for (int i=0; i < pdata->nrMerged; i++) {
if (pdata->eventData[i].hEvent != 0) {
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_HANDLECLISTEVENT, (WPARAM)pdata->hContact, (LPARAM)pdata->eventData[i].hEvent);
pdata->eventData[i].hEvent = 0;
@@ -411,20 +409,16 @@ static int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATAT* pdata) }
}
if (mask & MASK_REMOVE) {
- int i;
-
- for (i=0; i < pdata->nrMerged; i++) {
+ for (int i=0; i < pdata->nrMerged; i++) {
if (pdata->eventData[i].hEvent != 0) {
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_REMOVECLISTEVENT, (WPARAM)pdata->hContact, (LPARAM)pdata->eventData[i].hEvent);
pdata->eventData[i].hEvent = 0;
}
}
}
- if (mask & MASK_DISMISS)
- {
+ if (mask & MASK_DISMISS) {
PUDeletePopup(hWnd);
- if (pdata->hContainer)
- {
+ if (pdata->hContainer) {
FLASHWINFO fwi = { sizeof(fwi) };
fwi.dwFlags = FLASHW_STOP;
fwi.hwnd = pdata->hContainer;
@@ -589,16 +583,16 @@ static int PopupUpdateT(HANDLE hContact, HANDLE hEvent) TCHAR timestamp[MAX_DATASIZE];
_tcsftime(timestamp, MAX_DATASIZE, _T("%Y.%m.%d %H:%M"), _localtime32((__time32_t *)&dbe.timestamp));
- mir_sntprintf(pdata->eventData[pdata->nrMerged].szText, MAX_SECONDLINE, _T("\n\n%s\n"), timestamp);
+ mir_sntprintf(pdata->eventData[pdata->nrMerged].tszText, MAX_SECONDLINE, _T("\n\n%s\n"), timestamp);
TCHAR *szPreview = GetPreviewT(dbe.eventType, &dbe);
if (szPreview) {
- _tcsncat(pdata->eventData[pdata->nrMerged].szText, szPreview, MAX_SECONDLINE);
+ _tcsncat(pdata->eventData[pdata->nrMerged].tszText, szPreview, MAX_SECONDLINE);
mir_free(szPreview);
}
- else _tcsncat(pdata->eventData[pdata->nrMerged].szText, _T(" "), MAX_SECONDLINE);
+ else _tcsncat(pdata->eventData[pdata->nrMerged].tszText, _T(" "), MAX_SECONDLINE);
- pdata->eventData[pdata->nrMerged].szText[MAX_SECONDLINE - 1] = 0;
+ pdata->eventData[pdata->nrMerged].tszText[MAX_SECONDLINE - 1] = 0;
/*
* now, reassemble the popup text, make sure the *last* event is shown, and then show the most recent events
@@ -611,14 +605,16 @@ static int PopupUpdateT(HANDLE hContact, HANDLE hEvent) _tcsncpy(lpzText, szHeader, MAX_SECONDLINE);
available -= lstrlen(szHeader);
}
+ else lpzText[0] = 0;
+
for (i = pdata->nrMerged; i >= 0; i--) {
- available -= lstrlen(pdata->eventData[i].szText);
+ available -= lstrlen(pdata->eventData[i].tszText);
if (available <= 0)
break;
}
i = (available > 0) ? i + 1 : i + 2;
for (; i <= pdata->nrMerged; i++)
- _tcsncat(lpzText, pdata->eventData[i].szText, MAX_SECONDLINE);
+ _tcsncat(lpzText, pdata->eventData[i].tszText, MAX_SECONDLINE);
pdata->eventData[pdata->nrMerged].hEvent = hEvent;
pdata->eventData[pdata->nrMerged].timestamp = dbe.timestamp;
@@ -688,24 +684,21 @@ static int PopupShowT(NEN_OPTIONS *pluginOptions, HANDLE hContact, HANDLE hEvent if (hContact)
mir_sntprintf(pud.lptzContactName, MAX_CONTACTNAME, _T("%s"), pcli->pfnGetContactDisplayName(hContact, 0));
- else {
- TCHAR *szModule = mir_a2t(dbe.szModule);
- mir_sntprintf(pud.lptzContactName, MAX_CONTACTNAME, _T("%s"), szModule);
- mir_free(szModule);
- }
+ else
+ _tcsncpy_s(pud.lptzContactName, SIZEOF(pud.lptzContactName), _A2T(dbe.szModule), _TRUNCATE);
TCHAR *szPreview = GetPreviewT((WORD)eventType, &dbe);
if (szPreview) {
mir_sntprintf(pud.lptzText, MAX_SECONDLINE, _T("%s"), szPreview);
mir_free(szPreview);
- } else
- mir_sntprintf(pud.lptzText, MAX_SECONDLINE, _T(" "));
+ }
+ else _tcscpy(pud.lptzText, _T(" "));
pdata->eventData = (EVENT_DATAT *)mir_alloc(NR_MERGED * sizeof(EVENT_DATAT));
pdata->eventData[0].hEvent = hEvent;
pdata->eventData[0].timestamp = dbe.timestamp;
- _tcsncpy(pdata->eventData[0].szText, pud.lptzText, MAX_SECONDLINE);
- pdata->eventData[0].szText[MAX_SECONDLINE - 1] = 0;
+ _tcsncpy(pdata->eventData[0].tszText, pud.lptzText, MAX_SECONDLINE);
+ pdata->eventData[0].tszText[MAX_SECONDLINE - 1] = 0;
pdata->nrEventsAlloced = NR_MERGED;
pdata->nrMerged = 1;
@@ -734,38 +727,37 @@ static int TSAPI PopupPreview(NEN_OPTIONS *pluginOptions) */
void TSAPI UpdateTrayMenuState(TWindowData *dat, BOOL bForced)
{
- MENUITEMINFO mii = {0};
- TCHAR szMenuEntry[80];
-
- if (PluginConfig.g_hMenuTrayUnread == 0)
+ if (PluginConfig.g_hMenuTrayUnread == 0 || dat->hContact == NULL)
return;
+ MENUITEMINFO mii = {0};
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_DATA | MIIM_BITMAP;
- if (dat->hContact != 0) {
- const TCHAR *tszProto = dat->cache->getRealAccount();
+ const TCHAR *tszProto = dat->cache->getRealAccount();
+ assert(tszProto != 0);
- assert(tszProto != 0);
+ GetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)dat->hContact, FALSE, &mii);
+ if (!bForced)
+ PluginConfig.m_UnreadInTray -= (mii.dwItemData & 0x0000ffff);
+ if (mii.dwItemData > 0 || bForced) {
+ TCHAR szMenuEntry[80];
+ mir_sntprintf(szMenuEntry, SIZEOF(szMenuEntry), _T("%s: %s (%s) [%d]"), tszProto,
+ dat->cache->getNick(), dat->szStatus[0] ? dat->szStatus : _T("(undef)"), mii.dwItemData & 0x0000ffff);
- GetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)dat->hContact, FALSE, &mii);
if (!bForced)
- PluginConfig.m_UnreadInTray -= (mii.dwItemData & 0x0000ffff);
- if (mii.dwItemData > 0 || bForced) {
- if (!bForced)
- mii.dwItemData = 0;
- mii.fMask |= MIIM_STRING;
- mir_sntprintf(szMenuEntry, SIZEOF(szMenuEntry), _T("%s: %s (%s) [%d]"), tszProto, dat->cache->getNick(), dat->szStatus[0] ? dat->szStatus : _T("(undef)"), mii.dwItemData & 0x0000ffff);
- mii.dwTypeData = (LPTSTR)szMenuEntry;
- mii.cch = lstrlen(szMenuEntry) + 1;
- }
- mii.hbmpItem = HBMMENU_CALLBACK;
- SetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)dat->hContact, FALSE, &mii);
+ mii.dwItemData = 0;
+ mii.fMask |= MIIM_STRING;
+ mii.dwTypeData = (LPTSTR)szMenuEntry;
+ mii.cch = lstrlen(szMenuEntry) + 1;
}
+ mii.hbmpItem = HBMMENU_CALLBACK;
+ SetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)dat->hContact, FALSE, &mii);
}
+
/*
-* if we want tray support, add the contact to the list of unread sessions in the tray menu
-*/
+ * if we want tray support, add the contact to the list of unread sessions in the tray menu
+ */
int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szProto, const TCHAR *szStatus, HANDLE hContact, DWORD fromEvent)
{
@@ -802,7 +794,8 @@ int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szPro if (PluginConfig.m_UnreadInTray)
SetEvent(g_hEvent);
SetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, FALSE, &mii);
- } else {
+ }
+ else {
szNick = pcli->pfnGetContactDisplayName(hContact, 0);
if (CheckMenuItem(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, MF_BYCOMMAND | MF_UNCHECKED) == -1) {
mir_sntprintf(szMenuEntry, SIZEOF(szMenuEntry), _T("%s: %s (%s) [%d]"), tszFinalProto, szNick, szMyStatus, fromEvent ? 1 : 0);
@@ -813,7 +806,8 @@ int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szPro SetEvent(g_hEvent);
if (fromEvent == 2)
mii.dwItemData |= 0x10000000;
- } else {
+ }
+ else {
GetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, FALSE, &mii);
mii.dwItemData += (fromEvent ? 1 : 0);
PluginConfig.m_UnreadInTray += (fromEvent ? 1 : 0);
@@ -832,8 +826,7 @@ int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szPro return 0;
}
-
-int tabSRMM_ShowPopup(WPARAM wParam, LPARAM lParam, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto, TWindowData *dat)
+int tabSRMM_ShowPopup(HANDLE hContact, HANDLE hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto, TWindowData *dat)
{
if (nen_options.iDisable) // no popups at all. Period
return 0;
@@ -848,32 +841,30 @@ int tabSRMM_ShowPopup(WPARAM wParam, LPARAM lParam, WORD eventType, int windowOp */
if (nen_options.dwStatusMask != -1) {
- DWORD dwStatus = 0;
if (szProto != NULL) {
- dwStatus = (DWORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
+ DWORD dwStatus = (DWORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
if (!(dwStatus == 0 || dwStatus <= ID_STATUS_OFFLINE || ((1 << (dwStatus - ID_STATUS_ONLINE)) & nen_options.dwStatusMask))) // should never happen, but...
return 0;
}
}
if (nen_options.bNoRSS && szProto != NULL && !strncmp(szProto, "RSS", 3))
return 0; // filter out RSS popups
- //
+
if (windowOpen && pContainer != 0) { // message window is open, need to check the container config if we want to see a popup nonetheless
if (nen_options.bWindowCheck && windowOpen) // no popups at all for open windows... no exceptions
return 0;
if (pContainer->dwFlags & CNT_DONTREPORT && (IsIconic(pContainer->hwnd))) // in tray counts as "minimised"
goto passed;
- if (pContainer->dwFlags & CNT_DONTREPORTUNFOCUSED) {
+
+ if (pContainer->dwFlags & CNT_DONTREPORTUNFOCUSED)
if (!IsIconic(pContainer->hwnd) && GetForegroundWindow() != pContainer->hwnd && GetActiveWindow() != pContainer->hwnd)
goto passed;
- }
+
if (pContainer->dwFlags & CNT_ALWAYSREPORTINACTIVE) {
if (pContainer->dwFlags & CNT_DONTREPORTFOCUSED)
goto passed;
- if (pContainer->hwndActive == hwndChild)
- return 0;
- else
+ if (pContainer->hwndActive != hwndChild)
goto passed;
}
return 0;
@@ -882,12 +873,11 @@ passed: if ( !PluginConfig.g_PopupAvail)
return 0;
- if (PU_GetByContact((HANDLE)wParam) && nen_options.bMergePopup && eventType == EVENTTYPE_MESSAGE) {
- if (PopupUpdateT((HANDLE)wParam, (HANDLE)lParam) != 0)
- PopupShowT(&nen_options, (HANDLE)wParam, (HANDLE)lParam, (UINT)eventType, pContainer ? pContainer->hwnd : 0);
+ if ( PU_GetByContact(hContact) && nen_options.bMergePopup && eventType == EVENTTYPE_MESSAGE) {
+ if (PopupUpdateT(hContact, hDbEvent) != 0)
+ PopupShowT(&nen_options, hContact, hDbEvent, eventType, pContainer ? pContainer->hwnd : 0);
}
- else
- PopupShowT(&nen_options, (HANDLE)wParam, (HANDLE)lParam, (UINT)eventType, pContainer ? pContainer->hwnd : 0);
+ else PopupShowT(&nen_options, hContact, hDbEvent, eventType, pContainer ? pContainer->hwnd : 0);
return 0;
}
@@ -898,13 +888,11 @@ passed: void TSAPI DeletePopupsForContact(HANDLE hContact, DWORD dwMask)
{
- int i=0;
- PLUGIN_DATAT* _T = 0;
-
if (!(dwMask & nen_options.dwRemoveMask) || nen_options.iDisable || !PluginConfig.g_PopupAvail)
return;
- while ((_T = const_cast<PLUGIN_DATAT *>(PU_GetByContact(hContact))) != 0) {
+ PLUGIN_DATAT *_T = 0;
+ while ((_T = PU_GetByContact(hContact)) != 0) {
_T->hContact = 0; // make sure, it never "comes back"
if (_T->hWnd != 0 && IsWindow(_T->hWnd))
PUDeletePopup(_T->hWnd);
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 0721957573..e8e6105282 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -537,7 +537,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer, break;
}
- if (!dat->fIsAutosizingInput) {
+ if (!dat->bIsAutosizingInput) {
dat->iSplitterSaved = dat->splitterY;
dat->splitterY = rc.bottom / 2;
SendMessage(hwndDlg, WM_SIZE, 1, 1);
@@ -558,7 +558,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer, db_set_ts(dat->hContact, "UserInfo", "MyNotes", buf);
SetDlgItemText(hwndDlg, IDC_MESSAGE, _T(""));
- if (!dat->fIsAutosizingInput) {
+ if (!dat->bIsAutosizingInput) {
dat->splitterY = dat->iSplitterSaved;
SendMessage(hwndDlg, WM_SIZE, 0, 0);
DM_ScrollToBottom(dat, 0, 1);
@@ -1133,7 +1133,7 @@ HWND TSAPI DM_CreateClist(TWindowData *dat) HWND hwndClist = CreateWindowExA(0, "CListControl", "", WS_TABSTOP | WS_VISIBLE | WS_CHILD | 0x248,
184, 0, 30, 30, dat->hwnd, (HMENU)IDC_CLIST, g_hInst, NULL);
SendMessage(hwndClist, WM_TIMER, 14, 0);
- HANDLE hItem = (HANDLE) SendMessage(hwndClist, CLM_FINDCONTACT, (WPARAM)dat->hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndClist, CLM_FINDCONTACT, (WPARAM)dat->hContact, 0);
SetWindowLongPtr(hwndClist, GWL_EXSTYLE, GetWindowLongPtr(hwndClist, GWL_EXSTYLE) & ~CLS_EX_TRACKSELECT);
SetWindowLongPtr(hwndClist, GWL_EXSTYLE, GetWindowLongPtr(hwndClist, GWL_EXSTYLE) | (CLS_EX_NOSMOOTHSCROLLING | CLS_EX_NOTRANSLUCENTSEL));
@@ -1170,6 +1170,7 @@ LRESULT TSAPI DM_MouseWheelHandler(HWND hwnd, HWND hwndParent, TWindowData *mwda GetWindowRect(hwnd, &rc);
if (PtInRect(&rc, pt))
return 1;
+
if (mwdat->pContainer->dwFlags & CNT_SIDEBAR) {
GetWindowRect(GetDlgItem(mwdat->pContainer->hwnd, IDC_SIDEBARUP), &rc);
GetWindowRect(GetDlgItem(mwdat->pContainer->hwnd, IDC_SIDEBARDOWN), &rc1);
@@ -1257,7 +1258,8 @@ LRESULT TSAPI DM_ThemeChanged(TWindowData *dat) SetWindowLongPtr(GetDlgItem(hwnd, IDC_LOG), GWL_EXSTYLE, GetWindowLongPtr(GetDlgItem(hwnd, IDC_LOG), GWL_EXSTYLE) & ~WS_EX_STATICEDGE);
if (dat->hTheme != 0 || (CSkin::m_skinEnabled && !item_msg->IGNORED))
SetWindowLongPtr(GetDlgItem(hwnd, IDC_MESSAGE), GWL_EXSTYLE, GetWindowLongPtr(GetDlgItem(hwnd, IDC_MESSAGE), GWL_EXSTYLE) & ~WS_EX_STATICEDGE);
- } else {
+ }
+ else {
if (dat->hTheme != 0 || (CSkin::m_skinEnabled && !item_log->IGNORED)) {
SetWindowLongPtr(GetDlgItem(hwnd, IDC_CHAT_LOG), GWL_EXSTYLE, GetWindowLongPtr(GetDlgItem(hwnd, IDC_CHAT_LOG), GWL_EXSTYLE) & ~WS_EX_STATICEDGE);
SetWindowLongPtr(GetDlgItem(hwnd, IDC_LIST), GWL_EXSTYLE, GetWindowLongPtr(GetDlgItem(hwnd, IDC_LIST), GWL_EXSTYLE) & ~(WS_EX_CLIENTEDGE | WS_EX_STATICEDGE));
@@ -1436,7 +1438,8 @@ void TSAPI DM_Typing(TWindowData *dat, bool fForceOff) if (!(dat->pContainer->dwFlags & CNT_NOFLASH) && PluginConfig.m_FlashOnMTN)
ReflashContainer(dat->pContainer);
}
- } else if (dat->showTyping == 2) {
+ }
+ else if (dat->showTyping == 2) {
if (dat->nTypeSecs > 0)
dat->nTypeSecs--;
else {
@@ -1445,38 +1448,36 @@ void TSAPI DM_Typing(TWindowData *dat, bool fForceOff) }
UpdateStatusBar(dat);
}
- else {
- if (dat->nTypeSecs > 0) {
- mir_sntprintf(dat->szStatusBar, SIZEOF(dat->szStatusBar), TranslateT("%s is typing a message."), dat->cache->getNick());
+ else if (dat->nTypeSecs > 0) {
+ mir_sntprintf(dat->szStatusBar, SIZEOF(dat->szStatusBar), TranslateT("%s is typing a message."), dat->cache->getNick());
- dat->nTypeSecs--;
- if (hwndStatus && dat->pContainer->hwndActive == hwndDlg) {
- SendMessage(hwndStatus, SB_SETTEXT, 0, (LPARAM)dat->szStatusBar);
- SendMessage(hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
- }
- if (IsIconic(hwndContainer) || GetForegroundWindow() != hwndContainer || GetActiveWindow() != hwndContainer) {
- SetWindowText(hwndContainer, dat->szStatusBar);
- dat->pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
- if (!(dat->pContainer->dwFlags & CNT_NOFLASH) && PluginConfig.m_FlashOnMTN)
- ReflashContainer(dat->pContainer);
- }
+ dat->nTypeSecs--;
+ if (hwndStatus && dat->pContainer->hwndActive == hwndDlg) {
+ SendMessage(hwndStatus, SB_SETTEXT, 0, (LPARAM)dat->szStatusBar);
+ SendMessage(hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
+ }
+ if (IsIconic(hwndContainer) || GetForegroundWindow() != hwndContainer || GetActiveWindow() != hwndContainer) {
+ SetWindowText(hwndContainer, dat->szStatusBar);
+ dat->pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
+ if (!(dat->pContainer->dwFlags & CNT_NOFLASH) && PluginConfig.m_FlashOnMTN)
+ ReflashContainer(dat->pContainer);
+ }
- if (dat->pContainer->hwndActive != hwndDlg) {
- if (dat->mayFlashTab)
- dat->iFlashIcon = PluginConfig.g_IconTypingEvent;
- HandleIconFeedback(dat, PluginConfig.g_IconTypingEvent);
- }
- else { // active tab may show icon if status bar is disabled
- if (!hwndStatus) {
- if (TabCtrl_GetItemCount(GetParent(hwndDlg)) > 1 || !(dat->pContainer->dwFlags & CNT_HIDETABS))
- HandleIconFeedback(dat, PluginConfig.g_IconTypingEvent);
- }
+ if (dat->pContainer->hwndActive != hwndDlg) {
+ if (dat->mayFlashTab)
+ dat->iFlashIcon = PluginConfig.g_IconTypingEvent;
+ HandleIconFeedback(dat, PluginConfig.g_IconTypingEvent);
+ }
+ else { // active tab may show icon if status bar is disabled
+ if (!hwndStatus) {
+ if (TabCtrl_GetItemCount(GetParent(hwndDlg)) > 1 || !(dat->pContainer->dwFlags & CNT_HIDETABS))
+ HandleIconFeedback(dat, PluginConfig.g_IconTypingEvent);
}
- if ((GetForegroundWindow() != hwndContainer) || (dat->pContainer->hwndStatus == 0) || (dat->pContainer->hwndActive != hwndDlg))
- SendMessage(hwndContainer, DM_SETICON, (WPARAM)dat, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
-
- dat->showTyping = 1;
}
+ if ((GetForegroundWindow() != hwndContainer) || (dat->pContainer->hwndStatus == 0) || (dat->pContainer->hwndActive != hwndDlg))
+ SendMessage(hwndContainer, DM_SETICON, (WPARAM)dat, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
+
+ dat->showTyping = 1;
}
}
@@ -1495,7 +1496,7 @@ int TSAPI DM_SplitterGlobalEvent(TWindowData *dat, WPARAM wParam, LPARAM lParam) bool fCntGlobal = (!dat->pContainer->settings->fPrivate ? true : false);
#if defined(__FEAT_EXP_AUTOSPLITTER)
- if (dat->fIsAutosizingInput)
+ if (dat->bIsAutosizingInput)
return 0;
#endif
@@ -1593,173 +1594,176 @@ void TSAPI DM_EventAdded(TWindowData *dat, WPARAM wParam, LPARAM lParam) if (dat->hDbEventFirst == NULL)
dat->hDbEventFirst = hDbEvent;
- BOOL fIsStatusChangeEvent = IsStatusEvent(dbei.eventType);
- //BOOL fIsNotifyEvent = (dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_FILE);
+ BOOL bIsStatusChangeEvent = IsStatusEvent(dbei.eventType);
if (dbei.eventType == EVENTTYPE_MESSAGE && (dbei.flags & DBEF_READ))
return;
- if (DbEventIsShown(dat, &dbei)) {
- if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & (DBEF_SENT))) {
- dat->lastMessage = dbei.timestamp;
- dat->szStatusBar[0] = 0;
- if (dat->showTyping) {
- dat->nTypeSecs = 0;
- DM_Typing(dat, true);
- dat->showTyping = 0;
- }
- HandleIconFeedback(dat, (HICON)-1);
- if (m_pContainer->hwndStatus)
- PostMessage(hwndDlg, DM_UPDATELASTMESSAGE, 0, 0);
- }
- /*
- * set the message log divider to mark new (maybe unseen) messages, if the container has
- * been minimized or in the background.
- */
- if (!(dbei.flags & DBEF_SENT) && !fIsStatusChangeEvent) {
+ if ( !DbEventIsShown(dat, &dbei))
+ return;
- if (PluginConfig.m_DividersUsePopupConfig && PluginConfig.m_UseDividers) {
- if (!MessageWindowOpened((WPARAM)dat->hContact, 0))
- SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0);
- } else if (PluginConfig.m_UseDividers) {
- if ((GetForegroundWindow() != hwndContainer || GetActiveWindow() != hwndContainer))
+ if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & (DBEF_SENT))) {
+ dat->lastMessage = dbei.timestamp;
+ dat->szStatusBar[0] = 0;
+ if (dat->showTyping) {
+ dat->nTypeSecs = 0;
+ DM_Typing(dat, true);
+ dat->showTyping = 0;
+ }
+ HandleIconFeedback(dat, (HICON)-1);
+ if (m_pContainer->hwndStatus)
+ PostMessage(hwndDlg, DM_UPDATELASTMESSAGE, 0, 0);
+ }
+ /*
+ * set the message log divider to mark new (maybe unseen) messages, if the container has
+ * been minimized or in the background.
+ */
+ if (!(dbei.flags & DBEF_SENT) && !bIsStatusChangeEvent) {
+ if (PluginConfig.m_DividersUsePopupConfig && PluginConfig.m_UseDividers) {
+ if (!MessageWindowOpened((WPARAM)dat->hContact, 0))
+ SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0);
+ }
+ else if (PluginConfig.m_UseDividers) {
+ if ((GetForegroundWindow() != hwndContainer || GetActiveWindow() != hwndContainer))
+ SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0);
+ else {
+ if (m_pContainer->hwndActive != hwndDlg)
SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0);
- else {
- if (m_pContainer->hwndActive != hwndDlg)
- SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0);
- }
}
- tabSRMM_ShowPopup(wParam, lParam, dbei.eventType, m_pContainer->fHidden ? 0 : 1, m_pContainer, hwndDlg, dat->cache->getActiveProto(), dat);
- if (IsWindowVisible(m_pContainer->hwnd))
- m_pContainer->fHidden = false;
}
- dat->cache->updateStats(TSessionStats::UPDATE_WITH_LAST_RCV, 0);
-
- if (hDbEvent != dat->hDbEventFirst) {
- HANDLE nextEvent = db_event_next(hDbEvent);
- if (1 || nextEvent == 0) {
- if (!(dat->dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED))
- SendMessage(hwndDlg, DM_APPENDTOLOG, lParam, 0);
- else {
- TCHAR szBuf[100];
-
- if (dat->iNextQueuedEvent >= dat->iEventQueueSize) {
- dat->hQueuedEvents = (HANDLE *)mir_realloc(dat->hQueuedEvents, (dat->iEventQueueSize + 10) * sizeof(HANDLE));
- dat->iEventQueueSize += 10;
- }
- dat->hQueuedEvents[dat->iNextQueuedEvent++] = hDbEvent;
- mir_sntprintf(szBuf, SIZEOF(szBuf), TranslateT("Autoscrolling is disabled, %d message(s) queued (press F12 to enable it)"),
- dat->iNextQueuedEvent);
- SetDlgItemText(hwndDlg, IDC_LOGFROZENTEXT, szBuf);
- RedrawWindow(GetDlgItem(hwndDlg, IDC_LOGFROZENTEXT), NULL, NULL, RDW_INVALIDATE);
- }
- } else
- SendMessage(hwndDlg, DM_REMAKELOG, 0, 0);
- } else
- SendMessage(hwndDlg, DM_REMAKELOG, 0, 0);
+ tabSRMM_ShowPopup((HANDLE)wParam, hDbEvent, dbei.eventType, m_pContainer->fHidden ? 0 : 1, m_pContainer, hwndDlg, dat->cache->getActiveProto(), dat);
+ if (IsWindowVisible(m_pContainer->hwnd))
+ m_pContainer->fHidden = false;
+ }
+ dat->cache->updateStats(TSessionStats::UPDATE_WITH_LAST_RCV, 0);
- // handle tab flashing
+ if (hDbEvent != dat->hDbEventFirst) {
+ HANDLE nextEvent = db_event_next(hDbEvent);
+ if (1 || nextEvent == 0) {
+ if (!(dat->dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED))
+ SendMessage(hwndDlg, DM_APPENDTOLOG, lParam, 0);
+ else {
+ TCHAR szBuf[100];
- if ((TabCtrl_GetCurSel(hwndTab) != dat->iTabID) && !(dbei.flags & DBEF_SENT) && !fIsStatusChangeEvent) {
- switch (dbei.eventType) {
- case EVENTTYPE_MESSAGE:
- dat->iFlashIcon = PluginConfig.g_IconMsgEvent;
- break;
- case EVENTTYPE_FILE:
- dat->iFlashIcon = PluginConfig.g_IconFileEvent;
- break;
- default:
- dat->iFlashIcon = PluginConfig.g_IconMsgEvent;
- break;
+ if (dat->iNextQueuedEvent >= dat->iEventQueueSize) {
+ dat->hQueuedEvents = (HANDLE*)mir_realloc(dat->hQueuedEvents, (dat->iEventQueueSize + 10) * sizeof(HANDLE));
+ dat->iEventQueueSize += 10;
+ }
+ dat->hQueuedEvents[dat->iNextQueuedEvent++] = hDbEvent;
+ mir_sntprintf(szBuf, SIZEOF(szBuf), TranslateT("Autoscrolling is disabled, %d message(s) queued (press F12 to enable it)"),
+ dat->iNextQueuedEvent);
+ SetDlgItemText(hwndDlg, IDC_LOGFROZENTEXT, szBuf);
+ RedrawWindow(GetDlgItem(hwndDlg, IDC_LOGFROZENTEXT), NULL, NULL, RDW_INVALIDATE);
}
- SetTimer(hwndDlg, TIMERID_FLASHWND, TIMEOUT_FLASHWND, NULL);
- dat->mayFlashTab = TRUE;
}
- /*
- * try to flash the contact list...
- */
+ else SendMessage(hwndDlg, DM_REMAKELOG, 0, 0);
+ }
+ else SendMessage(hwndDlg, DM_REMAKELOG, 0, 0);
- FlashOnClist(hwndDlg, dat, hDbEvent, &dbei);
- /*
- * autoswitch tab if option is set AND container is minimized (otherwise, we never autoswitch)
- * never switch for status changes...
- */
- if (!(dbei.flags & DBEF_SENT) && !fIsStatusChangeEvent) {
- if (PluginConfig.haveAutoSwitch() && m_pContainer->hwndActive != hwndDlg) {
- if ((IsIconic(hwndContainer) && !IsZoomed(hwndContainer)) || (PluginConfig.m_HideOnClose && !IsWindowVisible(m_pContainer->hwnd))) {
- int iItem = GetTabIndexFromHWND(GetParent(hwndDlg), hwndDlg);
- if (iItem >= 0) {
- TabCtrl_SetCurSel(GetParent(hwndDlg), iItem);
- ShowWindow(m_pContainer->hwndActive, SW_HIDE);
- m_pContainer->hwndActive = hwndDlg;
- SendMessage(hwndContainer, DM_UPDATETITLE, (WPARAM)dat->hContact, 0);
- m_pContainer->dwFlags |= CNT_DEFERREDTABSELECT;
- }
+ // handle tab flashing
+ if ((TabCtrl_GetCurSel(hwndTab) != dat->iTabID) && !(dbei.flags & DBEF_SENT) && !bIsStatusChangeEvent) {
+ switch (dbei.eventType) {
+ case EVENTTYPE_MESSAGE:
+ dat->iFlashIcon = PluginConfig.g_IconMsgEvent;
+ break;
+ case EVENTTYPE_FILE:
+ dat->iFlashIcon = PluginConfig.g_IconFileEvent;
+ break;
+ default:
+ dat->iFlashIcon = PluginConfig.g_IconMsgEvent;
+ break;
+ }
+ SetTimer(hwndDlg, TIMERID_FLASHWND, TIMEOUT_FLASHWND, NULL);
+ dat->mayFlashTab = TRUE;
+ }
+ /*
+ * try to flash the contact list...
+ */
+ FlashOnClist(hwndDlg, dat, hDbEvent, &dbei);
+
+ /*
+ * autoswitch tab if option is set AND container is minimized (otherwise, we never autoswitch)
+ * never switch for status changes...
+ */
+ if (!(dbei.flags & DBEF_SENT) && !bIsStatusChangeEvent) {
+ if (PluginConfig.haveAutoSwitch() && m_pContainer->hwndActive != hwndDlg) {
+ if ((IsIconic(hwndContainer) && !IsZoomed(hwndContainer)) || (PluginConfig.m_HideOnClose && !IsWindowVisible(m_pContainer->hwnd))) {
+ int iItem = GetTabIndexFromHWND(GetParent(hwndDlg), hwndDlg);
+ if (iItem >= 0) {
+ TabCtrl_SetCurSel(GetParent(hwndDlg), iItem);
+ ShowWindow(m_pContainer->hwndActive, SW_HIDE);
+ m_pContainer->hwndActive = hwndDlg;
+ SendMessage(hwndContainer, DM_UPDATETITLE, (WPARAM)dat->hContact, 0);
+ m_pContainer->dwFlags |= CNT_DEFERREDTABSELECT;
}
}
}
- /*
- * flash window if it is not focused
- */
- if ((GetActiveWindow() != hwndContainer || GetForegroundWindow() != hwndContainer || dat->pContainer->hwndActive != hwndDlg) && !(dbei.flags & DBEF_SENT) && !fIsStatusChangeEvent) {
- if (!(m_pContainer->dwFlags & CNT_NOFLASH) && (GetActiveWindow() != hwndContainer || GetForegroundWindow() != hwndContainer))
- FlashContainer(m_pContainer, 1, 0);
- SendMessage(hwndContainer, DM_SETICON, (WPARAM)dat, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
- m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
- }
- /*
- * play a sound
- */
- if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & (DBEF_SENT)))
- PostMessage(hwndDlg, DM_PLAYINCOMINGSOUND, 0, 0);
+ }
- if (dat->pWnd)
- dat->pWnd->Invalidate();
+ /*
+ * flash window if it is not focused
+ */
+ if ((GetActiveWindow() != hwndContainer || GetForegroundWindow() != hwndContainer || dat->pContainer->hwndActive != hwndDlg) && !(dbei.flags & DBEF_SENT) && !bIsStatusChangeEvent) {
+ if (!(m_pContainer->dwFlags & CNT_NOFLASH) && (GetActiveWindow() != hwndContainer || GetForegroundWindow() != hwndContainer))
+ FlashContainer(m_pContainer, 1, 0);
+ SendMessage(hwndContainer, DM_SETICON, (WPARAM)dat, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
+ m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
}
+
+ /*
+ * play a sound
+ */
+ if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & (DBEF_SENT)))
+ PostMessage(hwndDlg, DM_PLAYINCOMINGSOUND, 0, 0);
+
+ if (dat->pWnd)
+ dat->pWnd->Invalidate();
}
void TSAPI DM_HandleAutoSizeRequest(TWindowData *dat, REQRESIZE* rr)
{
- if (dat && rr && GetForegroundWindow() == dat->pContainer->hwnd) {
- if (dat->fIsAutosizingInput && dat->iInputAreaHeight != -1) {
- LONG heightLimit = M.GetDword("autoSplitMinLimit", 0);
- LONG iNewHeight = rr->rc.bottom - rr->rc.top;
+ if (dat == NULL || rr == NULL || GetForegroundWindow() != dat->pContainer->hwnd)
+ return;
- if (CSkin::m_skinEnabled && !SkinItems[ID_EXTBKINPUTAREA].IGNORED)
- iNewHeight += (SkinItems[ID_EXTBKINPUTAREA].MARGIN_TOP + SkinItems[ID_EXTBKINPUTAREA].MARGIN_BOTTOM - 2);
+ if (!dat->bIsAutosizingInput || dat->iInputAreaHeight == -1)
+ return;
- if (heightLimit && iNewHeight < heightLimit)
- iNewHeight = heightLimit;
+ LONG heightLimit = M.GetDword("autoSplitMinLimit", 0);
+ LONG iNewHeight = rr->rc.bottom - rr->rc.top;
- if (iNewHeight != dat->iInputAreaHeight) {
- RECT rc;
+ if (CSkin::m_skinEnabled && !SkinItems[ID_EXTBKINPUTAREA].IGNORED)
+ iNewHeight += (SkinItems[ID_EXTBKINPUTAREA].MARGIN_TOP + SkinItems[ID_EXTBKINPUTAREA].MARGIN_BOTTOM - 2);
- GetClientRect(dat->hwnd, &rc);
- LONG cy = rc.bottom - rc.top;
- LONG panelHeight = (dat->Panel->isActive() ? dat->Panel->getHeight() : 0);
+ if (heightLimit && iNewHeight < heightLimit)
+ iNewHeight = heightLimit;
- if (iNewHeight > (cy - panelHeight) / 2)
- iNewHeight = (cy - panelHeight) / 2;
+ if (iNewHeight == dat->iInputAreaHeight)
+ return;
- if (dat->bType == SESSIONTYPE_IM) {
- dat->dynaSplitter = rc.bottom - (rc.bottom - iNewHeight + DPISCALEY_S(2));
- if (dat->pContainer->dwFlags & CNT_BOTTOMTOOLBAR)
- dat->dynaSplitter += DPISCALEY_S(22);
- dat->splitterY = dat->dynaSplitter + DPISCALEY_S(34);
- DM_RecalcPictureSize(dat);
- }
- else if (dat->si) {
- dat->si->iSplitterY = (rc.bottom - (rc.bottom - iNewHeight + DPISCALEY_S(3))) + DPISCALEY_S(34);
- if (!(dat->pContainer->dwFlags & CNT_BOTTOMTOOLBAR))
- dat->si->iSplitterY -= DPISCALEY_S(22);
- SendMessage(dat->hwnd, WM_SIZE, 0, 0);
- }
- dat->iInputAreaHeight = iNewHeight;
- CSkin::UpdateToolbarBG(dat);
- DM_ScrollToBottom(dat, 1, 0);
- }
- }
+ RECT rc;
+ GetClientRect(dat->hwnd, &rc);
+ LONG cy = rc.bottom - rc.top;
+ LONG panelHeight = (dat->Panel->isActive() ? dat->Panel->getHeight() : 0);
+
+ if (iNewHeight > (cy - panelHeight) / 2)
+ iNewHeight = (cy - panelHeight) / 2;
+
+ if (dat->bType == SESSIONTYPE_IM) {
+ dat->dynaSplitter = rc.bottom - (rc.bottom - iNewHeight + DPISCALEY_S(2));
+ if (dat->pContainer->dwFlags & CNT_BOTTOMTOOLBAR)
+ dat->dynaSplitter += DPISCALEY_S(22);
+ dat->splitterY = dat->dynaSplitter + DPISCALEY_S(34);
+ DM_RecalcPictureSize(dat);
+ }
+ else if (dat->si) {
+ dat->si->iSplitterY = (rc.bottom - (rc.bottom - iNewHeight + DPISCALEY_S(3))) + DPISCALEY_S(34);
+ if (!(dat->pContainer->dwFlags & CNT_BOTTOMTOOLBAR))
+ dat->si->iSplitterY -= DPISCALEY_S(22);
+ SendMessage(dat->hwnd, WM_SIZE, 0, 0);
}
+ dat->iInputAreaHeight = iNewHeight;
+ CSkin::UpdateToolbarBG(dat);
+ DM_ScrollToBottom(dat, 1, 0);
}
void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM wParam, LPARAM lParam)
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index ea756220c5..98b0420e07 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -726,7 +726,7 @@ bool CGlobals::haveAutoSwitch() {
if (m_bIsWin7) {
if (m_useAeroPeek && !CSkin::m_skinEnabled)
- return(false);
+ return false;
}
return(m_AutoSwitchTabs ? true : false);
}
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 6febbaf43b..b2453a223b 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -225,7 +225,7 @@ bool CInfoPanel::getVisibility() {
if (m_dat->hContact == 0) {
setActive(false); // no info panel, if no hcontact
- return(false);
+ return false;
}
BYTE bDefault = (m_dat->pContainer->dwFlags & CNT_INFOPANEL) ? 1 : 0;
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index 34e7af4dc2..cdec5bdf9b 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -477,8 +477,8 @@ int CMimAPI::TypingMessage(WPARAM wParam, LPARAM lParam) }
if (fShowOnClist) {
CLISTEVENT cle = { sizeof(cle) };
- cle.hContact = (HANDLE) wParam;
- cle.hDbEvent = (HANDLE) 1;
+ cle.hContact = (HANDLE)wParam;
+ cle.hDbEvent = (HANDLE)1;
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
cle.hIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
cle.pszService = "SRMsg/TypingMessage";
@@ -585,78 +585,74 @@ int CMimAPI::DispatchNewEvent(WPARAM wParam, LPARAM lParam) int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam)
{
BYTE bAutoPopup = FALSE, bAutoCreate = FALSE, bAutoContainer = FALSE, bAllowAutoCreate = 0;
- TContainerData *pContainer = 0;
TCHAR szName[CONTAINER_NAMELEN + 1];
DWORD dwStatusMask = 0;
- TWindowData *mwdat=NULL;
+ HANDLE hDbEvent = (HANDLE)lParam;
DBEVENTINFO dbei = { sizeof(dbei) };
- db_event_get((HANDLE)lParam, &dbei);
+ db_event_get(hDbEvent, &dbei);
- HWND hwnd = M.FindWindow((HANDLE)wParam);
+ HANDLE hContact = (HANDLE)wParam;
+ HWND hwnd = M.FindWindow(hContact);
BOOL isCustomEvent = IsCustomEvent(dbei.eventType);
BOOL isShownCustomEvent = DbEventIsForMsgWindow(&dbei);
if (dbei.flags & DBEF_SENT || (isCustomEvent && !isShownCustomEvent) || dbei.flags & DBEF_READ)
return 0;
- CallServiceSync(MS_CLIST_REMOVEEVENT, wParam, (LPARAM)1);
- //MaD: hide on close mod, simulating standard behavior for hidden container
+ CallServiceSync(MS_CLIST_REMOVEEVENT, wParam, 1);
+
if (hwnd) {
TContainerData *pTargetContainer = 0;
WINDOWPLACEMENT wp={0};
wp.length = sizeof(wp);
SendMessage(hwnd, DM_QUERYCONTAINER, 0, (LPARAM)&pTargetContainer);
- if (pTargetContainer && PluginConfig.m_HideOnClose && !IsWindowVisible(pTargetContainer->hwnd)) {
- GetWindowPlacement(pTargetContainer->hwnd, &wp);
- GetContainerNameForContact((HANDLE) wParam, szName, CONTAINER_NAMELEN);
+ if (pTargetContainer == NULL || !PluginConfig.m_HideOnClose || IsWindowVisible(pTargetContainer->hwnd))
+ return 0;
- bAutoPopup = M.GetByte(SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP);
- bAutoCreate = M.GetByte("autotabs", 1);
- bAutoContainer = M.GetByte("autocontainer", 1);
- dwStatusMask = M.GetDword("autopopupmask", -1);
+ GetWindowPlacement(pTargetContainer->hwnd, &wp);
+ GetContainerNameForContact(hContact, szName, CONTAINER_NAMELEN);
- bAllowAutoCreate = FALSE;
+ bAutoPopup = M.GetByte(SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP);
+ bAutoCreate = M.GetByte("autotabs", 1);
+ bAutoContainer = M.GetByte("autocontainer", 1);
+ dwStatusMask = M.GetDword("autopopupmask", -1);
- if (bAutoPopup || bAutoCreate) {
- BOOL bActivate = TRUE, bPopup = TRUE;
- if (bAutoPopup) {
- if (wp.showCmd == SW_SHOWMAXIMIZED)
- ShowWindow(pTargetContainer->hwnd, SW_SHOWMAXIMIZED);
- else
- ShowWindow(pTargetContainer->hwnd, SW_SHOWNOACTIVATE);
+ bAllowAutoCreate = FALSE;
+
+ if (bAutoPopup || bAutoCreate) {
+ BOOL bActivate = TRUE, bPopup = TRUE;
+ if (bAutoPopup) {
+ if (wp.showCmd == SW_SHOWMAXIMIZED)
+ ShowWindow(pTargetContainer->hwnd, SW_SHOWMAXIMIZED);
+ else
+ ShowWindow(pTargetContainer->hwnd, SW_SHOWNOACTIVATE);
+ return 0;
+ }
+
+ bActivate = FALSE;
+ bPopup = (BOOL)M.GetByte("cpopup", 0);
+ TContainerData *pContainer = FindContainerByName(szName);
+ if (pContainer != NULL) {
+ if (bAutoContainer) {
+ ShowWindow(pTargetContainer->hwnd, SW_SHOWMINNOACTIVE);
return 0;
}
- else {
- bActivate = FALSE;
- bPopup = (BOOL) M.GetByte("cpopup", 0);
- pContainer = FindContainerByName(szName);
- if (pContainer != NULL) {
- if (bAutoContainer) {
- ShowWindow(pTargetContainer->hwnd, SW_SHOWMINNOACTIVE);
- return 0;
- }
- else goto nowindowcreate;
- }
- else {
- if (bAutoContainer) {
- ShowWindow(pTargetContainer->hwnd, SW_SHOWMINNOACTIVE);
- return 0;
- }
- }
- }
+ goto nowindowcreate;
+ }
+ else if (bAutoContainer) {
+ ShowWindow(pTargetContainer->hwnd, SW_SHOWMINNOACTIVE);
+ return 0;
}
}
- else
- return 0;
}
else {
if (dbei.eventType == EVENTTYPE_AUTHREQUEST)
return 0;
if (dbei.eventType == EVENTTYPE_FILE) {
- tabSRMM_ShowPopup(wParam, lParam, dbei.eventType, 0, 0, 0, dbei.szModule, 0);
+ tabSRMM_ShowPopup(hContact, hDbEvent, dbei.eventType, 0, 0, 0, dbei.szModule, 0);
return 0;
}
}
@@ -672,7 +668,7 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam) if (nen_options.iNoAutoPopup)
goto nowindowcreate;
- GetContainerNameForContact((HANDLE) wParam, szName, CONTAINER_NAMELEN);
+ GetContainerNameForContact(hContact, szName, CONTAINER_NAMELEN);
bAutoPopup = M.GetByte(SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP);
bAutoCreate = M.GetByte("autotabs", 1);
@@ -684,7 +680,7 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam) if (dwStatusMask == -1)
bAllowAutoCreate = TRUE;
else {
- char *szProto = GetContactProto((HANDLE)wParam);
+ char *szProto = GetContactProto(hContact);
if (PluginConfig.g_MetaContactsAvail && szProto && !strcmp(szProto, (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0))) {
HANDLE hSubconttact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, wParam, 0);
szProto = GetContactProto(hSubconttact);
@@ -700,38 +696,39 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam) BOOL bActivate = TRUE, bPopup = TRUE;
if (bAutoPopup) {
bActivate = bPopup = TRUE;
- if ((pContainer = FindContainerByName(szName)) == NULL)
- pContainer = CreateContainer(szName, FALSE, (HANDLE)wParam);
- CreateNewTabForContact(pContainer, (HANDLE) wParam, 0, NULL, bActivate, bPopup, FALSE, 0);
+ TContainerData *pContainer = FindContainerByName(szName);
+ if (pContainer == NULL)
+ pContainer = CreateContainer(szName, FALSE, hContact);
+ CreateNewTabForContact(pContainer, hContact, 0, NULL, bActivate, bPopup, FALSE, 0);
return 0;
}
bActivate = FALSE;
- bPopup = (BOOL) M.GetByte("cpopup", 0);
- pContainer = FindContainerByName(szName);
+ bPopup = (BOOL)M.GetByte("cpopup", 0);
+ TContainerData *pContainer = FindContainerByName(szName);
if (pContainer != NULL) {
//if ((IsIconic(pContainer->hwnd)) && PluginConfig.haveAutoSwitch())
// pContainer->dwFlags |= CNT_DEFERREDTABSELECT;
if (M.GetByte("limittabs", 0) && !wcsncmp(pContainer->szName, L"default", 6)) {
- if ((pContainer = FindMatchingContainer(L"default", (HANDLE)wParam)) != NULL) {
- CreateNewTabForContact(pContainer, (HANDLE) wParam, 0, NULL, bActivate, bPopup, TRUE, (HANDLE)lParam);
+ if ((pContainer = FindMatchingContainer(L"default", hContact)) != NULL) {
+ CreateNewTabForContact(pContainer, hContact, 0, NULL, bActivate, bPopup, TRUE, hDbEvent);
return 0;
}
if (bAutoContainer) {
- pContainer = CreateContainer(szName, CNT_CREATEFLAG_MINIMIZED, (HANDLE)wParam); // 2 means create minimized, don't popup...
- CreateNewTabForContact(pContainer, (HANDLE) wParam, 0, NULL, bActivate, bPopup, TRUE, (HANDLE)lParam);
+ pContainer = CreateContainer(szName, CNT_CREATEFLAG_MINIMIZED, hContact); // 2 means create minimized, don't popup...
+ CreateNewTabForContact(pContainer, hContact, 0, NULL, bActivate, bPopup, TRUE, hDbEvent);
SendMessageW(pContainer->hwnd, WM_SIZE, 0, 0);
return 0;
}
}
else {
- CreateNewTabForContact(pContainer, (HANDLE) wParam, 0, NULL, bActivate, bPopup, TRUE, (HANDLE)lParam);
+ CreateNewTabForContact(pContainer, hContact, 0, NULL, bActivate, bPopup, TRUE, hDbEvent);
return 0;
}
}
else if (bAutoContainer) {
- pContainer = CreateContainer(szName, CNT_CREATEFLAG_MINIMIZED, (HANDLE)wParam); // 2 means create minimized, don't popup...
- CreateNewTabForContact(pContainer, (HANDLE) wParam, 0, NULL, bActivate, bPopup, TRUE, (HANDLE)lParam);
+ pContainer = CreateContainer(szName, CNT_CREATEFLAG_MINIMIZED, hContact); // 2 means create minimized, don't popup...
+ CreateNewTabForContact(pContainer, hContact, 0, NULL, bActivate, bPopup, TRUE, hDbEvent);
SendMessageW(pContainer->hwnd, WM_SIZE, 0, 0);
return 0;
}
@@ -743,22 +740,22 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam) */
nowindowcreate:
if (!(dbei.flags & DBEF_READ)) {
- UpdateTrayMenu(0, 0, dbei.szModule, NULL, (HANDLE)wParam, 1);
+ UpdateTrayMenu(0, 0, dbei.szModule, NULL, hContact, 1);
if (!nen_options.bTraySupport) {
TCHAR toolTip[256], *contactName;
CLISTEVENT cle = { sizeof(cle) };
- cle.hContact = (HANDLE)wParam;
- cle.hDbEvent = (HANDLE)lParam;
+ cle.hContact = hContact;
+ cle.hDbEvent = hDbEvent;
cle.flags = CLEF_TCHAR;
cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
- contactName = pcli->pfnGetContactDisplayName((HANDLE)wParam, 0);
+ contactName = pcli->pfnGetContactDisplayName(hContact, 0);
mir_sntprintf(toolTip, SIZEOF(toolTip), TranslateT("Message from %s"), contactName);
cle.ptszTooltip = toolTip;
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
}
- tabSRMM_ShowPopup(wParam, lParam, dbei.eventType, 0, 0, 0, dbei.szModule, 0);
+ tabSRMM_ShowPopup(hContact, hDbEvent, dbei.eventType, 0, 0, 0, dbei.szModule, 0);
}
return 0;
}
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 2e35476b3b..66495b2662 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -330,7 +330,7 @@ static void MsgWindowUpdateState(TWindowData *dat, UINT msg) }
}
#if defined(__FEAT_EXP_AUTOSPLITTER)
- if (dat->fIsAutosizingInput && dat->iInputAreaHeight == -1) {
+ if (dat->bIsAutosizingInput && dat->iInputAreaHeight == -1) {
dat->iInputAreaHeight = 0;
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_REQUESTRESIZE, 0, 0);
}
@@ -498,7 +498,7 @@ void TSAPI SetDialogToType(HWND hwndDlg) GetAvatarVisibility(hwndDlg, dat);
Utils::showDlgControl(hwndDlg, IDC_CONTACTPIC, dat->showPic ? SW_SHOW : SW_HIDE);
- Utils::showDlgControl(hwndDlg, IDC_SPLITTER, dat->fIsAutosizingInput ? SW_HIDE : SW_SHOW);
+ Utils::showDlgControl(hwndDlg, IDC_SPLITTER, dat->bIsAutosizingInput ? SW_HIDE : SW_SHOW);
Utils::showDlgControl(hwndDlg, IDC_MULTISPLITTER, (dat->sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE);
EnableSendButton(dat, GetWindowTextLength(GetDlgItem(hwndDlg, IDC_MESSAGE)) != 0);
@@ -983,7 +983,7 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM break;
GetCursorPos(&pt);
#if defined(__FEAT_EXP_AUTOSPLITTER)
- if (dat->fIsAutosizingInput)
+ if (dat->bIsAutosizingInput)
selection = ID_SPLITTERCONTEXT_SETPOSITIONFORTHISSESSION;
else
selection = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndParent, NULL);
@@ -1004,7 +1004,7 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case ID_SPLITTERCONTEXT_SETPOSITIONFORTHISSESSION:
#if defined(__FEAT_EXP_AUTOSPLITTER)
- if (dat->fIsAutosizingInput) {
+ if (dat->bIsAutosizingInput) {
RECT rc;
GetWindowRect(GetDlgItem(dat->hwnd, IDC_MESSAGE), &rc);
dat->iInputAreaHeight = 0;
@@ -1124,7 +1124,7 @@ static int MessageDialogResize(HWND hwndDlg, LPARAM lParam, UTILRESIZECONTROL * if (showToolbar && bBottomToolbar && (PluginConfig.m_AlwaysFullToolbarWidth || ((dat->pic.cy - DPISCALEY_S(6)) < rc.bottom))) {
urc->rcItem.bottom -= DPISCALEY_S(22);
- if (dat->fIsAutosizingInput) {
+ if (dat->bIsAutosizingInput) {
urc->rcItem.left--;
urc->rcItem.top--;
}
@@ -1165,7 +1165,7 @@ static int MessageDialogResize(HWND hwndDlg, LPARAM lParam, UTILRESIZECONTROL * if (bBottomToolbar&&showToolbar)
urc->rcItem.bottom -= DPISCALEY_S(22);
- if (dat->fIsAutosizingInput)
+ if (dat->bIsAutosizingInput)
urc->rcItem.top -= DPISCALEY_S(1);
msgTop = urc->rcItem.top;
@@ -1337,7 +1337,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP dat->sendMode |= dat->hContact == 0 ? SMODE_MULTIPLE : 0;
dat->sendMode |= M.GetByte(dat->hContact, "no_ack", 0) ? SMODE_NOACK : 0;
- dat->hQueuedEvents = (HANDLE*)mir_calloc(sizeof(HANDLE) * EVENT_QUEUE_SIZE);
+ dat->hQueuedEvents = (HANDLE*)mir_calloc(sizeof(HANDLE)* EVENT_QUEUE_SIZE);
dat->iEventQueueSize = EVENT_QUEUE_SIZE;
dat->iCurrentQueueError = -1;
@@ -1349,7 +1349,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP dat->maxHistory = M.GetDword(dat->hContact, "maxhist", M.GetDword("maxhist", 0));
dat->curHistory = 0;
if (dat->maxHistory)
- dat->hHistoryEvents = (HANDLE *)mir_alloc(dat->maxHistory * sizeof(HANDLE));
+ dat->hHistoryEvents = (HANDLE*)mir_alloc(dat->maxHistory * sizeof(HANDLE));
else
dat->hHistoryEvents = NULL;
@@ -1389,7 +1389,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP dat->Panel->getVisibility();
dat->dwFlagsEx |= M.GetByte(dat->hContact, "splitoverride", 0) ? MWF_SHOW_SPLITTEROVERRIDE : 0;
- dat->fIsAutosizingInput = IsAutoSplitEnabled(dat);
+ dat->bIsAutosizingInput = IsAutoSplitEnabled(dat);
dat->iInputAreaHeight = -1;
SetMessageLog(dat);
dat->panelWidth = -1;
@@ -1601,7 +1601,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP DBEVENTINFO dbei = { sizeof(dbei) };
newData->bWantPopup = FALSE;
db_event_get(newData->hdbEvent, &dbei);
- tabSRMM_ShowPopup((WPARAM)dat->hContact, (LPARAM)newData->hdbEvent, dbei.eventType, 0, 0, hwndDlg, dat->cache->getActiveProto(), dat);
+ tabSRMM_ShowPopup(dat->hContact, newData->hdbEvent, dbei.eventType, 0, 0, hwndDlg, dat->cache->getActiveProto(), dat);
}
if (m_pContainer->dwFlags & CNT_CREATE_MINIMIZED) {
m_pContainer->dwFlags &= ~CNT_CREATE_MINIMIZED;
@@ -2548,7 +2548,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP return 0;
case DM_APPENDTOLOG:
- StreamInEvents(hwndDlg, (HANDLE) wParam, 1, 1, NULL);
+ StreamInEvents(hwndDlg, (HANDLE)wParam, 1, 1, NULL);
return 0;
/*
* replays queued events after the message log has been frozen for a while
@@ -2698,7 +2698,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (job->hSendId == 0 && job->hOwner == 0)
break;
- job->hSendId = (HANDLE) CallContactService(job->hOwner, PSS_MESSAGE,
+ job->hSendId = (HANDLE)CallContactService(job->hOwner, PSS_MESSAGE,
(dat->sendMode & SMODE_FORCEANSI) ? (job->dwFlags & ~PREF_UNICODE) : job->dwFlags, (LPARAM)job->szSendBuffer);
resent++;
}
@@ -2754,7 +2754,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP }
case DM_QUERYHCONTACT: {
- HANDLE *phContact = (HANDLE *) lParam;
+ HANDLE *phContact = (HANDLE*) lParam;
if (phContact)
*phContact = dat->hContact;
return 0;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 4cc2f2d67e..c9e2dc7234 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -248,7 +248,7 @@ void TSAPI CalcDynamicAvatarSize(TWindowData *dat, BITMAP *bminfo) BOOL bBottomToolBar=dat->pContainer->dwFlags & CNT_BOTTOMTOOLBAR;
BOOL bToolBar=dat->pContainer->dwFlags & CNT_HIDETOOLBAR?0:1;
bool bInfoPanel = dat->Panel->isActive();
- int iSplitOffset = dat->fIsAutosizingInput ? 1 : 0;
+ int iSplitOffset = dat->bIsAutosizingInput ? 1 : 0;
if (PluginConfig.g_FlashAvatarAvail) {
FLASHAVATAR fa = {0};
@@ -908,7 +908,7 @@ void TSAPI FlashOnClist(HWND hwndDlg, TWindowData *dat, HANDLE hEvent, DBEVENTIN if ((GetForegroundWindow() != dat->pContainer->hwnd || dat->pContainer->hwndActive != hwndDlg) && !(dbei->flags & DBEF_SENT) && dbei->eventType == EVENTTYPE_MESSAGE && !(dat->dwFlagsEx & MWF_SHOW_FLASHCLIST)) {
ZeroMemory(&cle, sizeof(cle));
cle.cbSize = sizeof(cle);
- cle.hContact = (HANDLE) dat->hContact;
+ cle.hContact = (HANDLE)dat->hContact;
cle.hDbEvent = hEvent;
cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
@@ -1450,7 +1450,7 @@ void TSAPI SaveSplitter(TWindowData *dat) return;
#if defined(__FEAT_EXP_AUTOSPLITTER)
- if (dat->fIsAutosizingInput)
+ if (dat->bIsAutosizingInput)
return;
#endif
if (dat->splitterY < DPISCALEY_S(MINSPLITTERY) || dat->splitterY < 0)
@@ -1469,7 +1469,7 @@ void TSAPI SaveSplitter(TWindowData *dat) void TSAPI LoadSplitter(TWindowData *dat)
{
#if defined(__FEAT_EXP_AUTOSPLITTER)
- if (dat->fIsAutosizingInput) {
+ if (dat->bIsAutosizingInput) {
dat->splitterY = GetDefaultMinimumInputHeight(dat);
return;
}
@@ -2345,7 +2345,7 @@ bool TSAPI IsAutoSplitEnabled(const TWindowData *dat) #if defined(__FEAT_EXP_AUTOSPLITTER)
return((dat && (dat->pContainer->dwFlags & CNT_AUTOSPLITTER) && !(dat->dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE)) ? true : false);
#else
- return(false);
+ return false;
#endif
}
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index d96c398f13..983b2080d8 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -576,7 +576,7 @@ static char *Template_CreateRTFFromDbEvent(TWindowData *dat, HANDLE hContact, HA BOOL isBold = FALSE, isItalic = FALSE, isUnderline = FALSE;
DWORD dwEffectiveFlags;
DWORD dwFormattingParams = MAKELONG(PluginConfig.m_FormatWholeWordsOnly, 0);
- BOOL fIsStatusChangeEvent = FALSE;
+ BOOL bIsStatusChangeEvent = FALSE;
TCHAR *msg, *formatted = NULL;
char *rtfMessage = NULL;
@@ -618,7 +618,7 @@ static char *Template_CreateRTFFromDbEvent(TWindowData *dat, HANDLE hContact, HA mir_free(msg);
}
- fIsStatusChangeEvent = IsStatusEvent(dbei.eventType);
+ bIsStatusChangeEvent = IsStatusEvent(dbei.eventType);
if (dat->isAutoRTL & 2) { // means: last \\par was deleted to avoid new line at end of log
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "\\par");
@@ -637,7 +637,7 @@ static char *Template_CreateRTFFromDbEvent(TWindowData *dat, HANDLE hContact, HA iFontIDOffset = dat->isHistory ? 8 : 0; // offset into the font table for either history (old) or new events... (# of fonts per configuration set)
isSent = (dbei.flags & DBEF_SENT);
- if (!isSent && (fIsStatusChangeEvent || dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei))) {
+ if (!isSent && (bIsStatusChangeEvent || dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei))) {
db_event_markRead(hContact, hDbEvent);
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)hDbEvent);
}
@@ -666,7 +666,7 @@ static char *Template_CreateRTFFromDbEvent(TWindowData *dat, HANDLE hContact, HA AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "\\ltrpar");
/* OnO: highlight start */
- if (fIsStatusChangeEvent)
+ if (bIsStatusChangeEvent)
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "\\highlight%d\\cf%d", MSGDLGFONTCOUNT + 7, MSGDLGFONTCOUNT + 7);
else
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "\\highlight%d\\cf%d", MSGDLGFONTCOUNT + (dat->isHistory?5:1) + ((isSent) ? 1 : 0), MSGDLGFONTCOUNT + (dat->isHistory?5:1) + ((isSent) ? 1 : 0));
@@ -691,7 +691,7 @@ static char *Template_CreateRTFFromDbEvent(TWindowData *dat, HANDLE hContact, HA }
this_templateset = dbei.flags & DBEF_RTL ? dat->pContainer->rtl_templates : dat->pContainer->ltr_templates;
- if (fIsStatusChangeEvent)
+ if (bIsStatusChangeEvent)
szTemplate = this_templateset->szTemplates[TMPL_STATUSCHG];
else if (dbei.eventType == EVENTTYPE_ERRMSG)
szTemplate = this_templateset->szTemplates[TMPL_ERRMSG];
@@ -709,7 +709,7 @@ static char *Template_CreateRTFFromDbEvent(TWindowData *dat, HANDLE hContact, HA if (dat->hHistoryEvents) {
if (dat->curHistory == dat->maxHistory) {
- MoveMemory(dat->hHistoryEvents, &dat->hHistoryEvents[1], sizeof(HANDLE) * (dat->maxHistory - 1));
+ MoveMemory(dat->hHistoryEvents, &dat->hHistoryEvents[1], sizeof(HANDLE)* (dat->maxHistory - 1));
dat->curHistory--;
}
dat->hHistoryEvents[dat->curHistory++] = hDbEvent;
@@ -794,7 +794,7 @@ static char *Template_CreateRTFFromDbEvent(TWindowData *dat, HANDLE hContact, HA icon = LOGICON_MSG;
break;
}
- if (fIsStatusChangeEvent)
+ if (bIsStatusChangeEvent)
icon = LOGICON_STATUS;
}
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "%s\\fs1 #~#%01d%c%s ", GetRTFFont(MSGFONTID_SYMBOLS_IN), icon, isSent ? '>' : '<', GetRTFFont(isSent ? MSGFONTID_MYMSG + iFontIDOffset : MSGFONTID_YOURMSG + iFontIDOffset));
@@ -937,7 +937,7 @@ static char *Template_CreateRTFFromDbEvent(TWindowData *dat, HANDLE hContact, HA c = (char)0xaa;
break;
}
- if (fIsStatusChangeEvent)
+ if (bIsStatusChangeEvent)
c = 0x4e;
}
if (skipFont)
@@ -975,23 +975,23 @@ static char *Template_CreateRTFFromDbEvent(TWindowData *dat, HANDLE hContact, HA AppendUnicodeToBuffer(&buffer, &bufferEnd, &bufferAlloced, (wchar_t *)dbei.szModule, MAKELONG(isSent, dat->isHistory));
break;
case 'M': // message
- if (fIsStatusChangeEvent)
+ if (bIsStatusChangeEvent)
dbei.eventType = EVENTTYPE_STATUSCHANGE;
switch (dbei.eventType) {
case EVENTTYPE_MESSAGE:
case EVENTTYPE_ERRMSG:
case EVENTTYPE_STATUSCHANGE: {
- if (fIsStatusChangeEvent || dbei.eventType == EVENTTYPE_ERRMSG) {
+ if (bIsStatusChangeEvent || dbei.eventType == EVENTTYPE_ERRMSG) {
if (dbei.eventType == EVENTTYPE_ERRMSG && dbei.cbBlob == 0)
break;
if (dbei.eventType == EVENTTYPE_ERRMSG) {
if (!skipFont)
- AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "\\line%s ", GetRTFFont(fIsStatusChangeEvent ? H_MSGFONTID_STATUSCHANGES : MSGFONTID_MYMSG));
+ AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "\\line%s ", GetRTFFont(bIsStatusChangeEvent ? H_MSGFONTID_STATUSCHANGES : MSGFONTID_MYMSG));
else
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "\\line ");
} else {
if (!skipFont)
- AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "%s ", GetRTFFont(fIsStatusChangeEvent ? H_MSGFONTID_STATUSCHANGES : MSGFONTID_MYMSG));
+ AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "%s ", GetRTFFont(bIsStatusChangeEvent ? H_MSGFONTID_STATUSCHANGES : MSGFONTID_MYMSG));
}
} else {
if (!skipFont)
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index f875050f99..65c3deb1f7 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -860,7 +860,7 @@ static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItemUnknown, 1);
for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && db_get_b(hContact, SRMSGMOD, SRMSGSET_TYPING, defType))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
}
@@ -875,7 +875,7 @@ static void SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown) db_set_b(0, SRMSGMOD, SRMSGSET_TYPINGUNKNOWN, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) ? 1 : 0));
for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem)
db_set_b(hContact, SRMSGMOD, SRMSGSET_TYPING, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0) ? 1 : 0));
}
@@ -893,9 +893,9 @@ static INT_PTR CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam cii.cbSize = sizeof(cii);
cii.flags = CLCIIF_GROUPFONT | CLCIIF_CHECKBOX;
cii.pszText = TranslateT("** New contacts **");
- hItemNew = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_ADDINFOITEM, 0, (LPARAM)&cii);
+ hItemNew = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_ADDINFOITEM, 0, (LPARAM)&cii);
cii.pszText = TranslateT("** Unknown contacts **");
- hItemUnknown = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_ADDINFOITEM, 0, (LPARAM)&cii);
+ hItemUnknown = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_ADDINFOITEM, 0, (LPARAM)&cii);
}
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CLIST), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CLIST), GWL_STYLE) | (CLS_SHOWHIDDEN));
ResetCList(hwndDlg);
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index a8a444b2de..bd4d490316 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -304,7 +304,7 @@ static INT_PTR ReadMessageCommand(WPARAM, LPARAM lParam) INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE) wParam;
+ HANDLE hContact = (HANDLE)wParam;
TNewWindowData newData = { 0 };
int isSplit = 1;
@@ -362,7 +362,7 @@ INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam) INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE) wParam;
+ HANDLE hContact = (HANDLE)wParam;
TNewWindowData newData = { 0 };
int isSplit = 1;
@@ -398,7 +398,7 @@ INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) SendMessage(hwnd, DM_ACTIVATEME, 0, 0); // ask the message window about its parent...
} else {
TCHAR szName[CONTAINER_NAMELEN + 1];
- GetContainerNameForContact((HANDLE) wParam, szName, CONTAINER_NAMELEN);
+ GetContainerNameForContact((HANDLE)wParam, szName, CONTAINER_NAMELEN);
TContainerData *pContainer = FindContainerByName(szName);
if (pContainer == NULL)
pContainer = CreateContainer(szName, FALSE, hContact);
@@ -586,8 +586,8 @@ int LoadSendRecvMessageModule(void) Win7Taskbar->updateMetrics();
ZeroMemory((void*)&nen_options, sizeof(nen_options));
- M.m_hMessageWindowList = (HANDLE) CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
- PluginConfig.hUserPrefsWindowList = (HANDLE) CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
+ M.m_hMessageWindowList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
+ PluginConfig.hUserPrefsWindowList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
sendQueue = new SendQueue;
Skin = new CSkin;
sendLater = new CSendLater;
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 2b3242b6b0..36a06aa8eb 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -341,7 +341,7 @@ struct TWindowData BOOL bActualHistory;
POINT ptTipActivation;
LONG iInputAreaHeight;
- bool fIsAutosizingInput;
+ bool bIsAutosizingInput;
bool fLimitedUpdate;
};
diff --git a/plugins/TabSRMM/src/nen.h b/plugins/TabSRMM/src/nen.h index 36cdf03ab2..c59846b9e0 100644 --- a/plugins/TabSRMM/src/nen.h +++ b/plugins/TabSRMM/src/nen.h @@ -43,8 +43,7 @@ #define MODULE "tabSRMM_NEN"
-int tabSRMM_ShowPopup(WPARAM wParam, LPARAM lParam, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto, TWindowData *dat);
-
+int tabSRMM_ShowPopup(HANDLE hContact, HANDLE hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto, TWindowData *dat);
#define DEFAULT_COLBACK RGB(255,255,128)
#define DEFAULT_COLTEXT RGB(0,0,0)
@@ -137,7 +136,7 @@ struct NEN_OPTIONS struct EVENT_DATAT
{
HANDLE hEvent;
- TCHAR szText[MAX_SECONDLINE + 2];
+ TCHAR tszText[MAX_SECONDLINE + 2];
DWORD timestamp;
};
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp index 41658aaf49..339f12131e 100644 --- a/plugins/TabSRMM/src/sendlater.cpp +++ b/plugins/TabSRMM/src/sendlater.cpp @@ -58,12 +58,12 @@ bool CSendLaterJob::isPersistentJob() bool CSendLaterJob::mustDelete()
{
if (fSuccess)
- return(true);
- else if (fFailed) {
- if (bCode == JOB_REMOVABLE)
- return(true);
- }
- return(false);
+ return true;;
+
+ if (fFailed && bCode == JOB_REMOVABLE)
+ return true;
+
+ return false;
}
/**
@@ -228,7 +228,7 @@ void CSendLater::startJobListProcess() bool CSendLater::processCurrentJob()
{
if (m_sendLaterJobList.empty() || m_jobIterator == m_sendLaterJobList.end())
- return(false);
+ return false;
if ((*m_jobIterator)->fSuccess || (*m_jobIterator)->fFailed) {
if ((*m_jobIterator)->mustDelete()) {
diff --git a/plugins/TabSRMM/src/sendlater.h b/plugins/TabSRMM/src/sendlater.h index e0d4b91ec8..17e5d277cb 100644 --- a/plugins/TabSRMM/src/sendlater.h +++ b/plugins/TabSRMM/src/sendlater.h @@ -107,9 +107,9 @@ public: bool haveJobs() const
{
if (m_sendLaterJobList.empty() || m_jobIterator == m_sendLaterJobList.end())
- return(false);
+ return false;
else
- return(true);
+ return true;;
}
bool processCurrentJob();
void processContacts();
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index d228173c73..1fb5b3dcdc 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -323,7 +323,7 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry) int iSendLength = getSendLength(iEntry, dat->sendMode);
for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
CContactCache *c = CContactCache::getContactCache(hContact);
if (c)
@@ -340,7 +340,7 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry) }
for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
doSendLater(iEntry, 0, hContact, false);
iJobs++;
@@ -414,7 +414,7 @@ send_unsplitted: clearJob(iEntry);
return 0;
}
- m_jobs[iEntry].hSendId = (HANDLE) CallContactService(dat->hContact, PSS_MESSAGE,
+ m_jobs[iEntry].hSendId = (HANDLE)CallContactService(dat->hContact, PSS_MESSAGE,
(dat->sendMode & SMODE_FORCEANSI) ? (m_jobs[iEntry].dwFlags & ~PREF_UNICODE) : m_jobs[iEntry].dwFlags, (LPARAM)m_jobs[iEntry].szSendBuffer);
if (dat->sendMode & SMODE_NOACK) { // fake the ack if we are not interested in receiving real acks
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp index 719a7641dc..6ecef2f8b5 100644 --- a/plugins/TabSRMM/src/taskbar.cpp +++ b/plugins/TabSRMM/src/taskbar.cpp @@ -76,9 +76,9 @@ bool CTaskbarInteract::setOverlayIcon(HWND hwndDlg, LPARAM lParam) const {
if (m_pTaskbarInterface && m_isEnabled && m_fHaveLargeicons) {
m_pTaskbarInterface->SetOverlayIcon(hwndDlg,(HICON)lParam, NULL);
- return(true);
+ return true;;
}
- return(false);
+ return false;
}
/**
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index b879ed95c4..d1c97d4276 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -2231,9 +2231,9 @@ bool __fastcall CSkin::DrawItem(const HDC hdc, const RECT *rc, const CSkinItem * if (!item->IGNORED) {
::DrawAlpha(hdc, const_cast<RECT *>(rc), item->COLOR, item->ALPHA, item->COLOR2, item->COLOR2_TRANSPARENT,
item->GRADIENT, item->CORNER, item->BORDERSTYLE, item->imageItem);
- return(true);
+ return true;;
}
- return(false);
+ return false;
}
/**
@@ -2332,7 +2332,7 @@ void CSkin::RenderToolbarBG(const TWindowData *dat, HDC hdc, const RECT &rcWindo }
::GetWindowRect(::GetDlgItem(dat->hwnd, dat->bType == SESSIONTYPE_CHAT ? IDC_CHAT_MESSAGE : IDC_MESSAGE), &rc);
- pt.y = rc.top - (dat->fIsAutosizingInput ? 1 : 2);
+ pt.y = rc.top - (dat->bIsAutosizingInput ? 1 : 2);
::ScreenToClient(dat->hwnd, &pt);
rcToolbar.bottom = pt.y;
}
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index 10eb677481..8d0793e9ca 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -363,7 +363,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA }
ppd.lchIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
- ppd.lchContact = (HANDLE) wParam;
+ ppd.lchContact = (HANDLE)wParam;
ppd.PluginWindowProc = NULL;
ppd.PluginData = NULL;
PUAddPopupT(&ppd);
@@ -520,7 +520,7 @@ int TN_OptionsInitialize(WPARAM wParam, LPARAM lParam) int TN_ModuleInit()
{
- hPopupsList = (HANDLE) CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
+ hPopupsList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
OnePopup = M.GetByte(Module, SET_ONEPOPUP, DEF_ONEPOPUP);
ShowMenu = M.GetByte(Module, SET_SHOWDISABLEMENU, DEF_SHOWDISABLEMENU);
|