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

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-07-22 18:08:18 +00:00
parent 0a164d4c4e
commit 3dee36ae33
12 changed files with 500 additions and 505 deletions

View File

@@ -211,7 +211,7 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
const wxValidator& validator, const wxValidator& validator,
const wxString& name) const wxString& name)
{ {
m_macIsUserPane = FALSE ; m_macIsUserPane = false ;
wxASSERT_MSG( !(style & wxLB_MULTIPLE) || !(style & wxLB_EXTENDED), wxASSERT_MSG( !(style & wxLB_MULTIPLE) || !(style & wxLB_EXTENDED),
_T("only one of listbox selection modes can be specified") ); _T("only one of listbox selection modes can be specified") );
@@ -315,7 +315,7 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
SetBestSize(size); // Needed because it is a wxControlWithItems SetBestSize(size); // Needed because it is a wxControlWithItems
return TRUE; return true;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -324,7 +324,7 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
bool wxCheckListBox::IsChecked(size_t item) const bool wxCheckListBox::IsChecked(size_t item) const
{ {
wxCHECK_MSG( item < m_checks.GetCount(), FALSE, wxCHECK_MSG( item < m_checks.GetCount(), false,
_T("invalid index in wxCheckListBox::IsChecked") ); _T("invalid index in wxCheckListBox::IsChecked") );
return m_checks[item] != 0; return m_checks[item] != 0;
@@ -362,7 +362,7 @@ int wxCheckListBox::DoAppend(const wxString& item)
int pos = wxListBox::DoAppend(item); int pos = wxListBox::DoAppend(item);
// the item is initially unchecked // the item is initially unchecked
m_checks.Insert(FALSE, pos); m_checks.Insert(false, pos);
return pos; return pos;
} }
@@ -374,7 +374,7 @@ void wxCheckListBox::DoInsertItems(const wxArrayString& items, int pos)
size_t count = items.GetCount(); size_t count = items.GetCount();
for ( size_t n = 0; n < count; n++ ) for ( size_t n = 0; n < count; n++ )
{ {
m_checks.Insert(FALSE, pos + n); m_checks.Insert(false, pos + n);
} }
} }
@@ -386,7 +386,7 @@ void wxCheckListBox::DoSetItems(const wxArrayString& items, void **clientData)
size_t count = items.GetCount(); size_t count = items.GetCount();
for ( size_t n = 0; n < count; n++ ) for ( size_t n = 0; n < count; n++ )
{ {
m_checks.Add(FALSE); m_checks.Add(false);
} }
} }

View File

