diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-05 22:41:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-05 22:41:06 +0000 |
commit | e3cefc7b6ca803e3f87dbadae54a110332778490 (patch) | |
tree | 0ee41f14f962f946c9e64fae4a11fbcb197af853 /src/modules/options | |
parent | f0fb070eab8f276e66c0154363656045bc0dadb3 (diff) |
- first of the /Core standard plugins;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@778 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/options')
-rw-r--r-- | src/modules/options/descbutton.cpp | 78 | ||||
-rw-r--r-- | src/modules/options/filter.cpp | 8 | ||||
-rw-r--r-- | src/modules/options/filter.h | 14 | ||||
-rw-r--r-- | src/modules/options/headerbar.cpp | 80 | ||||
-rw-r--r-- | src/modules/options/iconheader.cpp | 128 | ||||
-rw-r--r-- | src/modules/options/options.cpp | 38 |
6 files changed, 173 insertions, 173 deletions
diff --git a/src/modules/options/descbutton.cpp b/src/modules/options/descbutton.cpp index 813779f375..e0f1baf02c 100644 --- a/src/modules/options/descbutton.cpp +++ b/src/modules/options/descbutton.cpp @@ -68,13 +68,13 @@ int LoadDescButtonModule() WNDCLASSEX wc;
ZeroMemory(&wc, sizeof(wc));
- wc.cbSize = sizeof(wc);
- wc.lpszClassName = MIRANDADESCBUTTONCLASS;
- wc.lpfnWndProc = MDescButtonWndProc;
- wc.hCursor = LoadCursor(NULL, IDC_HAND);
- wc.cbWndExtra = sizeof(MDescButtonCtrl *);
- wc.hbrBackground = 0; //GetStockObject(WHITE_BRUSH);
- wc.style = CS_GLOBALCLASS|CS_SAVEBITS;
+ wc.cbSize = sizeof(wc);
+ wc.lpszClassName = MIRANDADESCBUTTONCLASS;
+ wc.lpfnWndProc = MDescButtonWndProc;
+ wc.hCursor = LoadCursor(NULL, IDC_HAND);
+ wc.cbWndExtra = sizeof(MDescButtonCtrl *);
+ wc.hbrBackground = 0; //GetStockObject(WHITE_BRUSH);
+ wc.style = CS_GLOBALCLASS|CS_SAVEBITS;
RegisterClassEx(&wc);
return 0;
}
@@ -84,36 +84,36 @@ static void MDescButton_SetupColors(MDescButtonCtrl *dat) COLORREF cl;
cl = GetSysColor(COLOR_WINDOW);
- dat->rgbBkgBottom.rgbRed = (dat->rgbBkgTop.rgbRed = GetRValue(cl)) * .95;
- dat->rgbBkgBottom.rgbGreen = (dat->rgbBkgTop.rgbGreen = GetGValue(cl)) * .95;
- dat->rgbBkgBottom.rgbBlue = (dat->rgbBkgTop.rgbBlue = GetBValue(cl)) * .95;
+ dat->rgbBkgBottom.rgbRed = (dat->rgbBkgTop.rgbRed = GetRValue(cl)) * .95;
+ dat->rgbBkgBottom.rgbGreen = (dat->rgbBkgTop.rgbGreen = GetGValue(cl)) * .95;
+ dat->rgbBkgBottom.rgbBlue = (dat->rgbBkgTop.rgbBlue = GetBValue(cl)) * .95;
cl = GetSysColor(COLOR_HIGHLIGHT);
- dat->rgbSelTop.rgbRed = (dat->rgbSelBottom.rgbRed = GetRValue(cl)) * .75;
- dat->rgbSelTop.rgbGreen = (dat->rgbSelBottom.rgbGreen = GetGValue(cl)) * .75;
- dat->rgbSelTop.rgbBlue = (dat->rgbSelBottom.rgbBlue = GetBValue(cl)) * .75;
+ dat->rgbSelTop.rgbRed = (dat->rgbSelBottom.rgbRed = GetRValue(cl)) * .75;
+ dat->rgbSelTop.rgbGreen = (dat->rgbSelBottom.rgbGreen = GetGValue(cl)) * .75;
+ dat->rgbSelTop.rgbBlue = (dat->rgbSelBottom.rgbBlue = GetBValue(cl)) * .75;
- dat->rgbHotTop.rgbRed = (dat->rgbSelTop.rgbRed + 255) / 2;
- dat->rgbHotTop.rgbGreen = (dat->rgbSelTop.rgbGreen + 255) / 2;
- dat->rgbHotTop.rgbBlue = (dat->rgbSelTop.rgbBlue + 255) / 2;
+ dat->rgbHotTop.rgbRed = (dat->rgbSelTop.rgbRed + 255) / 2;
+ dat->rgbHotTop.rgbGreen = (dat->rgbSelTop.rgbGreen + 255) / 2;
+ dat->rgbHotTop.rgbBlue = (dat->rgbSelTop.rgbBlue + 255) / 2;
- dat->rgbHotBottom.rgbRed = (dat->rgbSelBottom.rgbRed + 255) / 2;
- dat->rgbHotBottom.rgbGreen = (dat->rgbSelBottom.rgbGreen + 255) / 2;
- dat->rgbHotBottom.rgbBlue = (dat->rgbSelBottom.rgbBlue + 255) / 2;
+ dat->rgbHotBottom.rgbRed = (dat->rgbSelBottom.rgbRed + 255) / 2;
+ dat->rgbHotBottom.rgbGreen = (dat->rgbSelBottom.rgbGreen + 255) / 2;
+ dat->rgbHotBottom.rgbBlue = (dat->rgbSelBottom.rgbBlue + 255) / 2;
- dat->clBackground = GetSysColor(COLOR_3DFACE);
- dat->clText = GetSysColor(COLOR_WINDOWTEXT);
- dat->clSelText = GetSysColor(COLOR_HIGHLIGHTTEXT);
- dat->clSelBorder = RGB(dat->rgbSelTop.rgbRed, dat->rgbSelTop.rgbGreen, dat->rgbSelTop.rgbBlue);
- dat->clHotBorder = RGB(dat->rgbHotTop.rgbRed, dat->rgbHotTop.rgbGreen, dat->rgbHotTop.rgbBlue);
+ dat->clBackground = GetSysColor(COLOR_3DFACE);
+ dat->clText = GetSysColor(COLOR_WINDOWTEXT);
+ dat->clSelText = GetSysColor(COLOR_HIGHLIGHTTEXT);
+ dat->clSelBorder = RGB(dat->rgbSelTop.rgbRed, dat->rgbSelTop.rgbGreen, dat->rgbSelTop.rgbBlue);
+ dat->clHotBorder = RGB(dat->rgbHotTop.rgbRed, dat->rgbHotTop.rgbGreen, dat->rgbHotTop.rgbBlue);
if ( !dat->hFont) dat->hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
}
static void MDescButton_FillRect(HDC hdc, int x, int y, int width, int height, COLORREF cl)
{
- int oldMode = SetBkMode(hdc, OPAQUE);
- COLORREF oldColor = SetBkColor(hdc, cl);
+ int oldMode = SetBkMode(hdc, OPAQUE);
+ COLORREF oldColor = SetBkColor(hdc, cl);
RECT rc; SetRect(&rc, x, y, x+width, y+height);
ExtTextOutA(hdc, 0, 0, ETO_OPAQUE, &rc, "", 0, 0);
@@ -124,11 +124,11 @@ static void MDescButton_FillRect(HDC hdc, int x, int y, int width, int height, C static void MDescButton_DrawGradient(HDC hdc, int x, int y, int width, int height, RGBQUAD *rgb0, RGBQUAD *rgb1)
{
- int oldMode = SetBkMode(hdc, OPAQUE);
- COLORREF oldColor = SetBkColor(hdc, 0);
+ int oldMode = SetBkMode(hdc, OPAQUE);
+ COLORREF oldColor = SetBkColor(hdc, 0);
RECT rc; SetRect(&rc, x, 0, x+width, 0);
- for (int i=y+height; --i >= y;) {
+ for (int i = y+height; --i >= y;) {
COLORREF color = RGB(
((height-i-1)*rgb0->rgbRed + i*rgb1->rgbRed) / height,
((height-i-1)*rgb0->rgbGreen + i*rgb1->rgbGreen) / height,
@@ -150,17 +150,17 @@ static LRESULT MDescButton_OnPaint(HWND hwndDlg, MDescButtonCtrl *dat, UINT msg RECT temprc;
HFONT hfntSave;
- HDC hdc=BeginPaint(hwndDlg, &ps);
- HDC tempDC=CreateCompatibleDC(hdc);
+ HDC hdc = BeginPaint(hwndDlg, &ps);
+ HDC tempDC = CreateCompatibleDC(hdc);
SIZE titleSize = {0};
- hBmp=CreateCompatibleBitmap(hdc, dat->width, dat->height);
- hOldBmp=(HBITMAP)SelectObject(tempDC, hBmp);
+ hBmp = CreateCompatibleBitmap(hdc, dat->width, dat->height);
+ hOldBmp = (HBITMAP)SelectObject(tempDC, hBmp);
- temprc.left=0;
- temprc.right=dat->width;
- temprc.top=0;
+ temprc.left = 0;
+ temprc.right = dat->width;
+ temprc.top = 0;
//Draw background
if (dat->bMouseInside || (GetFocus() == hwndDlg)) {
@@ -223,7 +223,7 @@ static LRESULT MDescButton_OnPaint(HWND hwndDlg, MDescButtonCtrl *dat, UINT msg static LRESULT CALLBACK MDescButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- MDescButtonCtrl *dat = (MDescButtonCtrl *)GetWindowLongPtr(hwndDlg, 0);
+ MDescButtonCtrl *dat = (MDescButtonCtrl *)GetWindowLongPtr(hwndDlg, 0);
switch(msg) {
case WM_NCCREATE:
dat = (MDescButtonCtrl*)mir_alloc(sizeof(MDescButtonCtrl));
@@ -241,8 +241,8 @@ static LRESULT CALLBACK MDescButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wPara case WM_SIZE:
GetClientRect(hwndDlg, &dat->rc);
- dat->width=dat->rc.right-dat->rc.left;
- dat->height=dat->rc.bottom-dat->rc.top;
+ dat->width = dat->rc.right-dat->rc.left;
+ dat->height = dat->rc.bottom-dat->rc.top;
return TRUE;
case WM_THEMECHANGED:
diff --git a/src/modules/options/filter.cpp b/src/modules/options/filter.cpp index 8b72f4e67d..4a332b2259 100644 --- a/src/modules/options/filter.cpp +++ b/src/modules/options/filter.cpp @@ -94,7 +94,7 @@ void AddDialogString(HWND hWndDlg, const PageHash key) if (lstrcmpi(szClass, _T("listbox")) == 0) {
if (GetWindowStyle(hWndDlg) & LBS_HASSTRINGS) {
int count = ListBox_GetCount(hWndDlg);
- for (int i = 0; i < count; i++) {
+ for (int i=0; i < count; i++) {
title[0] = 0; //safety
int res = ListBox_GetText(hWndDlg, i, title);
if (res != LB_ERR) {
@@ -106,7 +106,7 @@ void AddDialogString(HWND hWndDlg, const PageHash key) else {
if (lstrcmpi(szClass, _T("SysListView32")) == 0) {
int count = ListView_GetItemCount(hWndDlg);
- for (int i = 0; i < count; i++) {
+ for (int i=0; i < count; i++) {
title[0] = 0; //safety
ListView_GetItemText(hWndDlg, i, 0, title, SIZEOF(title));
@@ -117,7 +117,7 @@ void AddDialogString(HWND hWndDlg, const PageHash key) if (lstrcmpi(szClass, _T("combobox")) == 0) {
if (GetWindowStyle(hWndDlg) & CBS_HASSTRINGS) {
int count = ComboBox_GetCount(hWndDlg);
- for (int i = 0; i < count; i++) {
+ for (int i=0; i < count; i++) {
title[0] = 0; //safety
int res = ComboBox_GetLBText(hWndDlg, i, title);
if (res != CB_ERR) {
@@ -134,7 +134,7 @@ static BOOL CALLBACK GetDialogStringsCallback(HWND hWnd, LPARAM lParam) return TRUE;
}
-void GetDialogStrings(int enableKeywordFiltering, const PageHash key, TCHAR *pluginName, HWND hWnd, TCHAR * group, TCHAR * title, TCHAR * tab, TCHAR * name)
+void GetDialogStrings(int enableKeywordFiltering, const PageHash key, TCHAR *pluginName, HWND hWnd, TCHAR *group, TCHAR *title, TCHAR *tab, TCHAR *name)
{
AddFilterString(key, pluginName); //add the plugin name as keyword
if (group) AddFilterString(key, group);
diff --git a/src/modules/options/filter.h b/src/modules/options/filter.h index 6bf38d17d5..39c16698f2 100644 --- a/src/modules/options/filter.h +++ b/src/modules/options/filter.h @@ -34,9 +34,9 @@ typedef DWORD PageHash; void AddFilterString(const PageHash key, const TCHAR *data);
BOOL ContainsFilterString(const PageHash key, TCHAR *data);
void ClearFilterStrings();
-void GetDialogStrings(int enableKeywordFiltering, const PageHash key, TCHAR *pluginName, HWND hWnd, TCHAR * group, TCHAR * title, TCHAR * tab, TCHAR * name);
+void GetDialogStrings(int enableKeywordFiltering, const PageHash key, TCHAR *pluginName, HWND hWnd, TCHAR *group, TCHAR *title, TCHAR *tab, TCHAR *name);
-_inline TCHAR * _tcslwr_locale(TCHAR * buf)
+_inline TCHAR *_tcslwr_locale(TCHAR *buf)
{
LCMapString(Langpack_GetDefaultLocale() , LCMAP_LOWERCASE, buf, (int)_tcslen(buf), buf, (int)_tcslen(buf));
return buf;
@@ -55,24 +55,24 @@ public: {
for (int j = 0; j < _pageKeyWords.getCount(); j++)
{
- TCHAR * data = _pageKeyWords[j];
+ TCHAR *data = _pageKeyWords[j];
mir_free(data);
}
_pageKeyWords.destroy();
};
- void AddKeyWord(TCHAR * ptKeyWord)
+ void AddKeyWord(TCHAR *ptKeyWord)
{
- TCHAR * plwrWord = _tcslwr_locale(mir_tstrdup(ptKeyWord));
+ TCHAR *plwrWord = _tcslwr_locale(mir_tstrdup(ptKeyWord));
if (_pageKeyWords.getIndex(plwrWord) == -1)
_pageKeyWords.insert(plwrWord);
else
mir_free(plwrWord);
};
- BOOL ContainsString(TCHAR * data)
+ BOOL ContainsString(TCHAR *data)
{
- for (int i = 0; i < _pageKeyWords.getCount(); i++)
+ for (int i=0; i < _pageKeyWords.getCount(); i++)
if (_tcsstr(_pageKeyWords[i], data))
return TRUE;
return FALSE;
diff --git a/src/modules/options/headerbar.cpp b/src/modules/options/headerbar.cpp index 44a729089d..ad06f75f98 100644 --- a/src/modules/options/headerbar.cpp +++ b/src/modules/options/headerbar.cpp @@ -81,13 +81,13 @@ int LoadHeaderbarModule() WNDCLASSEX wc;
ZeroMemory(&wc, sizeof(wc));
- wc.cbSize = sizeof(wc);
- wc.lpszClassName = _T("MHeaderbarCtrl"); //MIRANDAHEADERBARCLASS;
- wc.lpfnWndProc = MHeaderbarWndProc;
- wc.hCursor = LoadCursor(NULL, IDC_ARROW);
- wc.cbWndExtra = sizeof(MHeaderbarCtrl*);
- wc.hbrBackground = 0; //GetStockObject(WHITE_BRUSH);
- wc.style = CS_GLOBALCLASS|CS_SAVEBITS;
+ wc.cbSize = sizeof(wc);
+ wc.lpszClassName = _T("MHeaderbarCtrl"); //MIRANDAHEADERBARCLASS;
+ wc.lpfnWndProc = MHeaderbarWndProc;
+ wc.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wc.cbWndExtra = sizeof(MHeaderbarCtrl*);
+ wc.hbrBackground = 0; //GetStockObject(WHITE_BRUSH);
+ wc.style = CS_GLOBALCLASS|CS_SAVEBITS;
RegisterClassEx(&wc);
return 0;
}
@@ -97,19 +97,19 @@ static void MHeaderbar_SetupColors(MHeaderbarCtrl *dat) COLORREF cl;
cl = GetSysColor(COLOR_WINDOW);
- dat->rgbBkgBottom.rgbRed = (dat->rgbBkgTop.rgbRed = GetRValue(cl)) * .95;
- dat->rgbBkgBottom.rgbGreen = (dat->rgbBkgTop.rgbGreen = GetGValue(cl)) * .95;
- dat->rgbBkgBottom.rgbBlue = (dat->rgbBkgTop.rgbBlue = GetBValue(cl)) * .95;
+ dat->rgbBkgBottom.rgbRed = (dat->rgbBkgTop.rgbRed = GetRValue(cl)) * .95;
+ dat->rgbBkgBottom.rgbGreen = (dat->rgbBkgTop.rgbGreen = GetGValue(cl)) * .95;
+ dat->rgbBkgBottom.rgbBlue = (dat->rgbBkgTop.rgbBlue = GetBValue(cl)) * .95;
- dat->clText = GetSysColor(COLOR_WINDOWTEXT);
+ dat->clText = GetSysColor(COLOR_WINDOWTEXT);
if ( !dat->hFont) dat->hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
}
static void MHeaderbar_FillRect(HDC hdc, int x, int y, int width, int height, COLORREF cl)
{
- int oldMode = SetBkMode(hdc, OPAQUE);
- COLORREF oldColor = SetBkColor(hdc, cl);
+ int oldMode = SetBkMode(hdc, OPAQUE);
+ COLORREF oldColor = SetBkColor(hdc, cl);
RECT rc; SetRect(&rc, x, y, x+width, y+height);
ExtTextOutA(hdc, 0, 0, ETO_OPAQUE, &rc, "", 0, 0);
@@ -122,11 +122,11 @@ static void MHeaderbar_DrawGradient(HDC hdc, int x, int y, int width, int height {
int i;
- int oldMode = SetBkMode(hdc, OPAQUE);
- COLORREF oldColor = SetBkColor(hdc, 0);
+ int oldMode = SetBkMode(hdc, OPAQUE);
+ COLORREF oldColor = SetBkColor(hdc, 0);
RECT rc; SetRect(&rc, x, 0, x+width, 0);
- for (i=y+height; --i >= y;)
+ for (i = y+height; --i >= y;)
{
COLORREF color = RGB(
((height-i-1)*rgb0->rgbRed + i*rgb1->rgbRed) / height,
@@ -153,10 +153,10 @@ static LRESULT MHeaderbar_OnPaint(HWND hwndDlg, MHeaderbarCtrl *mit, UINT msg, GetWindowText(hwndDlg, szTitle, titleLength);
TCHAR *szSubTitle = _tcschr(szTitle, _T('\n'));
- if (szSubTitle) *szSubTitle++ = 0;
+ if (szSubTitle) *szSubTitle++=0;
- HDC hdc=BeginPaint(hwndDlg, &ps);
- HDC tempDC=CreateCompatibleDC(hdc);
+ HDC hdc = BeginPaint(hwndDlg, &ps);
+ HDC tempDC = CreateCompatibleDC(hdc);
BITMAPINFO bmi;
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
@@ -167,14 +167,14 @@ static LRESULT MHeaderbar_OnPaint(HWND hwndDlg, MHeaderbarCtrl *mit, UINT msg, bmi.bmiHeader.biCompression = BI_RGB;
hBmp = CreateDIBSection(tempDC, &bmi, DIB_RGB_COLORS, NULL, NULL, 0);
- hOldBmp=(HBITMAP)SelectObject(tempDC, hBmp);
+ hOldBmp = (HBITMAP)SelectObject(tempDC, hBmp);
if (IsAeroMode()) {
RECT temprc;
- temprc.left=0;
- temprc.right=mit->width;
- temprc.top=0;
- temprc.bottom=mit->width;
+ temprc.left = 0;
+ temprc.right = mit->width;
+ temprc.top = 0;
+ temprc.bottom = mit->width;
FillRect(tempDC, &temprc, (HBRUSH)GetStockObject(BLACK_BRUSH));
MARGINS margins = {0, 0, mit->height, 0};
@@ -213,10 +213,10 @@ static LRESULT MHeaderbar_OnPaint(HWND hwndDlg, MHeaderbarCtrl *mit, UINT msg, }
RECT textRect;
- textRect.left=50;
- textRect.right=mit->width;
- textRect.top=2 + iTopSpace;
- textRect.bottom=GetSystemMetrics(SM_CYICON)-2 + iTopSpace;
+ textRect.left = 50;
+ textRect.right = mit->width;
+ textRect.top = 2 + iTopSpace;
+ textRect.bottom = GetSystemMetrics(SM_CYICON)-2 + iTopSpace;
if (IsAeroMode()) {
DTTOPTS dto = {0};
@@ -225,7 +225,7 @@ static LRESULT MHeaderbar_OnPaint(HWND hwndDlg, MHeaderbarCtrl *mit, UINT msg, dto.iGlowSize = 10;
HANDLE hTheme = openThemeData(hwndDlg, L"Window");
- textRect.left=50;
+ textRect.left = 50;
SelectObject(tempDC, hFntBold);
wchar_t *szTitleW = mir_t2u(szTitle);
@@ -233,7 +233,7 @@ static LRESULT MHeaderbar_OnPaint(HWND hwndDlg, MHeaderbarCtrl *mit, UINT msg, mir_free(szTitleW);
if (szSubTitle) {
- textRect.left=66;
+ textRect.left = 66;
SelectObject(tempDC, hFont);
wchar_t *szSubTitleW = mir_t2u(szSubTitle);
@@ -243,12 +243,12 @@ static LRESULT MHeaderbar_OnPaint(HWND hwndDlg, MHeaderbarCtrl *mit, UINT msg, closeThemeData(hTheme);
}
else {
- textRect.left=50;
+ textRect.left = 50;
SelectObject(tempDC, hFntBold);
DrawText(tempDC, szTitle, -1, &textRect, DT_TOP|DT_LEFT|DT_SINGLELINE|DT_NOPREFIX|DT_NOCLIP|DT_END_ELLIPSIS);
if (szSubTitle) {
- textRect.left=66;
+ textRect.left = 66;
SelectObject(tempDC, hFont);
DrawText(tempDC, szSubTitle, -1, &textRect, DT_BOTTOM|DT_LEFT|DT_SINGLELINE|DT_NOPREFIX|DT_NOCLIP|DT_END_ELLIPSIS);
} }
@@ -261,13 +261,13 @@ static LRESULT MHeaderbar_OnPaint(HWND hwndDlg, MHeaderbarCtrl *mit, UINT msg, if (mit->nControlsToRedraw)
{
RECT temprc;
- temprc.left=0;
- temprc.right=mit->width;
- temprc.top=0;
- temprc.bottom=mit->width;
+ temprc.left = 0;
+ temprc.right = mit->width;
+ temprc.top = 0;
+ temprc.bottom = mit->width;
HRGN hRgn = CreateRectRgnIndirect(&temprc);
- for (int i = 0; i < mit->nControlsToRedraw; ++i)
+ for (int i=0; i < mit->nControlsToRedraw; ++i)
{
GetWindowRect(mit->controlsToRedraw[i], &temprc);
MapWindowPoints(NULL, hwndDlg, (LPPOINT)&temprc, 2);
@@ -294,7 +294,7 @@ static LRESULT MHeaderbar_OnPaint(HWND hwndDlg, MHeaderbarCtrl *mit, UINT msg, static LRESULT CALLBACK MHeaderbarWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- MHeaderbarCtrl* itc = (MHeaderbarCtrl *)GetWindowLongPtr(hwndDlg, 0);
+ MHeaderbarCtrl* itc = (MHeaderbarCtrl *)GetWindowLongPtr(hwndDlg, 0);
switch(msg) {
case WM_NCCREATE:
itc = new MHeaderbarCtrl; //(MHeaderbarCtrl*)mir_alloc(sizeof(MHeaderbarCtrl));
@@ -333,8 +333,8 @@ static LRESULT CALLBACK MHeaderbarWndProc(HWND hwndDlg, UINT msg, WPARAM wParam case WM_SIZE:
GetClientRect(hwndDlg, &itc->rc);
- itc->width=itc->rc.right-itc->rc.left;
- itc->height=itc->rc.bottom-itc->rc.top;
+ itc->width = itc->rc.right-itc->rc.left;
+ itc->height = itc->rc.bottom-itc->rc.top;
return TRUE;
case WM_THEMECHANGED:
diff --git a/src/modules/options/iconheader.cpp b/src/modules/options/iconheader.cpp index e3f27c8289..afaf893d04 100644 --- a/src/modules/options/iconheader.cpp +++ b/src/modules/options/iconheader.cpp @@ -91,7 +91,7 @@ typedef void (*ItemDestuctor)(void*); static void MITListDestructor(void * adr)
{
- MIcoTab * mit=(MIcoTab *)adr;
+ MIcoTab * mit = (MIcoTab *)adr;
mir_free(mit->tcsName);
if (mit->hIcon && !(mit->flag&MITCF_SHAREDICON))
DestroyIcon(mit->hIcon);
@@ -109,14 +109,14 @@ int LoadIcoTabsModule() WNDCLASSEX wc;
ZeroMemory(&wc, sizeof(wc));
- wc.cbSize = sizeof(wc);
- wc.lpszClassName = MIRANDAICOTABCLASS;
- wc.lpfnWndProc = MIcoTabWndProc;
-// wc.hCursor = LoadCursor(NULL, IDC_HAND);
- wc.hCursor = LoadCursor(NULL, IDC_ARROW);
- wc.cbWndExtra = sizeof(MIcoTabCtrl*);
- wc.hbrBackground = 0; //GetStockObject(WHITE_BRUSH);
- wc.style = CS_GLOBALCLASS/*|CS_SAVEBITS*/;
+ wc.cbSize = sizeof(wc);
+ wc.lpszClassName = MIRANDAICOTABCLASS;
+ wc.lpfnWndProc = MIcoTabWndProc;
+// wc.hCursor = LoadCursor(NULL, IDC_HAND);
+ wc.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wc.cbWndExtra = sizeof(MIcoTabCtrl*);
+ wc.hbrBackground = 0; //GetStockObject(WHITE_BRUSH);
+ wc.style = CS_GLOBALCLASS/*|CS_SAVEBITS*/;
RegisterClassEx(&wc);
return 0;
}
@@ -126,35 +126,35 @@ static void MIcoTab_SetupColors(MIcoTabCtrl *dat) COLORREF cl;
cl = GetSysColor(COLOR_WINDOW);
- dat->rgbBkgBottom.rgbRed = (dat->rgbBkgTop.rgbRed = GetRValue(cl)) * .95;
- dat->rgbBkgBottom.rgbGreen = (dat->rgbBkgTop.rgbGreen = GetGValue(cl)) * .95;
- dat->rgbBkgBottom.rgbBlue = (dat->rgbBkgTop.rgbBlue = GetBValue(cl)) * .95;
+ dat->rgbBkgBottom.rgbRed = (dat->rgbBkgTop.rgbRed = GetRValue(cl)) * .95;
+ dat->rgbBkgBottom.rgbGreen = (dat->rgbBkgTop.rgbGreen = GetGValue(cl)) * .95;
+ dat->rgbBkgBottom.rgbBlue = (dat->rgbBkgTop.rgbBlue = GetBValue(cl)) * .95;
cl = GetSysColor(COLOR_HIGHLIGHT);
- dat->rgbSelTop.rgbRed = (dat->rgbSelBottom.rgbRed = GetRValue(cl)) * .75;
- dat->rgbSelTop.rgbGreen = (dat->rgbSelBottom.rgbGreen = GetGValue(cl)) * .75;
- dat->rgbSelTop.rgbBlue = (dat->rgbSelBottom.rgbBlue = GetBValue(cl)) * .75;
+ dat->rgbSelTop.rgbRed = (dat->rgbSelBottom.rgbRed = GetRValue(cl)) * .75;
+ dat->rgbSelTop.rgbGreen = (dat->rgbSelBottom.rgbGreen = GetGValue(cl)) * .75;
+ dat->rgbSelTop.rgbBlue = (dat->rgbSelBottom.rgbBlue = GetBValue(cl)) * .75;
- dat->rgbHotTop.rgbRed = (dat->rgbSelTop.rgbRed + 255) / 2;
- dat->rgbHotTop.rgbGreen = (dat->rgbSelTop.rgbGreen + 255) / 2;
- dat->rgbHotTop.rgbBlue = (dat->rgbSelTop.rgbBlue + 255) / 2;
+ dat->rgbHotTop.rgbRed = (dat->rgbSelTop.rgbRed + 255) / 2;
+ dat->rgbHotTop.rgbGreen = (dat->rgbSelTop.rgbGreen + 255) / 2;
+ dat->rgbHotTop.rgbBlue = (dat->rgbSelTop.rgbBlue + 255) / 2;
- dat->rgbHotBottom.rgbRed = (dat->rgbSelBottom.rgbRed + 255) / 2;
- dat->rgbHotBottom.rgbGreen = (dat->rgbSelBottom.rgbGreen + 255) / 2;
- dat->rgbHotBottom.rgbBlue = (dat->rgbSelBottom.rgbBlue + 255) / 2;
+ dat->rgbHotBottom.rgbRed = (dat->rgbSelBottom.rgbRed + 255) / 2;
+ dat->rgbHotBottom.rgbGreen = (dat->rgbSelBottom.rgbGreen + 255) / 2;
+ dat->rgbHotBottom.rgbBlue = (dat->rgbSelBottom.rgbBlue + 255) / 2;
- dat->clText = GetSysColor(COLOR_WINDOWTEXT);
- dat->clSelText = GetSysColor(COLOR_HIGHLIGHTTEXT);
- dat->clSelBorder = RGB(dat->rgbSelTop.rgbRed, dat->rgbSelTop.rgbGreen, dat->rgbSelTop.rgbBlue);
- dat->clHotBorder = RGB(dat->rgbHotTop.rgbRed, dat->rgbHotTop.rgbGreen, dat->rgbHotTop.rgbBlue);
+ dat->clText = GetSysColor(COLOR_WINDOWTEXT);
+ dat->clSelText = GetSysColor(COLOR_HIGHLIGHTTEXT);
+ dat->clSelBorder = RGB(dat->rgbSelTop.rgbRed, dat->rgbSelTop.rgbGreen, dat->rgbSelTop.rgbBlue);
+ dat->clHotBorder = RGB(dat->rgbHotTop.rgbRed, dat->rgbHotTop.rgbGreen, dat->rgbHotTop.rgbBlue);
if ( !dat->hFont) dat->hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
}
static void MIcoTab_FillRect(HDC hdc, int x, int y, int width, int height, COLORREF cl)
{
- int oldMode = SetBkMode(hdc, OPAQUE);
- COLORREF oldColor = SetBkColor(hdc, cl);
+ int oldMode = SetBkMode(hdc, OPAQUE);
+ COLORREF oldColor = SetBkColor(hdc, cl);
RECT rc; SetRect(&rc, x, y, x+width, y+height);
ExtTextOutA(hdc, 0, 0, ETO_OPAQUE, &rc, "", 0, 0);
@@ -165,11 +165,11 @@ static void MIcoTab_FillRect(HDC hdc, int x, int y, int width, int height, COLOR static void MIcoTab_DrawGradient(HDC hdc, int x, int y, int width, int height, RGBQUAD *rgb0, RGBQUAD *rgb1)
{
- int oldMode = SetBkMode(hdc, OPAQUE);
- COLORREF oldColor = SetBkColor(hdc, 0);
+ int oldMode = SetBkMode(hdc, OPAQUE);
+ COLORREF oldColor = SetBkColor(hdc, 0);
RECT rc; SetRect(&rc, x, 0, x+width, 0);
- for (int i=y+height; --i >= y;) {
+ for (int i = y+height; --i >= y;) {
COLORREF color = RGB(
((height-i-1)*rgb0->rgbRed + i*rgb1->rgbRed) / height,
((height-i-1)*rgb0->rgbGreen + i*rgb1->rgbGreen) / height,
@@ -187,9 +187,9 @@ static void MIcoTab_DrawGradient(HDC hdc, int x, int y, int width, int height, R static void MIcoTab_DrawItem(HWND hwnd, HDC hdc, MIcoTabCtrl *dat, MIcoTab *tab, int i)
{
int iTopSpace = IsAeroMode() ? 0 : ITC_BORDER_SIZE;
- int itemX = ITC_BORDER_SIZE + dat->itemWidth * i;
- int iconTop = iTopSpace + 5;
- int textTop = iconTop + 32 + 3;
+ int itemX = ITC_BORDER_SIZE + dat->itemWidth * i;
+ int iconTop = iTopSpace + 5;
+ int textTop = iconTop + 32 + 3;
HFONT hFntSave = NULL;
@@ -240,10 +240,10 @@ static void MIcoTab_DrawItem(HWND hwnd, HDC hdc, MIcoTabCtrl *dat, MIcoTab *tab, else SetTextColor(hdc, dat->clText);
RECT textRect;
- textRect.left=itemX;
- textRect.right=itemX+dat->itemWidth;
- textRect.top=textTop;
- textRect.bottom=iconTop+dat->itemHeight;
+ textRect.left = itemX;
+ textRect.right = itemX+dat->itemWidth;
+ textRect.top = textTop;
+ textRect.bottom = iconTop+dat->itemHeight;
DrawIcon(hdc, itemX+dat->itemWidth/2-16, iconTop, tab->hIcon);
if (IsVSMode()) {
@@ -270,8 +270,8 @@ static LRESULT MIcoTab_OnPaint(HWND hwndDlg, MIcoTabCtrl *mit, UINT msg, WPARAM RECT temprc;
int i;
- HDC hdc=BeginPaint(hwndDlg, &ps);
- HDC tempDC=CreateCompatibleDC(hdc);
+ HDC hdc = BeginPaint(hwndDlg, &ps);
+ HDC tempDC = CreateCompatibleDC(hdc);
HFONT hFont = 0;
@@ -284,13 +284,13 @@ static LRESULT MIcoTab_OnPaint(HWND hwndDlg, MIcoTabCtrl *mit, UINT msg, WPARAM bmi.bmiHeader.biCompression = BI_RGB;
hBmp = CreateDIBSection(tempDC, &bmi, DIB_RGB_COLORS, NULL, NULL, 0);
- hOldBmp=(HBITMAP)SelectObject(tempDC, hBmp);
+ hOldBmp = (HBITMAP)SelectObject(tempDC, hBmp);
if (IsAeroMode()) {
- temprc.left=0;
- temprc.right=mit->width;
- temprc.top=0;
- temprc.bottom=mit->width;
+ temprc.left = 0;
+ temprc.right = mit->width;
+ temprc.top = 0;
+ temprc.bottom = mit->width;
FillRect(tempDC, &temprc, (HBRUSH)GetStockObject(BLACK_BRUSH));
}
else {
@@ -329,13 +329,13 @@ static LRESULT MIcoTab_OnPaint(HWND hwndDlg, MIcoTabCtrl *mit, UINT msg, WPARAM static LRESULT CALLBACK MIcoTabWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- MIcoTabCtrl* itc = (MIcoTabCtrl *)GetWindowLongPtr(hwndDlg, 0);
+ MIcoTabCtrl* itc = (MIcoTabCtrl *)GetWindowLongPtr(hwndDlg, 0);
switch(msg) {
case WM_NCCREATE:
itc = new MIcoTabCtrl; //(MIcoTabCtrl*)mir_alloc(sizeof(MIcoTabCtrl));
if (itc == NULL) return FALSE;
- itc->nSelectedIdx=-1;
- itc->nHotIdx=-1;
+ itc->nSelectedIdx = -1;
+ itc->nHotIdx = -1;
itc->bMouseInside = FALSE;
SetWindowLongPtr(hwndDlg, 0, (LONG_PTR)itc);
MIcoTab_SetupColors(itc);
@@ -354,12 +354,12 @@ static LRESULT CALLBACK MIcoTabWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L case WM_SIZE:
GetClientRect(hwndDlg, &itc->rc);
- itc->width=itc->rc.right-itc->rc.left;
- itc->height=itc->rc.bottom-itc->rc.top;
+ itc->width = itc->rc.right-itc->rc.left;
+ itc->height = itc->rc.bottom-itc->rc.top;
if (itc->pList.getCount()) {
- itc->itemWidth=(itc->width-2*ITC_BORDER_SIZE)/itc->pList.getCount();
- itc->itemHeight=itc->height-2*ITC_BORDER_SIZE-2;
+ itc->itemWidth = (itc->width-2*ITC_BORDER_SIZE)/itc->pList.getCount();
+ itc->itemHeight = itc->height-2*ITC_BORDER_SIZE-2;
}
else itc->itemWidth = itc->itemHeight = 0;
return TRUE;
@@ -473,41 +473,41 @@ static LRESULT CALLBACK MIcoTabWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L break;
case ITCM_SETBACKGROUND:
- itc->hBkgBmp=(HBITMAP)lParam;
+ itc->hBkgBmp = (HBITMAP)lParam;
if ( !itc->hBkgDC)
itc->hBkgDC = CreateCompatibleDC(NULL);
itc->hBkgOldBmp = (HBITMAP)SelectObject(itc->hBkgDC, itc->hBkgBmp);
{
BITMAPINFO bmp;
GetObject(itc->hBkgBmp, sizeof(bmp), &bmp);
- itc->BkgSize.cx=bmp.bmiHeader.biWidth;
- itc->BkgSize.cy=bmp.bmiHeader.biHeight;
+ itc->BkgSize.cx = bmp.bmiHeader.biWidth;
+ itc->BkgSize.cy = bmp.bmiHeader.biHeight;
}
return TRUE;
case ITCM_ADDITEM:
{
- MIcoTab* pMit=(MIcoTab *)wParam;
+ MIcoTab* pMit = (MIcoTab *)wParam;
if ( !pMit)
return FALSE;
- MIcoTab* pListMit=(MIcoTab *)mir_calloc(sizeof(MIcoTab));
- pListMit->flag=pMit->flag;
- pListMit->data=pMit->data;
+ MIcoTab* pListMit = (MIcoTab *)mir_calloc(sizeof(MIcoTab));
+ pListMit->flag = pMit->flag;
+ pListMit->data = pMit->data;
if (pMit->flag & MITCF_UNICODE)
- pListMit->tcsName=mir_u2t(pMit->lpwzName);
+ pListMit->tcsName = mir_u2t(pMit->lpwzName);
else
- pListMit->tcsName=mir_a2t(pMit->lpzName);
+ pListMit->tcsName = mir_a2t(pMit->lpzName);
if (pMit->hIcon) {
if (pListMit->flag&MITCF_SHAREDICON)
- pListMit->hIcon=pMit->hIcon;
+ pListMit->hIcon = pMit->hIcon;
else
- pListMit->hIcon=CopyIcon(pMit->hIcon);
+ pListMit->hIcon = CopyIcon(pMit->hIcon);
}
itc->pList.insert(pListMit);
- itc->itemWidth=(itc->width-2*ITC_BORDER_SIZE)/itc->pList.getCount();
- itc->itemHeight=itc->height-2*ITC_BORDER_SIZE-2;
+ itc->itemWidth = (itc->width-2*ITC_BORDER_SIZE)/itc->pList.getCount();
+ itc->itemHeight = itc->height-2*ITC_BORDER_SIZE-2;
RedrawWindow(hwndDlg, NULL, NULL, RDW_INVALIDATE);
return TRUE;
diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp index e049105253..4a4f79688b 100644 --- a/src/modules/options/options.cpp +++ b/src/modules/options/options.cpp @@ -254,7 +254,7 @@ static void FindFilterStrings(int enableKeywordFiltering, int current, HWND hWnd DWORD key = GetPluginPageHash(page); //get the plugin page hash
- TCHAR * PluginFullName = NULL;
+ TCHAR *PluginFullName = NULL;
char * temp = GetPluginNameByInstance(page->hInst);
if (temp) PluginFullName = mir_a2t(temp);
GetDialogStrings(enableKeywordFiltering, key, GetPluginName(page->hInst, pluginName, SIZEOF(pluginName)), hWnd, page->ptszGroup, page->ptszTitle, page->ptszTab, PluginFullName);
@@ -309,10 +309,10 @@ static LRESULT CALLBACK OptionsFilterSubclassProc(HWND hWnd, UINT message, WPARA RECT rc2;
getThemeBackgroundContentRect(hTheme, hdc, EP_EDITTEXT, ETS_NORMAL, &rc, &rc2);
- rc2.top = 2 * rc.top - rc2.top;
- rc2.left = 2 * rc.left - rc2.left;
+ rc2.top = 2 * rc.top - rc2.top;
+ rc2.left = 2 * rc.left - rc2.left;
rc2.bottom = 2 * rc.bottom - rc2.bottom;
- rc2.right = 2 * rc.right - rc2.right;
+ rc2.right = 2 * rc.right - rc2.right;
drawThemeBackground(hTheme, hdc, EP_EDITTEXT, ETS_NORMAL, &rc2, &rc);
HFONT hFont = (HFONT) SendMessage(hWnd, WM_GETFONT, 0, 0);
@@ -365,7 +365,7 @@ static BOOL IsAeroMode() static void FreeOptionsData(OptionsPageInit* popi)
{
- for (int i = 0; i < popi->pageCount; i++) {
+ for (int i=0; i < popi->pageCount; i++) {
mir_free((char*)popi->odp[i].pszTitle);
mir_free(popi->odp[i].pszGroup);
mir_free(popi->odp[i].pszTab);
@@ -412,7 +412,7 @@ static void AeroPaintControl(HWND hwnd, HDC hdc, WNDPROC OldWndProc, UINT msg = // Fix alpha channel
GdiFlush();
- for (int i = 0; i < rc.right*rc.bottom; ++i, pBits += 4)
+ for (int i=0; i < rc.right*rc.bottom; ++i, pBits += 4)
if ( !pBits[3]) pBits[3] = 255;
//Copy to output
@@ -499,8 +499,8 @@ static void FillFilterCombo(int enableKeywordFiltering, HWND hDlg, OptionsDlgDat index = SendDlgItemMessage(hDlg, IDC_KEYWORD_FILTER, (UINT) CB_ADDSTRING, (WPARAM)0, (LPARAM)TranslateTS(CORE_MODULES_FILTER));
SendDlgItemMessage(hDlg, IDC_KEYWORD_FILTER, (UINT) CB_SETITEMDATA, (WPARAM)index, (LPARAM)hInst);
TCHAR* tszModuleName = (TCHAR*)alloca(MAX_PATH*sizeof(TCHAR));
- for (int i = 0; i < dat->arOpd.getCount(); i++) {
- TCHAR * dllName = NULL;
+ for (int i=0; i < dat->arOpd.getCount(); i++) {
+ TCHAR *dllName = NULL;
int j;
HINSTANCE inst = dat->arOpd[i]->hInst;
@@ -736,7 +736,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L else lastTab = Langpack_PcharToTchar(ood->pszTab);
OPTIONSDIALOGPAGE *odp = (OPTIONSDIALOGPAGE*)psh->ppsp;
- for (size_t i = 0; i < psh->nPages; i++, odp++) {
+ for (size_t i=0; i < psh->nPages; i++, odp++) {
OptionsPageData* opd = (OptionsPageData*)mir_calloc(sizeof(OptionsPageData));
if ( !LoadOptionsPage(odp, opd)) {
mir_free(opd);
@@ -832,7 +832,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L tvis.hInsertAfter = TVI_SORT;
tvis.item.mask = TVIF_TEXT | TVIF_STATE | TVIF_PARAM;
tvis.item.state = tvis.item.stateMask = TVIS_EXPANDED;
- for (int i = 0; i < dat->arOpd.getCount(); i++) {
+ for (int i=0; i < dat->arOpd.getCount(); i++) {
static TCHAR *fullTitle = NULL;
mir_free(fullTitle); fullTitle = NULL;
if ( !CheckPageShow(hdlg, dat, i))
@@ -841,7 +841,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L OptionsPageData* opd = dat->arOpd[i];
TCHAR* ptszGroup = TranslateTH(opd->hLangpack, opd->ptszGroup);
TCHAR* ptszTitle = TranslateTH(opd->hLangpack, opd->ptszTitle);
- TCHAR* ptszTab = TranslateTH(opd->hLangpack, opd->ptszTab);
+ TCHAR* ptszTab = TranslateTH(opd->hLangpack, opd->ptszTab);
tvis.hParent = NULL;
if (FilterInst != NULL) {
@@ -1051,7 +1051,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L h = p->expertHeight;
}
else {
- for (int i = 0; i < p->nExpertOnlyControls; i++)
+ for (int i=0; i < p->nExpertOnlyControls; i++)
ShowWindow(GetDlgItem(p->hwnd, p->expertOnlyControls[i]), SW_HIDE);
w = p->simpleWidth;
h = p->simpleHeight;
@@ -1081,7 +1081,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L TCITEM tie;
tie.mask = TCIF_TEXT | TCIF_IMAGE | TCIF_PARAM;
tie.iImage = -1;
- for (int i = 0; i < dat->arOpd.getCount(); i++) {
+ for (int i=0; i < dat->arOpd.getCount(); i++) {
if ( !CheckPageShow(hdlg, dat, i))
continue;
@@ -1124,13 +1124,13 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L parentPageRect = &dat->rcTab;
pageHeight = min(pageHeight, parentPageRect->bottom - parentPageRect->top);
- pageWidth = min(pageWidth, parentPageRect->right - parentPageRect->left);
+ pageWidth = min(pageWidth, parentPageRect->right - parentPageRect->left);
int newOffsetX = (parentPageRect->right - parentPageRect->left - pageWidth) >> 1;
int newOffsetY = p->insideTab ? 0 : (parentPageRect->bottom - parentPageRect->top - pageHeight) >> 1;
struct MoveChildParam mcp;
- mcp.hDlg = p->hwnd;
+ mcp.hDlg = p->hwnd;
mcp.offset.x = newOffsetX - p->offsetX;
mcp.offset.y = newOffsetY - p->offsetY;
@@ -1194,7 +1194,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L pshn.lParam = expert;
pshn.hdr.code = PSN_EXPERTCHANGED;
- for (int i = 0; i <dat->arOpd.getCount(); i++) {
+ for (int i=0; i <dat->arOpd.getCount(); i++) {
OptionsPageData *opd = dat->arOpd[i];
if (opd->hwnd == NULL) continue;
if ( !CheckPageShow(hdlg, dat, i)) continue;
@@ -1273,7 +1273,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L pshn.hdr.idFrom = 0;
pshn.lParam = 0;
pshn.hdr.code = PSN_RESET;
- for (int i = 0;i<dat->arOpd.getCount();i++) {
+ for (int i=0;i<dat->arOpd.getCount();i++) {
if (dat->arOpd[i]->hwnd == NULL || !dat->arOpd[i]->changed)
continue;
pshn.hdr.hwndFrom = dat->arOpd[i]->hwnd;
@@ -1302,7 +1302,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L }
pshn.hdr.code = PSN_APPLY;
- for (int i = 0;i<dat->arOpd.getCount();i++) {
+ for (int i=0;i<dat->arOpd.getCount();i++) {
if (dat->arOpd[i]->hwnd == NULL || !dat->arOpd[i]->changed) continue;
dat->arOpd[i]->changed = 0;
pshn.hdr.hwndFrom = dat->arOpd[i]->hwnd;
@@ -1351,7 +1351,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L }
Utils_SaveWindowPosition(hdlg, NULL, "Options", "");
{
- for (int i = 0; i < dat->arOpd.getCount(); i++)
+ for (int i=0; i < dat->arOpd.getCount(); i++)
FreeOptionsPageData(dat->arOpd[i]);
}
|