[miranda] r10715 committed - * fixed image list gdi leak in option page...

9 views
Skip to first unread message

codesite...@google.com

unread,
Sep 16, 2009, 3:38:59 PM9/16/09
to miranda-i...@googlegroups.com
Revision: 10715
Author: silvercircle
Date: Wed Sep 16 12:37:55 2009
Log: * fixed image list gdi leak in option page
* translation updates by ghazan
* other small fixes
http://code.google.com/p/miranda/source/detail?r=10715

Modified:
/trunk/miranda/plugins/tabsrmm/chat/muchighlight.cpp
/trunk/miranda/plugins/tabsrmm/chat/muchighlight.h
/trunk/miranda/plugins/tabsrmm/chat/tools.cpp
/trunk/miranda/plugins/tabsrmm/chat/window.cpp
/trunk/miranda/plugins/tabsrmm/resource.rc
/trunk/miranda/plugins/tabsrmm/src/buttonsbar.cpp
/trunk/miranda/plugins/tabsrmm/src/commonheaders.h
/trunk/miranda/plugins/tabsrmm/src/container.cpp
/trunk/miranda/plugins/tabsrmm/src/controls.h
/trunk/miranda/plugins/tabsrmm/src/eventpopups.cpp
/trunk/miranda/plugins/tabsrmm/src/generic_msghandlers.cpp
/trunk/miranda/plugins/tabsrmm/src/infopanel.h
/trunk/miranda/plugins/tabsrmm/src/mim.h
/trunk/miranda/plugins/tabsrmm/src/msgdialog.cpp
/trunk/miranda/plugins/tabsrmm/src/msgoptions.cpp
/trunk/miranda/plugins/tabsrmm/src/resource.h
/trunk/miranda/plugins/tabsrmm/src/sidebar.h
/trunk/miranda/plugins/tabsrmm/src/templates.cpp
/trunk/miranda/plugins/tabsrmm/src/themes.h

=======================================
--- /trunk/miranda/plugins/tabsrmm/chat/muchighlight.cpp Wed Sep 16
04:10:49 2009
+++ /trunk/miranda/plugins/tabsrmm/chat/muchighlight.cpp Wed Sep 16
12:37:55 2009
@@ -34,7 +34,7 @@

#include "../src/commonheaders.h"

-//#define __HLT_PERFSTATS 1
+#define __HLT_PERFSTATS 1

void CMUCHighlight::cleanup()
{
@@ -43,8 +43,16 @@
if(m_TextPatternString)
mir_free(m_TextPatternString);

- m_NickPatterns.clear();
- m_TextPatterns.clear();
+ //m_NickPatterns.clear();
+ //m_TextPatterns.clear();
+
+ if(m_NickPatterns)
+ mir_free(m_NickPatterns);
+ if(m_TextPatterns)
+ mir_free(m_TextPatterns);
+
+ m_iNickPatterns = m_iTextPatterns = 0;
+ m_NickPatterns = m_TextPatterns = 0;
}

void CMUCHighlight::init()
@@ -66,27 +74,17 @@

m_dwFlags = M->GetDword("Chat", "HighlightEnabled", MATCH_TEXT);

- tokenize(m_TextPatternString, m_TextPatterns);
- tokenize(m_NickPatternString, m_NickPatterns);
-
- /*
- PatternIterator it = m_TextPatterns.begin();
-
- while(it != m_TextPatterns.end()) {
- _DebugTraceW(_T("Text pattern: '%s'"), *it);
- it++;
- }
-
- it = m_NickPatterns.begin();
-
- while(it != m_NickPatterns.end()) {
- _DebugTraceW(_T("Nick pattern: '%s'"), *it);
- it++;
- }
- */
+ tokenize(m_TextPatternString, m_TextPatterns, m_iTextPatterns);
+ tokenize(m_NickPatternString, m_NickPatterns, m_iNickPatterns);
+
+ /*for(int i = 0; i < m_iTextPatterns; i++)
+ _DebugTraceW(_T("textpattern: %s %c, %c"), m_TextPatterns[i],
*(m_TextPatterns[i]), *((m_TextPatterns[i] + 1)));
+
+ for(i = 0; i < m_iNickPatterns; i++)
+ _DebugTraceW(_T("NICKpattern: %s"), m_NickPatterns[i]);*/
}

