Put braces around all calls to wxLogFunctions() inside an if statement.
This suppresses all the remaining g++ -Wparentheses warnings and uses consistent style everywhere. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -803,9 +803,13 @@ void BitmapComboBoxWidgetsPage::OnComboText(wxCommandEvent& event)
|
||||
_T("event and combobox values should be the same") );
|
||||
|
||||
if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER)
|
||||
{
|
||||
wxLogMessage(_T("BitmapCombobox enter pressed (now '%s')"), s.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogMessage(_T("BitmapCombobox text changed (now '%s')"), s.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void BitmapComboBoxWidgetsPage::OnComboBox(wxCommandEvent& event)
|
||||
|
@@ -618,9 +618,13 @@ void ComboboxWidgetsPage::OnComboText(wxCommandEvent& event)
|
||||
_T("event and combobox values should be the same") );
|
||||
|
||||
if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER)
|
||||
{
|
||||
wxLogMessage(_T("Combobox enter pressed (now '%s')"), s.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogMessage(_T("Combobox text changed (now '%s')"), s.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void ComboboxWidgetsPage::OnComboBox(wxCommandEvent& event)
|
||||
|
@@ -593,9 +593,13 @@ void ListboxWidgetsPage::OnListbox(wxCommandEvent& event)
|
||||
m_textDelete->SetValue(wxString::Format(_T("%ld"), sel));
|
||||
|
||||
if (event.IsSelection())
|
||||
{
|
||||
wxLogMessage(_T("Listbox item %ld selected"), sel);
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogMessage(_T("Listbox item %ld deselected"), sel);
|
||||
}
|
||||
}
|
||||
|
||||
void ListboxWidgetsPage::OnListboxDClick(wxCommandEvent& event)
|
||||
|
@@ -761,9 +761,13 @@ void ODComboboxWidgetsPage::OnComboText(wxCommandEvent& event)
|
||||
_T("event and combobox values should be the same") );
|
||||
|
||||
if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER)
|
||||
{
|
||||
wxLogMessage(_T("OwnerDrawnCombobox enter pressed (now '%s')"), s.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogMessage(_T("OwnerDrawnCombobox text changed (now '%s')"), s.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void ODComboboxWidgetsPage::OnComboBox(wxCommandEvent& event)
|
||||
|
@@ -541,8 +541,12 @@ void StaticWidgetsPage::OnButtonLabelWithMarkupText(wxCommandEvent& WXUNUSED(eve
|
||||
void StaticWidgetsPage::OnMouseEvent(wxMouseEvent& event)
|
||||
{
|
||||
if ( event.GetEventObject() == m_statText )
|
||||
{
|
||||
wxLogMessage("Clicked on static text");
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogMessage("Clicked on static box");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -904,9 +904,13 @@ void WidgetsFrame::OnDisableAutoComplete(wxCommandEvent& WXUNUSED(event))
|
||||
wxCHECK_RET( entry, "menu item should be disabled" );
|
||||
|
||||
if ( entry->AutoComplete(wxArrayString()) )
|
||||
{
|
||||
wxLogMessage("Disabled auto completion.");
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogMessage("AutoComplete() failed.");
|
||||
}
|
||||
}
|
||||
|
||||
void WidgetsFrame::OnAutoCompleteFixed(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -926,9 +930,13 @@ void WidgetsFrame::OnAutoCompleteFixed(wxCommandEvent& WXUNUSED(event))
|
||||
completion_choices.push_back("this string is for test");
|
||||
|
||||
if ( entry->AutoComplete(completion_choices) )
|
||||
{
|
||||
wxLogMessage("Enabled auto completion of a set of fixed strings.");
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogMessage("AutoComplete() failed.");
|
||||
}
|
||||
}
|
||||
|
||||
void WidgetsFrame::OnAutoCompleteFilenames(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -937,9 +945,13 @@ void WidgetsFrame::OnAutoCompleteFilenames(wxCommandEvent& WXUNUSED(event))
|
||||
wxCHECK_RET( entry, "menu item should be disabled" );
|
||||
|
||||
if ( entry->AutoCompleteFileNames() )
|
||||
{
|
||||
wxLogMessage("Enable auto completion of file names.");
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogMessage("AutoCompleteFileNames() failed.");
|
||||
}
|
||||
}
|
||||
|
||||
void WidgetsFrame::OnSetHint(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -956,9 +968,13 @@ void WidgetsFrame::OnSetHint(wxCommandEvent& WXUNUSED(event))
|
||||
s_hint = hint;
|
||||
|
||||
if ( entry->SetHint(hint) )
|
||||
{
|
||||
wxLogMessage("Set hint to \"%s\".", hint);
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogMessage("Text hints not supported.");
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
|
Reference in New Issue
Block a user