[1231183] 'cleanup: mismatched indentation' and other cleanings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-07-22 17:13:46 +00:00
parent 7448de8d8d
commit 92218ce600
8 changed files with 292 additions and 283 deletions

View File

@@ -565,6 +565,7 @@ wxFileType *wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo)
key.QueryValue(wxEmptyString, filetype); key.QueryValue(wxEmptyString, filetype);
} }
} }
// now set a mimetypeif we have it, but ignore it if none // now set a mimetypeif we have it, but ignore it if none
const wxString& mimetype = ftInfo.GetMimeType(); const wxString& mimetype = ftInfo.GetMimeType();
if ( !mimetype.empty() ) if ( !mimetype.empty() )
@@ -625,7 +626,6 @@ wxFileType *wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo)
} }
} }
} // end of for loop; all extensions now point to HKCR\.ext\Default } // end of for loop; all extensions now point to HKCR\.ext\Default
// create the filetype key itself (it will be empty for now, but // create the filetype key itself (it will be empty for now, but
@@ -644,6 +644,7 @@ wxFileType *wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo)
if (! ftInfo.GetIconFile().empty() ) ft->SetDefaultIcon (ftInfo.GetIconFile(), ftInfo.GetIconIndex() ); if (! ftInfo.GetIconFile().empty() ) ft->SetDefaultIcon (ftInfo.GetIconFile(), ftInfo.GetIconIndex() );
} }
return ft; return ft;
} }

View File

@@ -293,7 +293,8 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
// set the colors // set the colors
// -------------- // --------------
DWORD colBack, colText; DWORD colBack, colText;
if ( st & wxODSelected ) { if ( st & wxODSelected )
{
colBack = GetSysColor(COLOR_HIGHLIGHT); colBack = GetSysColor(COLOR_HIGHLIGHT);
if (!(st & wxODDisabled)) if (!(st & wxODDisabled))
{ {
@@ -304,7 +305,8 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
colText = GetSysColor(COLOR_GRAYTEXT); colText = GetSysColor(COLOR_GRAYTEXT);
} }
} }
else { else
{
// fall back to default colors if none explicitly specified // fall back to default colors if none explicitly specified
colBack = m_colBack.Ok() ? wxColourToPalRGB(m_colBack) colBack = m_colBack.Ok() ? wxColourToPalRGB(m_colBack)
: GetSysColor(COLOR_MENU); : GetSysColor(COLOR_MENU);
@@ -356,7 +358,8 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
RECT rectFill = { rc.GetLeft(), rc.GetTop(), RECT rectFill = { rc.GetLeft(), rc.GetTop(),
rc.GetRight() + 1, rc.GetBottom() + 1 }; rc.GetRight() + 1, rc.GetBottom() + 1 };
if ( (st & wxODSelected) && m_bmpChecked.Ok() && draw_bitmap_edge ) { if ( (st & wxODSelected) && m_bmpChecked.Ok() && draw_bitmap_edge )
{
// only draw the highlight under the text, not under // only draw the highlight under the text, not under
// the bitmap or checkmark // the bitmap or checkmark
rectFill.left = xText; rectFill.left = xText;
@@ -405,8 +408,10 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
// draw the bitmap // draw the bitmap
// --------------- // ---------------
if ( IsCheckable() && !m_bmpChecked.Ok() ) { if ( IsCheckable() && !m_bmpChecked.Ok() )
if ( st & wxODChecked ) { {
if ( st & wxODChecked )
{
// what goes on: DrawFrameControl creates a b/w mask, // what goes on: DrawFrameControl creates a b/w mask,
// then we copy it to screen to have right colors // then we copy it to screen to have right colors
@@ -423,14 +428,14 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
} }
// finally copy it to screen DC and clean up // finally copy it to screen DC and clean up
BitBlt(hdc, rc.x, rc.y, margin, m_nHeight, BitBlt(hdc, rc.x, rc.y, margin, m_nHeight, hdcMem, 0, 0, SRCCOPY);
hdcMem, 0, 0, SRCCOPY);
DeleteDC(hdcMem); DeleteDC(hdcMem);
DeleteObject(hbmpCheck); DeleteObject(hbmpCheck);
} }
} }
else { else
{
wxBitmap bmp; wxBitmap bmp;
if ( st & wxODDisabled ) if ( st & wxODDisabled )
@@ -445,7 +450,8 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
bmp = GetBitmap(!IsCheckable() || (st & wxODChecked)); bmp = GetBitmap(!IsCheckable() || (st & wxODChecked));
} }
if ( bmp.Ok() ) { if ( bmp.Ok() )
{
wxMemoryDC dcMem(&dc); wxMemoryDC dcMem(&dc);
dcMem.SelectObject(bmp); dcMem.SelectObject(bmp);
@@ -462,7 +468,8 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
nBmpWidth, nBmpHeight, nBmpWidth, nBmpHeight,
&dcMem, 0, 0, wxCOPY, true /* use mask */); &dcMem, 0, 0, wxCOPY, true /* use mask */);
if ( ( st & wxODSelected ) && !( st & wxODDisabled ) && draw_bitmap_edge ) { if ( ( st & wxODSelected ) && !( st & wxODDisabled ) && draw_bitmap_edge )
{
RECT rectBmp = { rc.GetLeft(), rc.GetTop(), RECT rectBmp = { rc.GetLeft(), rc.GetTop(),
rc.GetLeft() + margin, rc.GetLeft() + margin,
rc.GetTop() + m_nHeight }; rc.GetTop() + m_nHeight };

View File

@@ -717,7 +717,8 @@ bool wxRegKey::DeleteValue(const wxChar *szValue)
// deleting a value which doesn't exist is not considered an error // deleting a value which doesn't exist is not considered an error
if ( (m_dwLastError != ERROR_SUCCESS) && if ( (m_dwLastError != ERROR_SUCCESS) &&
(m_dwLastError != ERROR_FILE_NOT_FOUND) ) { (m_dwLastError != ERROR_FILE_NOT_FOUND) )
{
wxLogSysError(m_dwLastError, _("Can't delete value '%s' from key '%s'"), wxLogSysError(m_dwLastError, _("Can't delete value '%s' from key '%s'"),
szValue, GetName().c_str()); szValue, GetName().c_str());
return false; return false;