[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:
@@ -565,6 +565,7 @@ wxFileType *wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo)
|
||||
key.QueryValue(wxEmptyString, filetype);
|
||||
}
|
||||
}
|
||||
|
||||
// now set a mimetypeif we have it, but ignore it if none
|
||||
const wxString& mimetype = ftInfo.GetMimeType();
|
||||
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
|
||||
|
||||
// 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() );
|
||||
|
||||
}
|
||||
|
||||
return ft;
|
||||
}
|
||||
|
||||
|
@@ -293,7 +293,8 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
|
||||
// set the colors
|
||||
// --------------
|
||||
DWORD colBack, colText;
|
||||
if ( st & wxODSelected ) {
|
||||
if ( st & wxODSelected )
|
||||
{
|
||||
colBack = GetSysColor(COLOR_HIGHLIGHT);
|
||||
if (!(st & wxODDisabled))
|
||||
{
|
||||
@@ -304,7 +305,8 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
|
||||
colText = GetSysColor(COLOR_GRAYTEXT);
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
// fall back to default colors if none explicitly specified
|
||||
colBack = m_colBack.Ok() ? wxColourToPalRGB(m_colBack)
|
||||
: GetSysColor(COLOR_MENU);
|
||||
@@ -356,7 +358,8 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
|
||||
RECT rectFill = { rc.GetLeft(), rc.GetTop(),
|
||||
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
|
||||
// the bitmap or checkmark
|
||||
rectFill.left = xText;
|
||||
@@ -405,8 +408,10 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
|
||||
|
||||
// draw the bitmap
|
||||
// ---------------
|
||||
if ( IsCheckable() && !m_bmpChecked.Ok() ) {
|
||||
if ( st & wxODChecked ) {
|
||||
if ( IsCheckable() && !m_bmpChecked.Ok() )
|
||||
{
|
||||
if ( st & wxODChecked )
|
||||
{
|
||||
// what goes on: DrawFrameControl creates a b/w mask,
|
||||
// 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
|
||||
BitBlt(hdc, rc.x, rc.y, margin, m_nHeight,
|
||||
hdcMem, 0, 0, SRCCOPY);
|
||||
BitBlt(hdc, rc.x, rc.y, margin, m_nHeight, hdcMem, 0, 0, SRCCOPY);
|
||||
|
||||
DeleteDC(hdcMem);
|
||||
DeleteObject(hbmpCheck);
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
wxBitmap bmp;
|
||||
|
||||
if ( st & wxODDisabled )
|
||||
@@ -445,7 +450,8 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
|
||||
bmp = GetBitmap(!IsCheckable() || (st & wxODChecked));
|
||||
}
|
||||
|
||||
if ( bmp.Ok() ) {
|
||||
if ( bmp.Ok() )
|
||||
{
|
||||
wxMemoryDC dcMem(&dc);
|
||||
dcMem.SelectObject(bmp);
|
||||
|
||||
@@ -462,7 +468,8 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
|
||||
nBmpWidth, nBmpHeight,
|
||||
&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(),
|
||||
rc.GetLeft() + margin,
|
||||
rc.GetTop() + m_nHeight };
|
||||
|
@@ -717,7 +717,8 @@ bool wxRegKey::DeleteValue(const wxChar *szValue)
|
||||
|
||||
// deleting a value which doesn't exist is not considered an error
|
||||
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'"),
|
||||
szValue, GetName().c_str());
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user