-void CMUCHighlight::tokenize(TCHAR *tszString, PatternList& v)
+void CMUCHighlight::tokenize(TCHAR *tszString, TCHAR**& patterns, UINT& nr)
{
if(tszString == 0)
return;
@@ -96,8 +94,28 @@
if(*p == 0)
return;

+ nr = 0;
+
if(*p != ' ')
- v.push_back(tszString);
+ nr++;
+
+ while(*p) {
+ if(*p == ' ') {
+ *p++;
+ while(*p && _istspace(*p))
+ p++;
+ if(*p)
+ nr++;
+ }
+ p++;
+ }
+ patterns = (TCHAR **)mir_alloc(nr * sizeof(TCHAR *));
+
+ p = tszString;
+ nr = 0;
+
+ if(*p != ' ')
+ patterns[nr++] = p;

while(*p) {
if(*p == ' ') {
@@ -105,7 +123,7 @@
while(*p && _istspace(*p))
p++;
if(*p)
- v.push_back(p);
+ patterns[nr++] = p;
}
p++;
}
@@ -114,7 +132,6 @@
int CMUCHighlight::match(const GCEVENT *pgce, const SESSION_INFO *psi,
DWORD dwFlags, const TCHAR *tszAdditonal)
{
int result = 0, nResult = 0;
- PatternIterator it;

if(pgce == 0)
return(0);
@@ -126,15 +143,17 @@
#endif

int words = 0;
- size_t patterns = m_TextPatterns.size();
-
- if((m_dwFlags & MATCH_TEXT) && (dwFlags & MATCH_TEXT) &&
m_TextPatterns.size() > 0) {
+ //size_t patterns = m_TextPatterns.size();
+ size_t patterns = m_iTextPatterns;
+
+ if((m_dwFlags & MATCH_TEXT) && (dwFlags & MATCH_TEXT) && m_iTextPatterns
> 0) {
#ifdef __HLT_PERFSTATS
::QueryPerformanceCounter((LARGE_INTEGER *)&lStart);
#endif
TCHAR *tszCleaned = ::RemoveFormatting(pgce->ptszText, true);
register TCHAR *p = tszCleaned;
register TCHAR *p1;
+ UINT i = 0;

TCHAR *tszMe = mir_tstrdup(psi->pMe->pszNick);
_tcslwr(tszMe);
@@ -154,14 +173,13 @@
else
p1 = 0;

- it = m_TextPatterns.begin();
- while(it != m_TextPatterns.end() && !result) {
- if(*(*it) == '%' && *(*it + 1) == 'm') {
+ for(i = 0; i < m_iTextPatterns && !result; i++) {
+ if(*(m_TextPatterns[i]) == '%' && *((m_TextPatterns[i]) + 1) == 'm')
{
result = wildmatch(tszMe, p) ? MATCH_TEXT : 0;
} else
- result = wildmatch(*it, p) ? MATCH_TEXT : 0;
- it++;
- }
+ result = wildmatch(m_TextPatterns[i], p) ? MATCH_TEXT : 0;
+ }
+
if(p1) {
*p1 = ' ';
p = p1 + 1;
@@ -188,20 +206,18 @@
mir_free(tszMe);

}
- if((m_dwFlags & MATCH_NICKNAME) && (dwFlags & MATCH_NICKNAME) &&
pgce->ptszNick && m_NickPatterns.size() > 0) {
- it = m_NickPatterns.begin();
-
- while(it != m_NickPatterns.end() && !nResult) {
- nResult = wildmatch(*it, pgce->ptszNick) ? MATCH_NICKNAME : 0;
+ if((m_dwFlags & MATCH_NICKNAME) && (dwFlags & MATCH_NICKNAME) &&
pgce->ptszNick && m_iNickPatterns > 0) {
+
+ for(UINT i = 0; i < m_iNickPatterns && !nResult; i++) {
+ nResult = wildmatch(m_NickPatterns[i], pgce->ptszNick) ?
MATCH_NICKNAME : 0;
if(tszAdditonal) {
- nResult = wildmatch(*it, tszAdditonal) ? MATCH_NICKNAME : 0;
+ nResult = wildmatch(m_NickPatterns[i], tszAdditonal) ?
MATCH_NICKNAME : 0;
//_DebugTraceW(_T("match %s against additional: %s (%d)"), *it,
tszAdditonal, nResult);
}
if((m_dwFlags & MATCH_UIN) && pgce->ptszUserInfo) {
- nResult = wildmatch(*it, pgce->ptszUserInfo) ? MATCH_NICKNAME : 0;
+ nResult = wildmatch(m_NickPatterns[i], pgce->ptszUserInfo) ?
MATCH_NICKNAME : 0;
//_DebugTraceW(_T("match %s against UID: %s (%d)"), *it,
pgce->ptszUserInfo, nResult);
}
- it++;
}
}

@@ -243,82 +259,6 @@
return(!*pattern);
}

-/*
-BOOL CMUCHighlight::textMatch(SESSION_INFO* si, const TCHAR* pszText)
-{
- TCHAR* p1 = m_TextPatternString;
- TCHAR* p2 = NULL;
- const TCHAR* p3 = pszText;
- static TCHAR szWord1[1000];
- static TCHAR szWord2[1000];
- static TCHAR szTrimString[] = _T(":,.!?;\'>)");
-
- // compare word for word
- while (*p1 != '\0') {
- // find the next/first word in the highlight word string
- // skip 'spaces' be4 the word
- while (*p1 == ' ' && *p1 != '\0')
- p1 += 1;
-
- //find the end of the word
- p2 = _tcschr(p1, ' ');
- if (!p2)
- p2 = _tcschr(p1, '\0');
- if (p1 == p2)
- return FALSE;
-
- // copy the word into szWord1
- lstrcpyn(szWord1, p1, p2 - p1 > 998 ? 999 : p2 - p1 + 1);
- p1 = p2;
-
- // replace %m with the users nickname
- p2 = _tcschr(szWord1, '%');
- if (p2 && p2[1] == 'm') {
- TCHAR szTemp[50];
-
- p2[1] = 's';
- lstrcpyn(szTemp, szWord1, SIZEOF(szTemp));
- mir_sntprintf(szWord1, SIZEOF(szWord1), szTemp, si->pMe->pszNick);
- }
-
- // time to get the next/first word in the incoming text string
- while (*p3 != '\0') {
- // skip 'spaces' be4 the word
- while (*p3 == ' ' && *p3 != '\0')
- p3 += 1;
-
- //find the end of the word
- p2 = (TCHAR *)_tcschr(p3, ' ');
- if (!p2)
- p2 = (TCHAR *)_tcschr(p3, '\0');
-
-
- if (p3 != p2) {
- // eliminate ending character if needed
- if (p2 - p3 > 1 && _tcschr(szTrimString, p2[-1]))
- p2 -= 1;
-
- // copy the word into szWord2 and remove formatting
- lstrcpyn(szWord2, p3, p2 - p3 > 998 ? 999 : p2 - p3 + 1);
-
- // reset the pointer if it was touched because of an ending character
- if (*p2 != '\0' && *p2 != ' ')
- p2 += 1;
- p3 = p2;
-
- CharLower(szWord1);
- CharLower(szWord2);
-
- // compare the words, using wildcards
- if (WCCmp(szWord1, RemoveFormatting(szWord2)))
- return TRUE;
- }
- }
- p3 = pszText;
- }
- return FALSE;
-}
-*/
/**
* Dialog procedure to handle global highlight settings
*
=======================================
--- /trunk/miranda/plugins/tabsrmm/chat/muchighlight.h Wed Sep 16 04:10:49
2009
+++ /trunk/miranda/plugins/tabsrmm/chat/muchighlight.h Wed Sep 16 12:37:55
2009
@@ -32,9 +32,6 @@
*
*/

-typedef std::vector<TCHAR *> PatternList;
-typedef std::vector<TCHAR *>::iterator PatternIterator;
-
class CMUCHighlight {

public:
@@ -49,6 +46,8 @@
{
m_fInitialized = false;
m_TextPatternString = m_NickPatternString = 0;
+ m_NickPatterns = m_TextPatterns = 0;
+ m_iNickPatterns = m_iTextPatterns = 0;
init();
}

@@ -65,12 +64,14 @@
static INT_PTR CALLBACK dlgProc (HWND hwndDlg, UINT
msg, WPARAM wParam, LPARAM lParam); // option page dlg proc
static INT_PTR CALLBACK dlgProcAdd (HWND hwndDlg, UINT
msg, WPARAM wParam, LPARAM lParam); // for the "add to" dialog
private:
- void tokenize (TCHAR *tszString,
PatternList& v);
+ void tokenize(TCHAR *tszString, TCHAR**& patterns, UINT& nr);
int wildmatch (const TCHAR *pattern, const TCHAR *tszString);
DWORD m_dwFlags;
bool m_fInitialized;
- PatternList m_NickPatterns;
- PatternList m_TextPatterns;
+ TCHAR** m_NickPatterns;
+ TCHAR** m_TextPatterns;
+ UINT m_iNickPatterns;
+ UINT m_iTextPatterns;
TCHAR* m_NickPatternString;
TCHAR* m_TextPatternString;
};
=======================================
--- /trunk/miranda/plugins/tabsrmm/chat/tools.cpp Wed Sep 16 04:10:49 2009
+++ /trunk/miranda/plugins/tabsrmm/chat/tools.cpp Wed Sep 16 12:37:55 2009
@@ -108,23 +108,19 @@
break;

default:
- if(fToLower)
- szTemp[j] = _totlower(pszWord[i]);
- else
- szTemp[j] = pszWord[i];
+ szTemp[j] = pszWord[i];
j++;
i++;
break;
}
} else {
- if(fToLower)
- szTemp[j] = _totlower(pszWord[i]);
- else
- szTemp[j] = pszWord[i];
+ szTemp[j] = pszWord[i];
j++;
i++;
}
}
+ if(fToLower)
+ _tcslwr(szTemp);
return (TCHAR*) &szTemp;
}

=======================================
--- /trunk/miranda/plugins/tabsrmm/chat/window.cpp Wed Sep 16 04:10:49 2009
+++ /trunk/miranda/plugins/tabsrmm/chat/window.cpp Wed Sep 16 12:37:55 2009
@@ -3411,9 +3411,7 @@
break;

case WM_ERASEBKGND:
- //if (dat->pContainer->bSkinned || M->isAero() || M->isVSThemed())
- return TRUE;
- break;
+ return(1);

