summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-11 16:45:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-11 16:45:44 +0000
commitfa837bfbc2a705947b14f1ce8ba36d996bb11104 (patch)
treeb3c9e91ac9cbaf6f82bcc9a5f243a50dbab91f88 /plugins/TabSRMM
parent57884d14f2085b95b253c37f5e142b19d42d586e (diff)
terrifying <s>scorpozoid</s> clutch removed from tabSRMM: now its own status icons are usual status icons
git-svn-id: http://svn.miranda-ng.org/main/trunk@4425 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/res/resource.rc6
-rw-r--r--plugins/TabSRMM/src/controls.cpp75
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp123
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp30
-rw-r--r--plugins/TabSRMM/src/msgs.h136
5 files changed, 177 insertions, 193 deletions
diff --git a/plugins/TabSRMM/res/resource.rc b/plugins/TabSRMM/res/resource.rc
index 1d5f8e539d..813812271c 100644
--- a/plugins/TabSRMM/res/resource.rc
+++ b/plugins/TabSRMM/res/resource.rc
@@ -9,8 +9,10 @@
//
#include <winres.h>
#include "..\..\..\include\statusmodes.h"
-
-
+
+
+
+
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp
index 436a56e14f..4c996bb5b4 100644
--- a/plugins/TabSRMM/src/controls.cpp
+++ b/plugins/TabSRMM/src/controls.cpp
@@ -935,8 +935,8 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
GetWindowRect(hWnd, &rcs);
int statwidths[5];
- statwidths[0] = (rcs.right - rcs.left) - (2 * SB_CHAR_WIDTH + 20) - (52 + ((list_icons) * (PluginConfig.m_smcxicon + 2)));
- statwidths[1] = (rcs.right - rcs.left) - (62 + ((list_icons) * (PluginConfig.m_smcxicon + 2)));
+ statwidths[0] = (rcs.right - rcs.left) - (2 * SB_CHAR_WIDTH + 20) - (list_icons * (PluginConfig.m_smcxicon + 2));
+ statwidths[1] = (rcs.right - rcs.left) - (10 + (list_icons * (PluginConfig.m_smcxicon + 2)));
statwidths[2] = -1;
SendMessage(hWnd, SB_SETPARTS, 3, (LPARAM)statwidths);
}
@@ -991,7 +991,6 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
case WM_TIMER:
if (wParam == TIMERID_HOVER) {
POINT pt;
- char *szTTService = "mToolTip/ShowTipW";
CLCINFOTIP ti = {0};
ti.cbSize = sizeof(ti);
@@ -1000,50 +999,35 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
if (pt.x == ptMouse.x && pt.y == ptMouse.y) {
RECT rc;
struct TWindowData *dat = (struct TWindowData *)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
- //mad
SIZE size;
- TCHAR szStatusBarText[512];
- //mad_
+ TCHAR wBuf[512]; wBuf[0] = 0;
ti.ptCursor = pt;
ScreenToClient(hWnd, &pt);
SendMessage(hWnd, SB_GETRECT, 2, (LPARAM)&rc);
if (dat && PtInRect(&rc, pt)) {
- int gap = 2;
- unsigned int iconNum = (pt.x - rc.left) / (PluginConfig.m_smcxicon + gap);
-
- char *szModule = NULL; TCHAR *tszTooltip;
- int list_icons = 0;
- while (StatusIconData *sid = Srmm_GetNthIcon(dat->hContact, list_icons))
- if (list_icons++ == iconNum)
- szModule = sid->szModule, tszTooltip = sid->tszTooltip;
-
- if ((int)iconNum == list_icons && pContainer) {
- TCHAR wBuf[512];
-
- 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"));
- CallService(szTTService, (WPARAM)wBuf, (LPARAM)&ti);
- tooltip_active = TRUE;
- }
- else if ((int)iconNum == list_icons + 1 && dat && dat->bType == SESSIONTYPE_IM) {
- int mtnStatus = (int)M->GetByte(dat->hContact, SRMSGMOD, SRMSGSET_TYPING, M->GetByte(SRMSGMOD, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW));
- TCHAR wBuf[512];
-
- mir_sntprintf(wBuf, SIZEOF(wBuf), TranslateT("Sending typing notifications is %s."),
- mtnStatus ? TranslateT("enabled") : TranslateT("disabled"));
- CallService(szTTService, (WPARAM)wBuf, (LPARAM)&ti);
- tooltip_active = TRUE;
+ unsigned int iconNum = (pt.x - rc.left) / (PluginConfig.m_smcxicon + 2);
+ StatusIconData *sid = Srmm_GetNthIcon(dat->hContact, iconNum);
+ if (sid == NULL)
+ break;
+
+ if ( !strcmp(sid->szModule, MSG_ICON_MODULE)) {
+ if (sid->dwId == MSG_ICON_SOUND && pContainer)
+ 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) {
+ int mtnStatus = (int)M->GetByte(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"));
+ }
+ else if (sid->dwId == MSG_ICON_SESSION)
+ mir_sntprintf(wBuf, SIZEOF(wBuf), _T("%s"), TranslateT("Session list.\nClick left for a list of open sessions.\nClick right to access favorites and quickly configure message window behavior"));
}
- else if ((int)iconNum == list_icons + 2) {
- TCHAR wBuf[512];
-
- mir_sntprintf(wBuf, SIZEOF(wBuf), _T("%s"), TranslateT("Session list.\nClick left for a list of open sessions.\nClick right to access favorites and quickly configure message window behavior"));
+ else if (sid->tszTooltip)
+ _tcsncpy(wBuf, sid->tszTooltip, SIZEOF(wBuf));
- CallService(szTTService, (WPARAM)wBuf, (LPARAM)&ti);
- tooltip_active = TRUE;
- }
- else if (szModule) {
- CallService(szTTService, (WPARAM)tszTooltip, (LPARAM)&ti);
+ if (wBuf[0]) {
+ CallService("mToolTip/ShowTipW", (WPARAM)wBuf, (LPARAM)&ti);
tooltip_active = TRUE;
}
}
@@ -1057,18 +1041,17 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
iLength = SendDlgItemMessage(dat->hwnd, dat->bType == SESSIONTYPE_IM ? IDC_MESSAGE : IDC_CHAT_MESSAGE, EM_GETTEXTLENGTHEX, (WPARAM)& gtxl, 0);
tooltip_active = TRUE;
- TCHAR wBuf[512];
const TCHAR *szFormat = TranslateT("There are %d pending send jobs. Message length: %d bytes, message length limit: %d bytes\n\n%d messages are queued for later delivery");
mir_sntprintf(wBuf, SIZEOF(wBuf), szFormat, dat->iOpenJobs, iLength, dat->nMax ? dat->nMax : 20000, iQueued);
- CallService(szTTService, (WPARAM)wBuf, (LPARAM)&ti);
+ CallService("mToolTip/ShowTipW", (WPARAM)wBuf, (LPARAM)&ti);
}
- //MAD
- if (SendMessage(dat->pContainer->hwndStatus, SB_GETTEXT, 0, (LPARAM)szStatusBarText)) {
+
+ if (SendMessage(dat->pContainer->hwndStatus, SB_GETTEXT, 0, (LPARAM)wBuf)) {
HDC hdc;
int iLen=SendMessage(dat->pContainer->hwndStatus,SB_GETTEXTLENGTH,0,0);
SendMessage(hWnd, SB_GETRECT, 0, (LPARAM)&rc);
- GetTextExtentPoint32( hdc=GetDC( dat->pContainer->hwndStatus), szStatusBarText, iLen, &size );
+ GetTextExtentPoint32( hdc=GetDC( dat->pContainer->hwndStatus), wBuf, iLen, &size );
ReleaseDC (dat->pContainer->hwndStatus,hdc);
if (dat && PtInRect(&rc,pt)&&((rc.right-rc.left)<size.cx)) {
@@ -1078,7 +1061,7 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
M->GetTString(dat->hContact,dat->szProto,"Topic",&dbv);
tooltip_active = TRUE;
- CallService(szTTService, (WPARAM)dbv.ptszVal, (LPARAM)&ti);
+ CallService("mToolTip/ShowTipW", (WPARAM)dbv.ptszVal, (LPARAM)&ti);
if (dbv.pszVal)
db_free(&dbv);
}
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 39100dd91d..14bab6df9a 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1933,39 +1933,42 @@ void DrawStatusIcons(struct TWindowData *dat, HDC hDC, RECT r, int gap)
int nIcon = 0;
while (StatusIconData *si = Srmm_GetNthIcon(dat->hContact, nIcon++)) {
- if ((si->flags & MBF_DISABLED) && si->hIconDisabled)
- hIcon = si->hIconDisabled;
- else
- hIcon = si->hIcon;
-
- if (si->flags & MBF_DISABLED && si->hIconDisabled == (HICON)0)
- CSkin::DrawDimmedIcon(hDC, x, y, cx_icon, cy_icon, hIcon, 50);
- else
- DrawIconEx(hDC, x, y, hIcon, 16, 16, 0, NULL, DI_NORMAL);
-
- x += 16 + gap;
- }
- DrawIconEx(hDC, x, y, PluginConfig.g_buttonBarIcons[ICON_DEFAULT_SOUNDS],
- cx_icon, cy_icon, 0, NULL, DI_NORMAL);
+ if ( !strcmp(si->szModule, MSG_ICON_MODULE)) {
+ if (si->dwId == MSG_ICON_SOUND) {
+ DrawIconEx(hDC, x, y, PluginConfig.g_buttonBarIcons[ICON_DEFAULT_SOUNDS],
+ cx_icon, cy_icon, 0, NULL, DI_NORMAL);
+
+ DrawIconEx(hDC, x, y, dat->pContainer->dwFlags & CNT_NOSOUND ?
+ PluginConfig.g_iconOverlayDisabled : PluginConfig.g_iconOverlayEnabled,
+ cx_icon, cy_icon, 0, NULL, DI_NORMAL);
+ }
+ else if (si->dwId == MSG_ICON_UTN) {
+ if (dat->bType == SESSIONTYPE_IM) {
+ DrawIconEx(hDC, x, y, PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING], cx_icon, cy_icon, 0, NULL, DI_NORMAL);
- DrawIconEx(hDC, x, y, dat->pContainer->dwFlags & CNT_NOSOUND ?
- PluginConfig.g_iconOverlayDisabled : PluginConfig.g_iconOverlayEnabled,
- cx_icon, cy_icon, 0, NULL, DI_NORMAL);
+ DrawIconEx(hDC, x, y, M->GetByte(dat->hContact, SRMSGMOD, SRMSGSET_TYPING, M->GetByte(SRMSGMOD, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW)) ?
+ PluginConfig.g_iconOverlayEnabled : PluginConfig.g_iconOverlayDisabled, cx_icon, cy_icon, 0, NULL, DI_NORMAL);
+ }
+ else CSkin::DrawDimmedIcon(hDC, x, y, cx_icon, cy_icon, PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING], 50);
+ }
+ else if (si->dwId == MSG_ICON_SESSION) {
+ DrawIconEx(hDC, x, y, PluginConfig.g_sideBarIcons[0], cx_icon, cy_icon, 0, NULL, DI_NORMAL);
+ }
+ }
+ else {
+ if ((si->flags & MBF_DISABLED) && si->hIconDisabled)
+ hIcon = si->hIconDisabled;
+ else
+ hIcon = si->hIcon;
- x += (cx_icon + gap);
+ if (si->flags & MBF_DISABLED && si->hIconDisabled == (HICON)0)
+ CSkin::DrawDimmedIcon(hDC, x, y, cx_icon, cy_icon, hIcon, 50);
+ else
+ DrawIconEx(hDC, x, y, hIcon, 16, 16, 0, NULL, DI_NORMAL);
+ }
- if (dat->bType == SESSIONTYPE_IM) {
- DrawIconEx(hDC, x, y,
- PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING], cx_icon, cy_icon, 0, NULL, DI_NORMAL);
- DrawIconEx(hDC, x, y, M->GetByte(dat->hContact, SRMSGMOD, SRMSGSET_TYPING, M->GetByte(SRMSGMOD, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW)) ?
- PluginConfig.g_iconOverlayEnabled : PluginConfig.g_iconOverlayDisabled, cx_icon, cy_icon, 0, NULL, DI_NORMAL);
+ x += cx_icon + gap;
}
- else
- CSkin::DrawDimmedIcon(hDC, x, y, cx_icon, cy_icon,
- PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING], 50);
-
- x += (cx_icon + gap);
- DrawIconEx(hDC, x, y, PluginConfig.g_sideBarIcons[0], cx_icon, cy_icon, 0, NULL, DI_NORMAL);
}
void SI_CheckStatusIconClick(struct TWindowData *dat, HWND hwndFrom, POINT pt, RECT r, int gap, int code)
@@ -1979,42 +1982,39 @@ void SI_CheckStatusIconClick(struct TWindowData *dat, HWND hwndFrom, POINT pt, R
}
UINT iconNum = (pt.x - (r.left + 0)) / (PluginConfig.m_smcxicon + gap), list_icons = 0;
- DWORD dwID;
- char *szModule = NULL;
- if (dat)
- while (StatusIconData *si = Srmm_GetNthIcon(dat->hContact, list_icons)) {
- if (list_icons == iconNum)
- szModule = si->szModule, dwID = si->dwId;
- list_icons++;
- }
+ StatusIconData *si = Srmm_GetNthIcon((dat) ? dat->hContact : 0, iconNum);
+ if (si == NULL)
+ return;
- if ((int)iconNum == list_icons && code != NM_RCLICK) {
- if (GetKeyState(VK_SHIFT) & 0x8000) {
- for (TContainerData *p = pFirstContainer; p; p = p->pNext) {
- p->dwFlags = ((dat->pContainer->dwFlags & CNT_NOSOUND) ? p->dwFlags | CNT_NOSOUND : p->dwFlags & ~CNT_NOSOUND);
+ if ( !strcmp(si->szModule, MSG_ICON_MODULE)) {
+ if (si->dwId == MSG_ICON_SOUND && code != NM_RCLICK) {
+ if (GetKeyState(VK_SHIFT) & 0x8000) {
+ for (TContainerData *p = pFirstContainer; p; p = p->pNext) {
+ p->dwFlags = ((dat->pContainer->dwFlags & CNT_NOSOUND) ? p->dwFlags | CNT_NOSOUND : p->dwFlags & ~CNT_NOSOUND);
+ InvalidateRect(dat->pContainer->hwndStatus, NULL, TRUE);
+ }
+ }
+ else {
+ dat->pContainer->dwFlags ^= CNT_NOSOUND;
InvalidateRect(dat->pContainer->hwndStatus, NULL, TRUE);
}
}
- else {
- dat->pContainer->dwFlags ^= CNT_NOSOUND;
+ else if (si->dwId == MSG_ICON_UTN && code != NM_RCLICK && dat->bType == SESSIONTYPE_IM) {
+ SendMessage(dat->pContainer->hwndActive, WM_COMMAND, IDC_SELFTYPING, 0);
InvalidateRect(dat->pContainer->hwndStatus, NULL, TRUE);
}
+ else if (si->dwId == MSG_ICON_SESSION) {
+ if (code == NM_CLICK)
+ PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_TRAYICONNOTIFY, 101, WM_LBUTTONUP);
+ else if (code == NM_RCLICK)
+ PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_TRAYICONNOTIFY, 101, WM_RBUTTONUP);
+ }
}
- else if ((int)iconNum == list_icons + 1 && code != NM_RCLICK && dat->bType == SESSIONTYPE_IM) {
- SendMessage(dat->pContainer->hwndActive, WM_COMMAND, IDC_SELFTYPING, 0);
- InvalidateRect(dat->pContainer->hwndStatus, NULL, TRUE);
- }
- else if ((int)iconNum == list_icons + 2) {
- if (code == NM_CLICK)
- PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_TRAYICONNOTIFY, 101, WM_LBUTTONUP);
- else if (code == NM_RCLICK)
- PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_TRAYICONNOTIFY, 101, WM_RBUTTONUP);
- }
- else if (szModule) {
+ else {
StatusIconClickData sicd = { sizeof(sicd) };
GetCursorPos(&sicd.clickLocation);
- sicd.dwId = dwID;
- sicd.szModule = szModule;
+ sicd.dwId = si->dwId;
+ sicd.szModule = si->szModule;
sicd.flags = (code == NM_RCLICK ? MBCF_RIGHTBUTTON : 0);
NotifyEventHooks(hHookIconPressedEvt, (WPARAM)dat->hContact, (LPARAM)&sicd);
InvalidateRect(dat->pContainer->hwndStatus, NULL, TRUE);
@@ -2023,6 +2023,17 @@ void SI_CheckStatusIconClick(struct TWindowData *dat, HWND hwndFrom, POINT pt, R
int SI_InitStatusIcons()
{
+ StatusIconData sid = { sizeof(sid) };
+ sid.szModule = MSG_ICON_MODULE;
+ sid.dwId = MSG_ICON_SOUND; // Sounds
+ Srmm_AddIcon(&sid);
+
+ sid.dwId = MSG_ICON_UTN;
+ Srmm_AddIcon(&sid);
+
+ sid.dwId = MSG_ICON_SESSION;
+ Srmm_AddIcon(&sid);
+
HookEvent(ME_MSG_ICONSCHANGED, OnSrmmIconChanged);
hHookIconPressedEvt = CreateHookableEvent(ME_MSG_ICONPRESSED);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index c43e6d5685..29891b4142 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -3540,7 +3540,8 @@ quote_from_last:
if (PluginConfig.m_EscapeCloses == 1) {
SendMessage(hwndContainer, WM_SYSCOMMAND, SC_MINIMIZE, 0);
return(TRUE);
- } else if (PluginConfig.m_HideOnClose && PluginConfig.m_EscapeCloses == 2) {
+ }
+ else if (PluginConfig.m_HideOnClose && PluginConfig.m_EscapeCloses == 2) {
ShowWindow(hwndContainer, SW_HIDE);
return(TRUE);
}
@@ -3551,13 +3552,11 @@ quote_from_last:
if (dat->dwFlags & MWF_ERRORSTATE)
SendMessage(hwndDlg, DM_ERRORDECIDED, MSGERROR_CANCEL, 1);
else if (dat) {
- LRESULT result;
-
if (dat->dwFlagsEx & MWF_EX_WARNCLOSE)
return TRUE;
dat->dwFlagsEx |= MWF_EX_WARNCLOSE;
- result = SendQueue::WarnPendingJobs(0);
+ LRESULT result = SendQueue::WarnPendingJobs(0);
dat->dwFlagsEx &= ~MWF_EX_WARNCLOSE;
if (result == IDNO)
return TRUE;
@@ -3569,28 +3568,15 @@ quote_from_last:
return 1;
}
- TStatusBarIconNode *current;
-
- while (dat->pSINod) {
- current = dat->pSINod;
- dat->pSINod = dat->pSINod->next;
-
- mir_free(current->sid.szModule);
- DestroyIcon(current->sid.hIcon);
- if (current->sid.hIconDisabled) DestroyIcon(current->sid.hIconDisabled);
- if (current->sid.szTooltip) mir_free(current->sid.szTooltip);
- mir_free(current);
- }
-
m_pContainer->iChilds--;
i = GetTabIndexFromHWND(hwndTab, hwndDlg);
/*
- * after closing a tab, we need to activate the tab to the left side of
- * the previously open tab.
- * normally, this tab has the same index after the deletion of the formerly active tab
- * unless, of course, we closed the last (rightmost) tab.
- */
+ * after closing a tab, we need to activate the tab to the left side of
+ * the previously open tab.
+ * normally, this tab has the same index after the deletion of the formerly active tab
+ * unless, of course, we closed the last (rightmost) tab.
+ */
if (!m_pContainer->bDontSmartClose && iTabs > 1 && lParam != 3) {
if (i == iTabs - 1)
i--;
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index 1815b54228..34f6e27f3e 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -161,19 +161,22 @@ class CContactCache;
class CProxyWindow;
#define STICK_ICON_MSG 10
-struct TLogTheme {
- COLORREF inbg, outbg, bg, oldinbg, oldoutbg, statbg, inputbg;
- COLORREF hgrid;
- COLORREF custom_colors[5];
- DWORD dwFlags;
- DWORD left_indent, right_indent;
- LOGFONTA* logFonts;
- COLORREF* fontColors;
- char* rtfFonts;
- bool isPrivate;
+
+struct TLogTheme
+{
+ COLORREF inbg, outbg, bg, oldinbg, oldoutbg, statbg, inputbg;
+ COLORREF hgrid;
+ COLORREF custom_colors[5];
+ DWORD dwFlags;
+ DWORD left_indent, right_indent;
+ LOGFONTA *logFonts;
+ COLORREF *fontColors;
+ char *rtfFonts;
+ bool isPrivate;
};
-struct TContainerSettings {
+struct TContainerSettings
+{
bool fPrivate;
DWORD dwFlags;
DWORD dwFlagsEx;
@@ -187,65 +190,62 @@ struct TContainerSettings {
BYTE reserved[10];
};
-struct TContainerData {
+struct TContainerData
+{
TContainerData *pNext;
- TCHAR szName[CONTAINER_NAMELEN + 4]; // container name
- HWND hwndActive; // active message window
- HWND hwnd; // the container handle
- int iTabIndex; // next tab id
- int iChilds;
- int iContainerIndex;
- bool fHidden;
- HMENU hMenuContext;
- HWND hwndTip; // tab - tooltips...
- BOOL bDontSmartClose; // if set, do not search and select the next possible tab after closing one.
- DWORD dwFlags;
- DWORD dwFlagsEx;
- LONG uChildMinHeight;
- int tBorder;
- int tBorder_outer_left, tBorder_outer_right, tBorder_outer_top, tBorder_outer_bottom;
- HANDLE hContactFrom;
- BOOL isCloned;
- HWND hwndStatus;
- int statusBarHeight;
- DWORD dwLastActivity;
- int hIcon; // current window icon stick indicator
- HICON hIconTaskbarOverlay; // contains a "sticky" taskbar overlay (e.g. new message icon)
- DWORD dwFlashingStarted;
- HWND hWndOptions;
- BOOL bSizingLoop;
- TCHAR szRelThemeFile[MAX_PATH], szAbsThemeFile[MAX_PATH];
+
+ TCHAR szName[CONTAINER_NAMELEN + 4]; // container name
+ HWND hwndActive; // active message window
+ HWND hwnd; // the container handle
+ int iTabIndex; // next tab id
+ int iChilds;
+ int iContainerIndex;
+ bool fHidden;
+ HMENU hMenuContext;
+ HWND hwndTip; // tab - tooltips...
+ BOOL bDontSmartClose; // if set, do not search and select the next possible tab after closing one.
+ DWORD dwFlags;
+ DWORD dwFlagsEx;
+ LONG uChildMinHeight;
+ int tBorder;
+ int tBorder_outer_left, tBorder_outer_right, tBorder_outer_top, tBorder_outer_bottom;
+ HANDLE hContactFrom;
+ BOOL isCloned;
+ HWND hwndStatus;
+ int statusBarHeight;
+ DWORD dwLastActivity;
+ int hIcon; // current window icon stick indicator
+ HICON hIconTaskbarOverlay; // contains a "sticky" taskbar overlay (e.g. new message icon)
+ DWORD dwFlashingStarted;
+ HWND hWndOptions;
+ BOOL bSizingLoop;
+ TCHAR szRelThemeFile[MAX_PATH], szAbsThemeFile[MAX_PATH];
TTemplateSet *ltr_templates, *rtl_templates;
- HDC cachedDC;
- HBITMAP cachedHBM, oldHBM;
- SIZE oldDCSize;
- RECT rcClose, rcMin, rcMax;
- struct TitleBtn buttons[3];
- struct TitleBtn oldbuttons[3];
- int ncActive;
- HWND hwndSaved;
+ HDC cachedDC;
+ HBITMAP cachedHBM, oldHBM;
+ SIZE oldDCSize;
+ RECT rcClose, rcMin, rcMax;
+ TitleBtn buttons[3];
+ TitleBtn oldbuttons[3];
+ int ncActive;
+ HWND hwndSaved;
ButtonItem *buttonItems;
- RECT rcSaved, rcLogSaved;
- POINT ptLogSaved;
- DWORD exFlags;
- BOOL fPrivateThemeChanged;
- MARGINS mOld;
+ RECT rcSaved, rcLogSaved;
+ POINT ptLogSaved;
+ DWORD exFlags;
+ BOOL fPrivateThemeChanged;
+ MARGINS mOld;
HDC cachedToolbarDC;
- HBITMAP hbmToolbarBG, oldhbmToolbarBG;
- SIZE szOldToolbarSize;
- SIZE oldSize, preSIZE;
- WORD avatarMode, ownAvatarMode;
- BYTE bTBRenderingMode;
- TLogTheme theme;
+ HBITMAP hbmToolbarBG, oldhbmToolbarBG;
+ SIZE szOldToolbarSize;
+ SIZE oldSize, preSIZE;
+ WORD avatarMode, ownAvatarMode;
+ BYTE bTBRenderingMode;
+ TLogTheme theme;
TContainerSettings* settings;
CTaskbarInteract* TaskBar;
- CMenuBar* MenuBar;
- CSideBar* SideBar;
-};
-
-struct TStatusBarIconNode {
- TStatusBarIconNode* next;
- StatusIconData sid;
+ CMenuBar *MenuBar;
+ CSideBar *SideBar;
};
struct SESSIONINFO_TYPE;
@@ -278,7 +278,6 @@ struct TWindowData
UINT bbRSideWidth; //MAD
BYTE kstate[256];
- TStatusBarIconNode *pSINod;
SESSIONINFO_TYPE* si;
RECT rcNick, rcUIN, rcStatus, rcPic;
@@ -1017,8 +1016,11 @@ typedef struct {
* encryption status bar indicator
*/
-// extern HANDLE hHookIconPressedEvt;
-extern int status_icon_list_size;
+#define MSG_ICON_MODULE "\x01TabSrmm"
+
+#define MSG_ICON_SESSION 0
+#define MSG_ICON_UTN 1
+#define MSG_ICON_SOUND 2
int SI_InitStatusIcons();
int SI_DeinitStatusIcons();