@@ -197,12 +197,12 @@ void wxClipboard::Clear()
bool wxClipboard::Flush() bool wxClipboard::Flush()
{ {
return FALSE; return false;
} }
bool wxClipboard::Open() bool wxClipboard::Open()
{ {
wxCHECK_MSG( !m_open, FALSE, wxT("clipboard already open") ); wxCHECK_MSG( !m_open, false, wxT("clipboard already open") );
m_open = true ; m_open = true ;
return true ; return true ;
} }
@@ -214,9 +214,9 @@ bool wxClipboard::IsOpened() const
bool wxClipboard::SetData( wxDataObject *data ) bool wxClipboard::SetData( wxDataObject *data )
{ {
wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") ); wxCHECK_MSG( m_open, false, wxT("clipboard not open") );
wxCHECK_MSG( data, FALSE, wxT("data is invalid") ); wxCHECK_MSG( data, false, wxT("data is invalid") );
Clear(); Clear();
// as we can only store one wxDataObject, this is the same in this // as we can only store one wxDataObject, this is the same in this
@@ -226,9 +226,9 @@ bool wxClipboard::SetData( wxDataObject *data )
bool wxClipboard::AddData( wxDataObject *data ) bool wxClipboard::AddData( wxDataObject *data )
{ {
wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") ); wxCHECK_MSG( m_open, false, wxT("clipboard not open") );
wxCHECK_MSG( data, FALSE, wxT("data is invalid") ); wxCHECK_MSG( data, false, wxT("data is invalid") );
/* we can only store one wxDataObject */ /* we can only store one wxDataObject */
Clear(); Clear();
@@ -324,11 +324,11 @@ bool wxClipboard::IsSupported( const wxDataFormat &dataFormat )
{ {
if (( err = GetScrapFlavorSize( scrapRef, dataFormat.GetFormatId(), &byteCount )) == noErr) if (( err = GetScrapFlavorSize( scrapRef, dataFormat.GetFormatId(), &byteCount )) == noErr)
{ {
return TRUE ; return true ;
} }
} }
} }
return FALSE; return false;
#else #else
long offset ; long offset ;
@@ -344,7 +344,7 @@ bool wxClipboard::IsSupported( const wxDataFormat &dataFormat )
bool wxClipboard::GetData( wxDataObject& data ) bool wxClipboard::GetData( wxDataObject& data )
{ {
wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") ); wxCHECK_MSG( m_open, false, wxT("clipboard not open") );
size_t formatcount = data.GetFormatCount() + 1 ; size_t formatcount = data.GetFormatCount() + 1 ;
wxDataFormat *array = new wxDataFormat[ formatcount ]; wxDataFormat *array = new wxDataFormat[ formatcount ];

View File

@@ -219,7 +219,7 @@ private:
}; };
BEGIN_EVENT_TABLE(wxComboBoxChoice, wxChoice) BEGIN_EVENT_TABLE(wxComboBoxChoice, wxChoice)
EVT_CHOICE(-1, wxComboBoxChoice::OnChoice) EVT_CHOICE(wxID_ANY, wxComboBoxChoice::OnChoice)
END_EVENT_TABLE() END_EVENT_TABLE()
wxComboBox::~wxComboBox() wxComboBox::~wxComboBox()
@@ -275,13 +275,13 @@ void wxComboBox::DoMoveWindow(int x, int y, int width, int height) {
{ {
// we might not be fully constructed yet, therefore watch out... // we might not be fully constructed yet, therefore watch out...
if ( m_choice ) if ( m_choice )
m_choice->SetSize(0, 0 , width, -1); m_choice->SetSize(0, 0 , width, wxDefaultCoord);
} }
else else
{ {
wxCoord wText = width - POPUPWIDTH - MARGIN; wxCoord wText = width - POPUPWIDTH - MARGIN;
m_text->SetSize(0, 0, wText, height); m_text->SetSize(0, 0, wText, height);
m_choice->SetSize(0 + wText + MARGIN, 0, POPUPWIDTH, -1); m_choice->SetSize(0 + wText + MARGIN, 0, POPUPWIDTH, wxDefaultCoord);
} }
#endif #endif
} }
@@ -419,7 +419,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
else else
{ {
m_text = new wxComboBoxText(this); m_text = new wxComboBoxText(this);
if ( size.y == -1 ) { if ( size.y == wxDefaultCoord ) {
csize.y = m_text->GetSize().y ; csize.y = m_text->GetSize().y ;
} }
} }
@@ -846,4 +846,3 @@ wxInt32 wxComboBox::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTR
ProcessCommand(event); ProcessCommand(event);
return noErr ; return noErr ;
} }

View File

@@ -671,8 +671,3 @@ void wxQTMediaBackend::Move(int x, int y, int w, int h)
FORCE_LINK_ME(basewxmediabackends); FORCE_LINK_ME(basewxmediabackends);
#endif //wxUSE_MEDIACTRL #endif //wxUSE_MEDIACTRL

View File

@@ -56,7 +56,7 @@ wxMenuItem::wxMenuItem(wxMenu *pParentMenu,
} }
m_radioGroup.start = -1; m_radioGroup.start = -1;
m_isRadioGroupStart = FALSE; m_isRadioGroupStart = false;
} }
wxMenuItem::~wxMenuItem() wxMenuItem::~wxMenuItem()
@@ -255,7 +255,7 @@ void wxMenuItem::SetText(const wxString& text)
void wxMenuItem::SetAsRadioGroupStart() void wxMenuItem::SetAsRadioGroupStart()
{ {
m_isRadioGroupStart = TRUE; m_isRadioGroupStart = true;
} }
void wxMenuItem::SetRadioGroupStart(int start) void wxMenuItem::SetRadioGroupStart(int start)

View File