case WM_NCPAINT:
if (CSkin::m_skinEnabled)
=======================================
--- /trunk/miranda/plugins/tabsrmm/resource.rc Wed Sep 16 04:10:49 2009
+++ /trunk/miranda/plugins/tabsrmm/resource.rc Wed Sep 16 12:37:55 2009
@@ -33,7 +33,7 @@
IDD_INFOPANEL DIALOGEX 0, 0, 282, 176
STYLE DS_FIXEDSYS | WS_CHILD | WS_BORDER
EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
LTEXT "",IDC_STATIC,0,0,281,175
LTEXT "Customize the panel",IDC_IPCONFIG_TITLE,6,4,271,11
@@ -41,7 +41,8 @@
LTEXT "",IDC_STATIC_VISIBILTY,10,27,128,10
COMBOBOX IDC_PANELVISIBILITY,149,24,118,16,CBS_DROPDOWNLIST |
CBS_SORT | WS_VSCROLL | WS_TABSTOP
- LTEXT "Use global or private panel
height",IDC_STATIC,10,42,128,10
+ LTEXT "Use global or private panel height",IDC_STATIC,10,42,
+ 128,10
COMBOBOX IDC_PANELSIZE,149,39,118,16,CBS_DROPDOWNLIST |
CBS_SORT |
WS_VSCROLL | WS_TABSTOP
GROUPBOX "Set size to",IDC_GROUP_SIZE,5,59,271,45
@@ -86,7 +87,7 @@
WS_TABSTOP | 0x1,11,210,158,9
PUSHBUTTON "Revert to (safe)
defaults",IDC_PLUS_REVERT,180,207,111,
14
- CONTROL "",IDC_PLUS_CHECKTREE,"SysTreeView32",TVS_HASBUTTONS |
+ CONTROL "",IDC_PLUS_CHECKTREE,"SysTreeView32",
/*TVS_HASBUTTONS | */
TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_BORDER |
WS_TABSTOP,6,8,294,137
END
@@ -135,7 +136,7 @@
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
UDS_ARROWKEYS,199,196,11,13
PUSHBUTTON "Preview",IDC_PREVIEW,261,178,48,46
- CONTROL "",IDC_EVENTOPTIONS,"SysTreeView32",TVS_HASBUTTONS |
+ CONTROL "",IDC_EVENTOPTIONS,"SysTreeView32",/* TVS_HASBUTTONS
| */
TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_BORDER |
WS_TABSTOP,6,8,303,109
CONTROL "",IDC_COLTEXT_MUC,"ColourPicker",WS_TABSTOP,56,211,24,
@@ -409,7 +410,7 @@
LTEXT "Send text formatting:",IDC_STATIC,9,211,132,11
COMBOBOX IDC_SENDFORMATTING,143,209,74,46,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",IDC_WINDOWOPTIONS,"SysTreeView32",TVS_HASBUTTONS |
+ CONTROL "",IDC_WINDOWOPTIONS,"SysTreeView32",/* TVS_HASBUTTONS
| */
TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_BORDER |
WS_TABSTOP,6,8,294,76
CONTROL "Try to keep original size",IDC_PRESERVEAVATARSIZE,
@@ -465,7 +466,7 @@
UDS_NOTHOUSANDS | UDS_HOTTRACK |
WS_DISABLED,200,209,10,
14
LTEXT "Events",IDC_STATIC,215,212,82,8
- CONTROL "",IDC_LOGOPTIONS,"SysTreeView32",TVS_HASBUTTONS |
+ CONTROL "",IDC_LOGOPTIONS,"SysTreeView32",/* TVS_HASBUTTONS |
*/
TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_BORDER |
WS_TABSTOP,6,8,294,95
LTEXT "minutes old",IDC_STMINSOLD,215,200,83,8,WS_DISABLED
@@ -528,7 +529,7 @@
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
UDS_ARROWKEYS,191,208,11,13
LTEXT "characters",IDC_STATIC,208,210,88,9
- CONTROL "",IDC_TABMSGOPTIONS,"SysTreeView32",TVS_HASBUTTONS |
+ CONTROL "",IDC_TABMSGOPTIONS,"SysTreeView32",/* TVS_HASBUTTONS
| */
TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_BORDER |
WS_HSCROLL | WS_TABSTOP,6,8,294,135
LTEXT "ESC key behavior",IDC_STATIC,38,161,135,9
@@ -559,7 +560,7 @@
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
CONTROL "",IDC_TOOLBARTREE,"SysTreeView32",TVS_SHOWSELALWAYS |
- TVS_NOTOOLTIPS | TVS_CHECKBOXES | TVS_FULLROWSELECT |
+ TVS_NOTOOLTIPS | /*TVS_CHECKBOXES |*/
TVS_FULLROWSELECT |
WS_TABSTOP,16,23,116,178,WS_EX_CLIENTEDGE
CONTROL "Show this button in regular
window",IDC_IMCHECK,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,144,51,155,10
@@ -672,10 +673,10 @@
LTEXT "",IDC_INFO2,6,143,290,10
END

-IDD_TEMPLATEEDIT DIALOGEX 0, 0, 368, 231
+IDD_TEMPLATEEDIT DIALOG DISCARDABLE 0, 0, 368, 231
STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
+FONT 8, "MS Shell Dlg"
BEGIN
GROUPBOX "Templates",IDC_STATIC,3,4,108,94
LISTBOX IDC_TEMPLATELIST,8,14,97,81,LBS_OWNERDRAWVARIABLE |
@@ -685,11 +686,10 @@
0x844,122,14,236,80
GROUPBOX "Edit template",IDC_STATIC,3,99,363,129
EDITTEXT IDC_EDITTEMPLATE,11,109,344,14,ES_AUTOHSCROLL
- PUSHBUTTON "Quick help on Variables...",IDC_VARHELP,11,128,125,15
LTEXT "Double click a template to edit it. Select a template
from the list box and click ""Update Preview"" to show a preview message.",
- IDC_STATIC,146,126,209,26
+ IDC_STATIC,11,126,342,26
CONTROL "Get more help on
variables",IDC_VARIABLESHELP,"Hyperlink",
- WS_TABSTOP | 0x1,12,147,148,10
+ WS_TABSTOP | 0x1,13,157,148,10
LTEXT "Define up to 5 colors which you can use with some
variables",
IDC_STATIC,12,193,174,17
CONTROL "",IDC_COLOR1,"ColourPicker",WS_TABSTOP,11,213,24,13
=======================================
--- /trunk/miranda/plugins/tabsrmm/src/buttonsbar.cpp Sat Sep 12 21:06:17
2009
+++ /trunk/miranda/plugins/tabsrmm/src/buttonsbar.cpp Wed Sep 16 12:37:55
2009
@@ -1177,6 +1177,8 @@
TreeView_DeleteAllItems(hToolBarTree);

himgl = ImageList_Create(GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 2, 2);
+ HIMAGELIST himl = TreeView_GetImageList(hToolBarTree, TVSIL_NORMAL);
+ ImageList_Destroy(himl);
TreeView_SetImageList(hToolBarTree, himgl, TVSIL_NORMAL);


@@ -1250,7 +1252,7 @@
hToolBarTree = GetDlgItem(hwndDlg, IDC_TOOLBARTREE);

style = GetWindowLongPtr(hToolBarTree, GWL_STYLE);
- style ^= TVS_CHECKBOXES;
+ //style ^= TVS_CHECKBOXES;
SetWindowLongPtr(hToolBarTree, GWL_STYLE, style);
style |= TVS_CHECKBOXES;
style |= TVS_NOHSCROLL;
@@ -1558,9 +1560,13 @@
}
break;

- case WM_DESTROY:
- ImageList_Destroy(himgl);
+ case WM_DESTROY: {
+ HIMAGELIST hIml = TreeView_GetImageList(GetDlgItem(hwndDlg,
IDC_TOOLBARTREE), TVSIL_NORMAL);
+ ImageList_Destroy(hIml);
+ hIml = TreeView_GetImageList(GetDlgItem(hwndDlg, IDC_TOOLBARTREE),
TVSIL_STATE);
+ ImageList_Destroy(hIml);
break;
+ }

default:
break;
=======================================
--- /trunk/miranda/plugins/tabsrmm/src/commonheaders.h Wed Sep 16 04:10:49
2009
+++ /trunk/miranda/plugins/tabsrmm/src/commonheaders.h Wed Sep 16 12:37:55
2009
@@ -56,6 +56,9 @@
#include <commctrl.h>
#include <uxtheme.h>

+#define TSAPI __stdcall
+#define FASTCALL __fastcall
+
typedef struct _DWM_THUMBNAIL_PROPERTIES
{
DWORD dwFlags;
=======================================
--- /trunk/miranda/plugins/tabsrmm/src/container.cpp Sun Sep 13 18:57:11
2009
+++ /trunk/miranda/plugins/tabsrmm/src/container.cpp Wed Sep 16 12:37:55
2009
@@ -1770,15 +1770,6 @@
if (bSkinned || fAero) {
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hwndDlg, &ps);
- /*
- RECT rc;
- GetClientRect(hwndDlg, &rc);
- FillRect(hdc, &rc, GetSysColorBrush(COLOR_3DFACE));
- if(fAero && !(pContainer->dwFlags & CNT_NOMENUBAR)) {
- rc.bottom = 20;
- FillRect(hdc, &rc, (HBRUSH)GetStockObject(BLACK_BRUSH));
- }
- */
EndPaint(hwndDlg, &ps);
return 0;
}
@@ -1794,9 +1785,8 @@
HDC hdc = (HDC)wParam;
RECT rc;
GetClientRect(hwndDlg, &rc);
- bool fAero = M->isAero();
-
- if (fAero) {
+
+ if (M->isAero()) {
HDC hdcMem;
HANDLE hbp;

=======================================
--- /trunk/miranda/plugins/tabsrmm/src/controls.h Wed Sep 16 04:10:49 2009
+++ /trunk/miranda/plugins/tabsrmm/src/controls.h Wed Sep 16 12:37:55 2009
@@ -47,25 +47,25 @@
CMenuBar(HWND hwndParent, const ContainerWindowData *pContainer);
~CMenuBar();

- const RECT& getClientRect();
- void Resize(WORD wWidth, WORD wHeight, BOOL redraw) const
+ const RECT& TSAPI getClientRect();
+ void TSAPI Resize(WORD wWidth, WORD wHeight, BOOL redraw) const
{
::SetWindowPos(m_hwndToolbar, 0, 4, 0, wWidth, m_size_y, SWP_NOZORDER |
SWP_NOACTIVATE |
SWP_NOCOPYBITS|SWP_NOREDRAW);

}
- LONG getHeight() const;
- void Show(int showCmd) const
+ LONG TSAPI getHeight() const;
+ void TSAPI Show(int showCmd) const
{
::ShowWindow(m_hwndToolbar, showCmd);
}
- LONG_PTR Handle(const NMTOOLBAR *nmtb);
- void Cancel();
- LONG_PTR processMsg(const UINT msg, const WPARAM wParam, const LPARAM
lParam);
- bool isContactMenu() const { return(m_isContactMenu); }
- bool isMainMenu() const { return(m_isMainMenu); }
- void configureMenu(void) const;
- void setActive(HMENU hMenu)
+ LONG_PTR TSAPI Handle(const NMTOOLBAR *nmtb);
+ void TSAPI Cancel();
+ LONG_PTR TSAPI processMsg(const UINT msg, const WPARAM wParam, const
LPARAM lParam);
+ bool TSAPI isContactMenu() const { return(m_isContactMenu); }
+ bool TSAPI isMainMenu() const { return(m_isMainMenu); }
+ void TSAPI configureMenu(void) const;
+ void TSAPI setActive(HMENU hMenu)
{
m_activeSubMenu = hMenu;
}
@@ -81,7 +81,7 @@

return(result);
}
- void autoShow(const int showcmd = 1);
+ void TSAPI autoShow(const int showcmd = 1);

const int idToIndex(const int id) const
{
@@ -122,12 +122,12 @@
static CMenuBar *m_Owner;
static int m_MimIconRefCount;
private:
- LONG_PTR customDrawWorker(NMCUSTOMDRAW *nm);
- void updateState(const HMENU hMenu) const;
- void invoke(const int id);
- void cancel(const int id);
- void obtainHook();
- void releaseHook();
+ LONG_PTR TSAPI customDrawWorker(NMCUSTOMDRAW *nm);
+ void TSAPI updateState(const HMENU hMenu) const;
+ void TSAPI invoke(const int id);
+ void TSAPI cancel(const int id);
+ void TSAPI obtainHook();
+ void TSAPI releaseHook();

static LRESULT CALLBACK MessageHook(int nCode, WPARAM wParam, LPARAM
lParam);
};
=======================================
--- /trunk/miranda/plugins/tabsrmm/src/eventpopups.cpp Sun Sep 13 18:57:11
2009
+++ /trunk/miranda/plugins/tabsrmm/src/eventpopups.cpp Wed Sep 16 12:37:55
2009
@@ -136,10 +136,10 @@
case WM_INITDIALOG: {
TVINSERTSTRUCT tvi = {0};
int i = 0;
-
SetWindowLongPtr(GetDlgItem(hWnd, IDC_EVENTOPTIONS), GWL_STYLE,
GetWindowLongPtr(GetDlgItem(hWnd, IDC_EVENTOPTIONS), GWL_STYLE) |
(TVS_NOHSCROLL | TVS_CHECKBOXES));
- SendDlgItemMessage(hWnd, IDC_EVENTOPTIONS, TVM_SETIMAGELIST,
TVSIL_STATE, (LPARAM)CreateStateImageList());
TranslateDialogDefault(hWnd);
+ HIMAGELIST himl = (HIMAGELIST)SendDlgItemMessage(hWnd,
IDC_EVENTOPTIONS, TVM_SETIMAGELIST, TVSIL_STATE,
(LPARAM)CreateStateImageList());
+ ImageList_Destroy(himl);

/*
* fill the tree view
@@ -356,7 +356,7 @@
}
break;
case WM_DESTROY: {
- SendDlgItemMessage(hWnd, IDC_EVENTOPTIONS, TVM_GETIMAGELIST,
TVSIL_STATE, 0);
+ //ImageList_Destroy((HIMAGELIST)SendDlgItemMessage(hWnd,
IDC_EVENTOPTIONS, TVM_GETIMAGELIST, 0, 0));
bWmNotify = TRUE;
break;
}
=======================================
--- /trunk/miranda/plugins/tabsrmm/src/generic_msghandlers.cpp Sat Sep 12
21:06:17 2009
+++ /trunk/miranda/plugins/tabsrmm/src/generic_msghandlers.cpp Wed Sep 16
12:37:55 2009
@@ -877,7 +877,6 @@
int iHasName;
TCHAR fulluin[256];
if (dat->szProto) {
- TCHAR *wUIN = NULL;

GetContactUIN(hwndDlg, dat);

@@ -925,19 +924,16 @@
item.mask |= TCIF_TEXT;
}
SendMessage(hwndDlg, DM_UPDATEWINICON, 0, 0);
- wUIN = a2tf((TCHAR *)dat->uin, 0, 0);
if (dat->bIsMeta)
mir_sntprintf(fulluin, safe_sizeof(fulluin),
CTranslator::get(CTranslator::GEN_MSG_UINCOPY),
- iHasName ? wUIN : CTranslator::get(CTranslator::GEN_MSG_NOUIN));
+ iHasName ? dat->uin :
CTranslator::get(CTranslator::GEN_MSG_NOUIN));
else
mir_sntprintf(fulluin, safe_sizeof(fulluin),
CTranslator::get(CTranslator::GEN_MSG_UINCOPY_NOMC),
- iHasName ? wUIN : CTranslator::get(CTranslator::GEN_MSG_NOUIN));
+ iHasName ? dat->uin :
CTranslator::get(CTranslator::GEN_MSG_NOUIN));

SendMessage(GetDlgItem(hwndDlg, IDC_NAME), BUTTONADDTOOLTIP,
/*iHasName ?*/ (WPARAM)fulluin /*: (WPARAM)_T("")*/, 0);
- if(wUIN)
- mir_free(wUIN);
}
} else
lstrcpyn(newtitle, pszNewTitleEnd, safe_sizeof(newtitle));
=======================================
--- /trunk/miranda/plugins/tabsrmm/src/infopanel.h Thu Sep 10 20:28:50 2009
+++ /trunk/miranda/plugins/tabsrmm/src/infopanel.h Wed Sep 16 12:37:55 2009
@@ -76,24 +76,24 @@
}