@@ -30,7 +30,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
const wxValidator& validator, const wxValidator& validator,
const wxString& name) const wxString& name)
{ {
m_macIsUserPane = FALSE ; m_macIsUserPane = false ;
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) ) if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
return false; return false;
@@ -69,7 +69,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
} }
AddInCycle( chief ) ; AddInCycle( chief ) ;
} }
return TRUE; return true;
} }
void wxRadioButton::SetValue(bool val) void wxRadioButton::SetValue(bool val)
@@ -134,11 +134,13 @@ wxRadioButton *wxRadioButton::AddInCycle(wxRadioButton *cycle)
{ {
wxRadioButton *next,*current; wxRadioButton *next,*current;
if (cycle==NULL) { if (cycle==NULL)
{
m_cycle=this; m_cycle=this;
return(this); return(this);
} }
else { else
{
current=cycle; current=cycle;
while ((next=current->m_cycle)!=cycle) while ((next=current->m_cycle)!=cycle)
current=current->m_cycle; current=current->m_cycle;

View File

@@ -1831,15 +1831,15 @@ void wxWindowMac::DoSetSize(int x, int y, int width, int height, int sizeFlags)
return; return;
} }
if ( x == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE) ) if ( x == wxDefaultCoord && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE) )
x = currentX; x = currentX;
if ( y == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE) ) if ( y == wxDefaultCoord && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE) )
y = currentY; y = currentY;
AdjustForParentClientOrigin(x, y, sizeFlags); AdjustForParentClientOrigin(x, y, sizeFlags);
wxSize size(-1, -1); wxSize size = wxDefaultSize;
if ( width == -1 ) if ( width == wxDefaultCoord )
{ {
if ( sizeFlags & wxSIZE_AUTO_WIDTH ) if ( sizeFlags & wxSIZE_AUTO_WIDTH )
{ {
@@ -1853,11 +1853,11 @@ void wxWindowMac::DoSetSize(int x, int y, int width, int height, int sizeFlags)
} }
} }
if ( height == -1 ) if ( height == wxDefaultCoord )
{ {
if ( sizeFlags & wxSIZE_AUTO_HEIGHT ) if ( sizeFlags & wxSIZE_AUTO_HEIGHT )
{ {
if ( size.x == -1 ) if ( size.x == wxDefaultCoord )
{ {
size = DoGetBestSize(); size = DoGetBestSize();
} }
@@ -1894,7 +1894,7 @@ wxPoint wxWindowMac::GetClientAreaOrigin() const
void wxWindowMac::DoSetClientSize(int clientwidth, int clientheight) void wxWindowMac::DoSetClientSize(int clientwidth, int clientheight)
{ {
if ( clientheight != -1 || clientheight != -1 ) if ( clientheight != wxDefaultCoord || clientheight != wxDefaultCoord )
{ {
int currentclientwidth , currentclientheight ; int currentclientwidth , currentclientheight ;
int currentwidth , currentheight ; int currentwidth , currentheight ;
@@ -1902,7 +1902,7 @@ void wxWindowMac::DoSetClientSize(int clientwidth, int clientheight)
GetClientSize( &currentclientwidth , &currentclientheight ) ; GetClientSize( &currentclientwidth , &currentclientheight ) ;
GetSize( &currentwidth , &currentheight ) ; GetSize( &currentwidth , &currentheight ) ;
DoSetSize( -1 , -1 , currentwidth + clientwidth - currentclientwidth , DoSetSize( wxDefaultCoord , wxDefaultCoord , currentwidth + clientwidth - currentclientwidth ,
currentheight + clientheight - currentclientheight , wxSIZE_USE_EXISTING ) ; currentheight + clientheight - currentclientheight , wxSIZE_USE_EXISTING ) ;
} }
} }
@@ -3246,13 +3246,12 @@ bool wxWindowMac::Reparent(wxWindowBase *newParentBase)
wxWindowMac *newParent = (wxWindowMac *)newParentBase; wxWindowMac *newParent = (wxWindowMac *)newParentBase;
if ( !wxWindowBase::Reparent(newParent) ) if ( !wxWindowBase::Reparent(newParent) )
return FALSE; return false;
//copied from MacPostControlCreate //copied from MacPostControlCreate
ControlRef container = (ControlRef) GetParent()->GetHandle() ; ControlRef container = (ControlRef) GetParent()->GetHandle() ;
wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ; wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ;
::EmbedControl( m_peer->GetControlRef() , container ) ; ::EmbedControl( m_peer->GetControlRef() , container ) ;
return TRUE; return true;
} }