const LONG getHeight () const { return(m_height); }
- void setHeight (LONG newHeight, bool fBroadcast = false);
+ void TSAPI setHeight (LONG newHeight, bool fBroadcast = false);
bool isActive () const { return(m_active); }
bool isPrivateHeight () const { return(m_fPrivateHeight); }
- void setActive (const int newActive);
- void loadHeight ();
- void saveHeight (bool fFlush = false);
-
- void Configure () const;
- void showHideControls (const UINT showCmd) const;
- void showHide () const;
- bool getVisibility ();
- void renderBG (const HDC hdc, RECT& rc, CSkinItem *item, bool
fAero) const;
- void renderContent (const HDC hdcMem);
- void Invalidate () const;
- void trackMouse (POINT& pt) const;
- void showTip (UINT ctrlId, const LPARAM lParam) const;
- int invokeConfigDialog (const POINT& pt);
- void dismissConfig (bool fForced = false)
+ void TSAPI setActive (const int newActive);
+ void TSAPI loadHeight ();
+ void TSAPI saveHeight (bool fFlush = false);
+
+ void TSAPI Configure () const;
+ void TSAPI showHideControls (const UINT showCmd) const;
+ void TSAPI showHide () const;
+ bool TSAPI getVisibility ();
+ void TSAPI renderBG (const HDC hdc, RECT& rc, CSkinItem *item,
bool fAero) const;
+ void TSAPI renderContent (const HDC hdcMem);
+ void TSAPI Invalidate () const;
+ void TSAPI trackMouse (POINT& pt) const;
+ void TSAPI showTip (UINT ctrlId, const LPARAM lParam) const;
+ int TSAPI invokeConfigDialog (const POINT& pt);
+ void TSAPI dismissConfig (bool fForced = false)
{
if(m_hwndConfig == 0)
return;
@@ -112,11 +112,11 @@
static InfoPanelConfig m_ipConfig;

private:
- void RenderIPNickname (const HDC hdc, RECT& rc);
- void RenderIPUIN (const HDC hdc, RECT& rcItem);
- void RenderIPStatus (const HDC hdc, RECT& rcItem);
- void Chat_RenderIPNickname (const HDC hdc, RECT& rcItem);
- void Chat_RenderIPSecondLine (const HDC hdc, RECT& rcItem);
+ void TSAPI RenderIPNickname (const HDC hdc, RECT& rc);
+ void TSAPI RenderIPUIN (const HDC hdc, RECT& rcItem);
+ void TSAPI RenderIPStatus (const HDC hdc, RECT& rcItem);
+ void TSAPI Chat_RenderIPNickname (const HDC hdc, RECT& rcItem);
+ void TSAPI Chat_RenderIPSecondLine (const HDC hdc, RECT& rcItem);
INT_PTR CALLBACK ConfigDlgProc (HWND hWnd, UINT msg, WPARAM wParam,
LPARAM lParam);

static INT_PTR CALLBACK ConfigDlgProcStub (HWND hWnd, UINT msg,
WPARAM wParam, LPARAM lParam);
=======================================
--- /trunk/miranda/plugins/tabsrmm/src/mim.h Mon Sep 14 12:23:31 2009
+++ /trunk/miranda/plugins/tabsrmm/src/mim.h Wed Sep 16 12:37:55 2009
@@ -106,43 +106,43 @@
* database functions
*/

- DWORD GetDword(const HANDLE hContact, const char *szModule, const char
*szSetting, DWORD uDefault) const;
- DWORD GetDword(const char *szModule, const char *szSetting, DWORD
uDefault) const;
- DWORD GetDword(const char *szSetting, DWORD uDefault) const;
- DWORD GetDword(const HANDLE hContact, const char *szSetting, DWORD
uDefault) const;
-
- int GetByte(const HANDLE hContact, const char *szModule, const char
*szSetting, int uDefault) const;
- int GetByte(const char *szModule, const char *szSetting, int uDefault)
const;
- int GetByte(const char *szSetting, int uDefault) const;
- int GetByte(const HANDLE hContact, const char *szSetting, int uDefault)
const;
-
- INT_PTR GetTString(const HANDLE hContact, const char *szModule, const
char *szSetting, DBVARIANT *dbv) const;
- INT_PTR GetString(const HANDLE hContact, const char *szModule, const char
*szSetting, DBVARIANT *dbv) const;
-
- INT_PTR WriteDword(const HANDLE hContact, const char *szModule, const
char *szSetting, DWORD value) const;
- INT_PTR WriteDword(const char *szModule, const char *szSetting, DWORD
value) const;
-
- INT_PTR WriteByte(const HANDLE hContact, const char *szModule, const char
*szSetting, BYTE value) const;
- INT_PTR WriteByte(const char *szModule, const char *szSetting, BYTE
value) const;
-
- INT_PTR WriteTString(const HANDLE hContact, const char *szModule, const
char *szSetting, const TCHAR *st) const;
-
- char *utf8_decode(char* str, wchar_t** ucs2) const;
- char *utf8_decodecp(char* str, int codepage, wchar_t** ucs2) const;
- char *utf8_encode(const char* src) const;
- char *utf8_encodecp(const char* src, int codepage) const;
- char *utf8_encodeW(const wchar_t* src) const;
- char *utf8_encodeT(const TCHAR* src) const;
- TCHAR *utf8_decodeT(const char* src) const;
- wchar_t *utf8_decodeW(const char* str) const;
+ DWORD FASTCALL GetDword(const HANDLE hContact, const char *szModule,
const char *szSetting, DWORD uDefault) const;
+ DWORD FASTCALL GetDword(const char *szModule, const char *szSetting,
DWORD uDefault) const;
+ DWORD FASTCALL GetDword(const char *szSetting, DWORD uDefault) const;
+ DWORD FASTCALL GetDword(const HANDLE hContact, const char *szSetting,
DWORD uDefault) const;
+
+ int FASTCALL GetByte(const HANDLE hContact, const char *szModule, const
char *szSetting, int uDefault) const;
+ int FASTCALL GetByte(const char *szModule, const char *szSetting, int
uDefault) const;
+ int FASTCALL GetByte(const char *szSetting, int uDefault) const;
+ int FASTCALL GetByte(const HANDLE hContact, const char *szSetting, int
uDefault) const;
+
+ INT_PTR FASTCALL GetTString(const HANDLE hContact, const char *szModule,
const char *szSetting, DBVARIANT *dbv) const;
+ INT_PTR FASTCALL GetString(const HANDLE hContact, const char *szModule,
const char *szSetting, DBVARIANT *dbv) const;
+
+ INT_PTR FASTCALL WriteDword(const HANDLE hContact, const char *szModule,
const char *szSetting, DWORD value) const;
+ INT_PTR FASTCALL WriteDword(const char *szModule, const char *szSetting,
DWORD value) const;
+
+ INT_PTR FASTCALL WriteByte(const HANDLE hContact, const char *szModule,
const char *szSetting, BYTE value) const;
+ INT_PTR FASTCALL WriteByte(const char *szModule, const char *szSetting,
BYTE value) const;
+
+ INT_PTR FASTCALL WriteTString(const HANDLE hContact, const char
*szModule, const char *szSetting, const TCHAR *st) const;
+
+ char* FASTCALL utf8_decode(char* str, wchar_t** ucs2) const;
+ char* FASTCALL utf8_decodecp(char* str, int codepage, wchar_t** ucs2)
const;
+ char* FASTCALL utf8_encode(const char* src) const;
+ char* FASTCALL utf8_encodecp(const char* src, int codepage) const;
+ char* FASTCALL utf8_encodeW(const wchar_t* src) const;
+ char* FASTCALL utf8_encodeT(const TCHAR* src) const;
+ TCHAR* FASTCALL utf8_decodeT(const char* src) const;
+ wchar_t* FASTCALL utf8_decodeW(const char* str) const;

/*
* path utilities
*/

- int pathIsAbsolute(const TCHAR *path) const;
- size_t pathToAbsolute(const TCHAR *pSrc, TCHAR *pOut, const TCHAR *szBase
= 0) const;
- size_t pathToRelative(const TCHAR *pSrc, TCHAR *pOut, const TCHAR *szBase
= 0) const;
+ int TSAPI pathIsAbsolute(const TCHAR *path) const;
+ size_t TSAPI pathToAbsolute(const TCHAR *pSrc, TCHAR *pOut, const TCHAR
*szBase = 0) const;
+ size_t TSAPI pathToRelative(const TCHAR *pSrc, TCHAR *pOut, const TCHAR
*szBase = 0) const;

/*
* for backwards compatiblity still needed (not everything path-related
is unicode
@@ -153,9 +153,9 @@
const TCHAR *getSavedAvatarPath() const { return(m_szSavedAvatarsPath); }
const TCHAR *getChatLogPath() const { return(m_szChatLogsPath); }

- const TCHAR *getUserDir();
- void configureCustomFolders();
- INT_PTR foldersPathChanged();
+ const TCHAR* TSAPI getUserDir();
+ void TSAPI configureCustomFolders();
+ INT_PTR TSAPI foldersPathChanged();

const bool isVSAPIState() const { return m_VsAPI; }
/**
@@ -199,11 +199,11 @@
* window lists
*/

- void BroadcastMessage(UINT msg, WPARAM wParam, LPARAM lParam);
- void BroadcastMessageAsync(UINT msg, WPARAM wParam, LPARAM lParam);
- INT_PTR AddWindow(HWND hWnd, HANDLE h);
- INT_PTR RemoveWindow(HWND hWnd);
- HWND FindWindow(HANDLE h) const;
+ void TSAPI BroadcastMessage(UINT msg, WPARAM wParam, LPARAM lParam);
+ void TSAPI BroadcastMessageAsync(UINT msg, WPARAM wParam, LPARAM lParam);
+ INT_PTR TSAPI AddWindow(HWND hWnd, HANDLE h);
+ INT_PTR TSAPI RemoveWindow(HWND hWnd);
+ HWND TSAPI FindWindow(HANDLE h) const;

static int FoldersPathChanged(WPARAM wParam, LPARAM lParam);
static const TCHAR* StriStr(const TCHAR *szString, const TCHAR
*szSearchFor);
=======================================
--- /trunk/miranda/plugins/tabsrmm/src/msgdialog.cpp Wed Sep 16 04:10:49
2009
+++ /trunk/miranda/plugins/tabsrmm/src/msgdialog.cpp Wed Sep 16 12:37:55
2009
@@ -2009,11 +2009,9 @@
}
return newData->iActivate ? TRUE : FALSE;
}
- case WM_ERASEBKGND: {
- //if (m_pContainer->bSkinned || M->isAero() || M->isVSThemed())
- return TRUE;
- break;
- }
+ case WM_ERASEBKGND:
+ return(1);
+
case WM_NCPAINT: {
if (CSkin::m_skinEnabled)
return 0;
=======================================
--- /trunk/miranda/plugins/tabsrmm/src/msgoptions.cpp Wed Sep 16 04:10:49
2009
+++ /trunk/miranda/plugins/tabsrmm/src/msgoptions.cpp Wed Sep 16 12:37:55
2009
@@ -297,7 +297,7 @@
return TRUE;
}
case WM_DESTROY:
- ImageList_Destroy((HIMAGELIST)SendDlgItemMessage(hwndDlg,
IDC_WINDOWOPTIONS, TVM_GETIMAGELIST, 0, 0));
+ //ImageList_Destroy((HIMAGELIST)SendDlgItemMessage(hwndDlg,
IDC_WINDOWOPTIONS, TVM_GETIMAGELIST, 0, 0));
break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
=======================================
--- /trunk/miranda/plugins/tabsrmm/src/resource.h Wed Sep 16 04:10:49 2009
+++ /trunk/miranda/plugins/tabsrmm/src/resource.h Wed Sep 16 12:37:55 2009
@@ -439,7 +439,6 @@
#define IDC_EDITTEMPLATE 1362
#define IDC_REVERT 1363
#define IDC_FORGET 1364
-#define IDC_VARHELP 1365
#define IDC_COLOR1 1366
#define IDC_COLOR2 1367
#define IDC_COLOR3 1368
@@ -772,6 +771,10 @@
#define ID_MESSAGELOG_MESSAGELOGSETTINGS 40253
#define ID_SPLITTERCONTEXT_SAVEFORCONTAINER 40340

+#ifndef IDC_STATIC
+ #define IDC_STATIC -1
+#endif
+
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
=======================================
--- /trunk/miranda/plugins/tabsrmm/src/sidebar.h Wed Sep 16 04:10:49 2009
+++ /trunk/miranda/plugins/tabsrmm/src/sidebar.h Wed Sep 16 12:37:55 2009
@@ -127,23 +127,23 @@
CSideBar(ContainerWindowData *pContainer);
~CSideBar();

- void Init(const bool fForce = false);
- void addSession(const _MessageWindowData *dat, int position = -1);
- HRESULT removeSession(const _MessageWindowData *dat);
- void updateSession(const _MessageWindowData *dat);
+ void TSAPI Init(const bool fForce = false);
+ void TSAPI addSession(const _MessageWindowData *dat, int position =
-1);
+ HRESULT TSAPI removeSession(const _MessageWindowData *dat);
+ void TSAPI updateSession(const _MessageWindowData *dat);

const LONG getWidth() const { return( m_isVisible ? m_width : 0); }
const ContainerWindowData* getContainer() const { return(m_pContainer); }
- void Layout(const RECT *rc = 0, bool fOnlyCalc = false);
+ void TSAPI Layout(const RECT *rc = 0, bool fOnlyCalc = false);
const bool isActive() const { return(m_isActive); }
const bool isVisible() const { return(m_isVisible); }
- void setVisible(bool fNewVisibility);
- void showAll(int showCmd);
- void processScrollerButtons(UINT cmd);
+ void TSAPI setVisible(bool fNewVisibility);
+ void TSAPI showAll(int showCmd);
+ void TSAPI processScrollerButtons(UINT cmd);
const CSideBarButton* getActiveItem() const { return(m_activeItem); }
bool isSkinnedContainer() const { return(CSkin::m_skinEnabled ?
true : false); }
const UINT getLayoutId() const { return(m_uLayout); }
- const CSideBarButton* setActiveItem(const CSideBarButton *newItem)
+ const CSideBarButton* TSAPI setActiveItem(const CSideBarButton *newItem)
{
CSideBarButton *oldItem = m_activeItem;
m_activeItem = const_cast<CSideBarButton *>(newItem);
@@ -159,7 +159,7 @@
}
const CSideBarButton* getHoveredClose() const {
return(m_hoveredClose); }

- const CSideBarButton* setActiveItem(const _MessageWindowData *dat);
+ const CSideBarButton* TSAPI setActiveItem(const _MessageWindowData
*dat);

static HBITMAP m_hbmBackground;

@@ -168,16 +168,16 @@
uLayoutCount = NR_LAYOUTS;
return(m_layouts);
}
- void scrollIntoView(const CSideBarButton *item = 0);
- void resizeScrollWnd(LONG x, LONG y, LONG width, LONG height)
const;
+ void TSAPI scrollIntoView(const CSideBarButton *item = 0);
+ void TSAPI resizeScrollWnd(LONG x, LONG y, LONG width, LONG height)
const;
HWND getScrollWnd() const { return(m_hwndScrollWnd); }
static LRESULT CALLBACK wndProcStub(HWND hwnd, UINT msg, WPARAM
wParam, LPARAM lParam);
private:
- void createScroller();
- void destroyScroller();
- void populateAll();
- void removeAll();
- void Invalidate();
+ void TSAPI createScroller();
+ void TSAPI destroyScroller();
+ void TSAPI populateAll();
+ void TSAPI removeAll();
+ void TSAPI Invalidate();
std::vector<CSideBarButton *>::iterator findSession(const
_MessageWindowData *dat);
std::vector<CSideBarButton *>::iterator findSession(const HANDLE
hContact);

=======================================
--- /trunk/miranda/plugins/tabsrmm/src/templates.cpp Thu Sep 10 20:28:50
2009
+++ /trunk/miranda/plugins/tabsrmm/src/templates.cpp Wed Sep 16 12:37:55
2009
@@ -166,9 +166,12 @@
SendDlgItemMessage(hwndDlg, IDC_PREVIEW, EM_EXLIMITTEXT, 0, 0x80000000);

dat->hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
- dat->dwFlags = M->GetDword("mwflags", MWF_LOG_DEFAULT);
dat->szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO,
(WPARAM)dat->hContact, 0);
-
+ while(dat->szProto == 0) {
+ dat->hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, 0, 0);
+ dat->szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO,
(WPARAM)dat->hContact, 0);
+ }
+ dat->dwFlags = M->GetDword("mwflags", MWF_LOG_DEFAULT);
mir_sntprintf(dat->szNickname, 80, _T("%s"), (TCHAR *)
CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) dat->hContact,
GCDNF_TCHAR));
GetContactUIN(hwndDlg, dat);

@@ -208,10 +211,6 @@
CTranslator::getOpt(CTranslator::OPT_TEMP_TITLE), MB_OK);
DestroyWindow(hwndDlg);
}
- break;
- case IDC_VARHELP:
- if (!helpActive)
- CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_VARIABLEHELP),
hwndDlg, DlgProcTemplateHelp, 0);
break;
case IDC_TEMPLATELIST:
switch (HIWORD(wParam)) {
@@ -390,52 +389,7 @@
return(FALSE);
}

-static char *var_helptxt[] = {
- "{\\rtf1\\ansi\\deff0\\pard\\li%u\\fi-%u\\ri%u\\tx%u}",
- "%N:\tNickname",
- "%S:\tMessage symbol (from the webdings font)",
- "%I:\tIcon",
- "%M:\tthe message string itself",
- "%n:\ta \"hard\" line break (cr/lf - will break indent)",
- "%l:\ta soft linefeed",
- "%h:\thour (24 hour format, 0-23)",
- "%a:\thour (12 hour format)",
- "%m:\tminute",
- "%s:\tsecond",
- "%o:\tmonth",
- "%d:\tday of month",
- "%y:\tyear",
- "%w:\tday of week (Sunday, Monday.. translatable)",
- "%p:\tAM/PM symbol",
- "%U:\tUIN (contextual, own uin for sent, buddys UIN for received
messages)",
- "%E:\tDate, localized, depending on your regional settings. Short format
(05/03/2005..)",
- "%D:\tDate, localized, depending on your regional settings. Long format
(May, 05, 2005...)",
- "%R:\tDate, localized, using Today and Yesterday, older dates in long
format.",
- "%r:\tDate, localized, using Today and yesterday, older dates in short
format.",
- "%O:\tName of month, translatable",
- "%t:\tlocalized timestamp (depending on your regional settings).",
- "%e:\tError message (only use it in the error message template)",
- "\\line \\ul\\b Formatting (simple):\\ul0\\b0\\par",
- "%*:\tbold (works as toggle, first occurence turns bold on, next turns it
off)",
- "%/:\titalic, same",
- "%_:\tunderline, again, same way.",
- "%~:\tfont break - switches to the \"default\" font for the event
(depending on incoming/outgoing and history status)",
- "%-x:\tinsert a horizontal grid line with the color X (x is one of the
predefined colors). If x is omitted, use the grid line color.",
- "%Hx:\tHighlight with color x (set the background color).",
- "%|:\tA \"TAB\" character. Advances to the next tab position, usually the
position set by the left or right indent value.",
- "%fX:\tswitch to one of the predefined fonts, where X is a one character
code and can have the following values (case sensitive as always):\\line d:
-> font for date/timestamp\\line n: -> font for nickname\\line m: -> font
for message text\\line M: -> font for \\b misc \\b0 events (file, URL,
etc.)",
- "%cX:\tuse one of the predefined colors for the following text output (X
is a number from 0 to 4, referring to the color index). Only useful
together with the & modifier (see below) and maybe the %fX variable.",
- "\\line\\ul\\b About modifiers:\\ul0\\b0\\line\\line Currently, there are
3 different modifiers which can be used to alter the \\b behaviour\\b0 of
most variables. Modifiers have to follow the % character immediately,
however, their order is not important. Multiple modifiers are possible, but
please note that some combinations don't make much sense.\
- \\line\\line The ? character means that the variable will be skipped when
the message log is switched to \\b Simple Templates.\\b0 \
- \\line\\line The backslash character means that the variable will be
skipped when the message log is using the normal template variable set. \
- \\line\\line The # character means that the variable does only apply to
\\b old\\b0 events and will be ignored for new (unread events).\\line
Contrary, the $ character does the opposite - the variable will only show
up in new events. You can use these modifiers to get different message
formatting for old and new events.\
- \\line\\line The & modifier means \\b skip font\\b0 . If being used, the
variable will be printed without setting the font for the variables
context. Effectively, the font which is currently selected remains valid.",
- "\\line \\ul\\b Some examples:\\ul0\\b0\\line\\par \\b %&N\\b0 -\tprints
the nickname, but does not use the font which is configured for
nicknames.\\par\
- \\b %fd%&N\\b0 -\tprints the nickname, using the font for timestamps
(selected by %fd)\\par\
- \\b %fd%c3%&N\\b0 -\tprints the nickname, using the font for timestamp,
but with the text color set to color #4",
- NULL
-};
-
+/*
INT_PTR CALLBACK DlgProcTemplateHelp(HWND hwndDlg, UINT msg, WPARAM
wParam, LPARAM lParam)
{
switch (msg) {
@@ -445,10 +399,6 @@
SETTEXTEX stx = {ST_SELECTION, PluginConfig.m_LangPackCP};
RECT rc;

- /*
- * send the help text
- */
-
SendDlgItemMessage(hwndDlg, IDC_HELPTEXT, EM_AUTOURLDETECT, (WPARAM)
TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_HELPTEXT, EM_SETEVENTMASK, 0, ENM_LINK);

@@ -518,3 +468,4 @@
}
return(FALSE);
}
+*/
=======================================
--- /trunk/miranda/plugins/tabsrmm/src/themes.h Wed Sep 16 04:10:49 2009
+++ /trunk/miranda/plugins/tabsrmm/src/themes.h Wed Sep 16 12:37:55 2009
@@ -162,7 +162,7 @@
m_bStretch = IMAGE_STRETCH_B;
}

- void Free();
+ void TSAPI Free();
CImageItem* getNextItem() const { return(m_nextItem); }
void setNextItem(CImageItem *item) { m_nextItem = item; }
HBITMAP getHbm() const { return(m_hbm); }
@@ -173,13 +173,13 @@
const BLENDFUNCTION &bf = m_bf;
return(bf);
}
- const TCHAR* getName() const { return (m_szName); }
- TCHAR* Read(const TCHAR *szFilename);
- void Create(const TCHAR *szImageFile);
- void __fastcall Render(const HDC hdc, const RECT *rc, bool fIgnoreGlyph)
const;
- static void PreMultiply(HBITMAP hBitmap, int mode);
- static void CorrectBitmap32Alpha(HBITMAP hBitmap);
- static void Colorize(HBITMAP hBitmap, BYTE dr, BYTE dg, BYTE db, BYTE
alpha = 0);
+ const TCHAR* getName() const { return (m_szName); }
+ TCHAR* Read(const TCHAR *szFilename);
+ void Create(const TCHAR *szImageFile);
+ void __fastcall Render(const HDC hdc, const RECT *rc, bool fIgnoreGlyph)
const;
+ static void TSAPI PreMultiply(HBITMAP hBitmap, int mode);
+ static void TSAPI CorrectBitmap32Alpha(HBITMAP hBitmap);
+ static void TSAPI Colorize(HBITMAP hBitmap, BYTE dr, BYTE dg, BYTE db,
BYTE alpha = 0);

public:
bool m_fValid; // verified item, indicates that all parameters
are valid
@@ -268,41 +268,41 @@
* modified.
*
*/
- const CImageItem* getGlyphItem() const
+ const CImageItem* getGlyphItem() const
{
return(m_fHaveGlyph ? &m_glyphItem : 0);
}
- bool warnToClose() const;
- COLORREF getColorKey() const { return(m_ContainerColorKey); }
-
- void setupAeroSkins();
- void extractSkinsAndLogo() const;
- void setupTabCloseBitmap();
+ bool warnToClose() const;
+ COLORREF getColorKey() const { return(m_ContainerColorKey); }
+
+ void TSAPI setupAeroSkins();
+ void TSAPI extractSkinsAndLogo() const;
+ void TSAPI setupTabCloseBitmap();

/*
* static member functions
*/
- static void SkinDrawBGFromDC(HWND hwndClient, HWND hwnd, HDC hdcSrc,
RECT *rcClient, HDC hdcTarget);
- static void SkinDrawBG(HWND hwndClient, HWND hwnd, struct
ContainerWindowData *pContainer, RECT *rcClient, HDC hdcTarget);
- static void MY_AlphaBlend(HDC hdcDraw, DWORD left, DWORD top, int
width, int height, int bmWidth, int bmHeight, HDC hdcMem);
- static void DrawDimmedIcon(HDC hdc, LONG left, LONG top, LONG dx, LONG
dy, HICON hIcon, BYTE alpha);
- static DWORD __fastcall HexStringToLong(const TCHAR *szSource);
- static UINT DrawRichEditFrame(HWND hwnd, const _MessageWindowData
*mwdat, UINT skinID, UINT msg, WPARAM wParam, LPARAM lParam, WNDPROC
OldWndProc);
- static UINT NcCalcRichEditFrame(HWND hwnd, const _MessageWindowData
*mwdat, UINT skinID, UINT msg, WPARAM wParam, LPARAM lParam, WNDPROC
OldWndProc);
- static HBITMAP CreateAeroCompatibleBitmap(const RECT &rc, HDC dc);
+ static void TSAPI SkinDrawBGFromDC(HWND hwndClient, HWND hwnd, HDC
hdcSrc, RECT *rcClient, HDC hdcTarget);
+ static void TSAPI SkinDrawBG(HWND hwndClient, HWND hwnd, struct
ContainerWindowData *pContainer, RECT *rcClient, HDC hdcTarget);
+ static void TSAPI MY_AlphaBlend(HDC hdcDraw, DWORD left, DWORD top, int
width, int height, int bmWidth, int bmHeight, HDC hdcMem);
+ static void TSAPI DrawDimmedIcon(HDC hdc, LONG left, LONG top, LONG dx,
LONG dy, HICON hIcon, BYTE alpha);
+ static DWORD __fastcall HexStringToLong(const TCHAR *szSource);
+ static UINT TSAPI DrawRichEditFrame(HWND hwnd, const _MessageWindowData
*mwdat, UINT skinID, UINT msg, WPARAM wParam, LPARAM lParam, WNDPROC
OldWndProc);
+ static UINT TSAPI NcCalcRichEditFrame(HWND hwnd, const
_MessageWindowData *mwdat, UINT skinID, UINT msg, WPARAM wParam, LPARAM
lParam, WNDPROC OldWndProc);
+ static HBITMAP TSAPI CreateAeroCompatibleBitmap(const RECT &rc, HDC dc);
#if defined(_UNICODE)
- static int RenderText(HDC hdc, HANDLE hTheme, const TCHAR *szText, RECT
*rc, DWORD dtFlags, const int iGlowSize = DEFAULT_GLOW_SIZE);
+ static int TSAPI RenderText(HDC hdc, HANDLE hTheme, const TCHAR *szText,
RECT *rc, DWORD dtFlags, const int iGlowSize = DEFAULT_GLOW_SIZE);
#endif
- static int RenderText(HDC hdc, HANDLE hTheme, const char *szText, RECT
*rc, DWORD dtFlags, const int iGlowSize = DEFAULT_GLOW_SIZE);
- static void MapClientToParent(HWND hwndClient, HWND hwndParent, RECT
&rc);
- static void RenderToolbarBG(const _MessageWindowData *dat, HDC hdc,
const RECT &rcWindow);
- static HBITMAP ResizeBitmap(HBITMAP hBmpSrc, LONG width, LONG height,
bool &mustFree);
- static void ApplyAeroEffect(const HDC hdc, const RECT* rc, int
iEffectArea, HANDLE hbp = 0);
- static void setAeroEffect(const LRESULT effect);
- static void initAeroEffect();
- static HANDLE InitiateBufferedPaint(const HDC hdcSrc, RECT& rc, HDC&
hdcOut);
- static void FinalizeBufferedPaint(HANDLE hbp, RECT *rc);
- static bool __fastcall DrawItem(const HDC hdc, const RECT *rc, const
CSkinItem *item);
+ static int TSAPI RenderText(HDC hdc, HANDLE hTheme, const char *szText,
RECT *rc, DWORD dtFlags, const int iGlowSize = DEFAULT_GLOW_SIZE);
+ static void TSAPI MapClientToParent(HWND hwndClient, HWND hwndParent,
RECT &rc);
+ static void TSAPI RenderToolbarBG(const _MessageWindowData *dat, HDC
hdc, const RECT &rcWindow);
+ static HBITMAP TSAPI ResizeBitmap(HBITMAP hBmpSrc, LONG width, LONG
height, bool &mustFree);
+ static void TSAPI ApplyAeroEffect(const HDC hdc, const RECT* rc, int
iEffectArea, HANDLE hbp = 0);
+ static void TSAPI setAeroEffect(const LRESULT effect);
+ static void TSAPI initAeroEffect();
+ static HANDLE TSAPI InitiateBufferedPaint(const HDC hdcSrc, RECT& rc,
HDC& hdcOut);
+ static void TSAPI FinalizeBufferedPaint(HANDLE hbp, RECT *rc);
+ static bool __fastcall DrawItem(const HDC hdc, const RECT *rc, const
CSkinItem *item);

public:
static bool m_DisableScrollbars, m_bClipBorder;

Reply all
Reply to author
Forward
0 new messages