From 677ded95390173ee6a17fcb476608ca9c2b16fe5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Tue, 1 Feb 2005 20:44:06 +0000 Subject: [PATCH] MinGW warning fixes. Source cleaning. Stock items. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/configtool/src/appsettings.cpp | 2 +- utils/configtool/src/configitem.h | 4 +- utils/configtool/src/configitemselector.cpp | 4 +- utils/configtool/src/configitemselector.h | 2 +- utils/configtool/src/configtooldoc.h | 12 +++--- utils/configtool/src/configtoolview.cpp | 25 ++++++------- utils/configtool/src/custompropertydialog.cpp | 12 +++--- utils/configtool/src/mainframe.cpp | 37 ++++++++++--------- utils/configtool/src/propeditor.cpp | 8 ++-- utils/configtool/src/property.h | 6 +-- utils/configtool/src/settingsdialog.cpp | 8 ++-- utils/configtool/src/settingsdialog.h | 6 +-- 12 files changed, 63 insertions(+), 63 deletions(-) diff --git a/utils/configtool/src/appsettings.cpp b/utils/configtool/src/appsettings.cpp index 19c0104dab..a8bc0122ef 100644 --- a/utils/configtool/src/appsettings.cpp +++ b/utils/configtool/src/appsettings.cpp @@ -80,7 +80,7 @@ ctSettings::ctSettings() } // Copy constructor -ctSettings::ctSettings(const ctSettings& settings) +ctSettings::ctSettings(const ctSettings& settings) : wxObject() { Copy(settings); } diff --git a/utils/configtool/src/configitem.h b/utils/configtool/src/configitem.h index 681c54a469..fd89a029cc 100644 --- a/utils/configtool/src/configitem.h +++ b/utils/configtool/src/configitem.h @@ -37,7 +37,7 @@ enum ctConfigType ctTypeInteger, // An option with an integer value ctTypeBoolCheck, // An on/off option ctTypeBoolRadio // An on/off mutually exclusive option -}; +}; /*! * ctConfigItem represents a configuration setting. @@ -56,7 +56,7 @@ public: ~ctConfigItem(); /// Copy constructor. - ctConfigItem(const ctConfigItem& item) + ctConfigItem(const ctConfigItem& item) : wxObject() { (*this) = item; } diff --git a/utils/configtool/src/configitemselector.cpp b/utils/configtool/src/configitemselector.cpp index 6b01692a7b..450c11c1de 100644 --- a/utils/configtool/src/configitemselector.cpp +++ b/utils/configtool/src/configitemselector.cpp @@ -130,11 +130,11 @@ void ctConfigItemsSelector::CreateControls() item13->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxButton* item15 = new wxButton(item1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0); + wxButton* item15 = new wxButton(item1, wxID_OK); item15->SetDefault(); item13->Add(item15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxButton* item16 = new wxButton(item1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0); + wxButton* item16 = new wxButton(item1, wxID_CANCEL); item13->Add(item16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); GetSizer()->Fit(this); diff --git a/utils/configtool/src/configitemselector.h b/utils/configtool/src/configitemselector.h index 80d9950f1b..bc518e10e3 100644 --- a/utils/configtool/src/configitemselector.h +++ b/utils/configtool/src/configitemselector.h @@ -49,7 +49,7 @@ class ctConfigItem; */ class ctConfigItemsSelector: public wxDialog -{ +{ public: /// Constructor ctConfigItemsSelector( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = _("Configuration Items Selector")); diff --git a/utils/configtool/src/configtooldoc.h b/utils/configtool/src/configtooldoc.h index 9a24ff694a..52fcd388dd 100644 --- a/utils/configtool/src/configtooldoc.h +++ b/utils/configtool/src/configtooldoc.h @@ -92,10 +92,10 @@ public: /// Generate the text of a setup.h wxString GenerateSetup(); - + /// Helper function void GenerateSetup(ctConfigItem* item, wxString& str); - + /// Generate a configure command wxString GenerateConfigureCommand(); @@ -104,10 +104,10 @@ public: /// Finds the next item in the tree ctConfigItem* FindNextItem(ctConfigItem* item, bool wrap); - + /// Finds the next sibling in the tree ctConfigItem* FindNextSibling(ctConfigItem* item); - + protected: ctConfigItem* m_topItem; ctConfigItem* m_clipboardItem; @@ -127,7 +127,7 @@ public: ~ctConfiguration(); /// Copy constructor. - ctConfiguration(const ctConfiguration& configuration) + ctConfiguration(const ctConfiguration& configuration) : wxObject() { (*this) = configuration; } @@ -269,7 +269,7 @@ public: bool Do(); bool Undo(); bool DoAndUndo(bool doCmd); // Combine Do and Undo into one - + protected: ctConfigItem* m_activeState; ctConfigItem* m_savedState; diff --git a/utils/configtool/src/configtoolview.cpp b/utils/configtool/src/configtoolview.cpp index 6cd42bc8fa..ab770e3f59 100644 --- a/utils/configtool/src/configtoolview.cpp +++ b/utils/configtool/src/configtoolview.cpp @@ -259,7 +259,7 @@ void ctConfigToolView::SyncItem(ctConfigTreeCtrl* treeControl, ctConfigItem* ite { if (!item->GetParent()) { - item->SetTreeItem(treeControl->AddRoot(_(""), -1, -1, new ctTreeItemData(item))); + item->SetTreeItem(treeControl->AddRoot(wxEmptyString, -1, -1, new ctTreeItemData(item))); } else { @@ -423,9 +423,8 @@ void ctConfigToolView::AddItem(ctConfigType type, const wxString& msg) ctConfigItem* sel = GetSelection(); if (sel) { - wxString name = wxGetTextFromUser(_("Please enter a name for the new item."), - msg, wxT("")); - if (!name.IsEmpty()) + wxString name = wxGetTextFromUser(_("Please enter a name for the new item."), msg); + if (!name.empty()) { ctConfigItem* parent ; ctConfigItem* insertBefore ; @@ -474,7 +473,7 @@ void ctConfigToolView::OnRenameItem(wxCommandEvent& WXUNUSED(event)) { wxString name = wxGetTextFromUser(_("Please enter a new name for the item."), _("Rename item"), sel->GetName()); - if (!name.IsEmpty()) + if (!name.empty()) { sel->SetName(name); SyncItem(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), sel); @@ -686,7 +685,7 @@ void ctConfigToolView::OnItemHelp(wxCommandEvent& WXUNUSED(event)) if ( doc && GetSelection() ) { wxString helpTopic = GetSelection()->GetPropertyString(wxT("help-topic")); - if (!helpTopic.IsEmpty()) + if (!helpTopic.empty()) { wxGetApp().GetReferenceHelpController().DisplaySection(helpTopic); } @@ -732,7 +731,7 @@ void ctConfigToolView::OnAddCustomProperty(wxCommandEvent& WXUNUSED(event)) else if (type == wxT("long")) property->GetVariant() = wxVariant((long) 0, name); else - property->GetVariant() = wxVariant(wxT(""), name); + property->GetVariant() = wxVariant(wxEmptyString, name); property->SetCustom(true); property->SetDescription(descr); property->SetChoices(choices); @@ -791,7 +790,7 @@ void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& WXUNUSED(event)) else if (type == wxT("long")) property->GetVariant() = wxVariant((long) 0, name); else - property->GetVariant() = wxVariant(wxT(""), name); + property->GetVariant() = wxVariant(wxEmptyString, name); } if (name != oldName) property->GetVariant().SetName(name); @@ -910,7 +909,7 @@ void ctConfigToolView::OnSaveSetupFile(wxCommandEvent& WXUNUSED(event)) wxString filename = _T("setup.h"); wxString path = wxGetApp().GetSettings().m_lastSetupSaveDir; - if (path.IsEmpty()) + if (path.empty()) path = doc->GetFrameworkDir(false); wxString wildcard = _T("Header files (*.h)|*.h|All files (*.*)|*.*"); @@ -942,7 +941,7 @@ void ctConfigToolView::OnSaveConfigureCommand(wxCommandEvent& WXUNUSED(event)) wxString filename = _T("configurewx.sh"); wxString path = wxGetApp().GetSettings().m_lastSetupSaveDir; - if (path.IsEmpty()) + if (path.empty()) path = doc->GetFrameworkDir(false); wxString wildcard = _T("Shell script files (*.sh)|*.sh|All files (*.*)|*.*"); @@ -1014,7 +1013,7 @@ void ctConfigToolView::OnGo(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); wxString path = wxGetApp().GetSettings().m_lastSetupSaveDir; - if (!path.IsEmpty()) + if (!path.empty()) { if (wxGetApp().GetSettings().m_defaultFileKind == wxT("Setup file")) { @@ -1075,7 +1074,7 @@ void ctConfigToolView::OnGo(wxCommandEvent& WXUNUSED(event)) void ctConfigToolView::OnUpdateGo(wxUpdateUIEvent& event) { wxString path = wxGetApp().GetSettings().m_lastSetupSaveDir; - event.Enable(!path.IsEmpty()); + event.Enable(!path.empty()); } //---------------------------------------------------------------------------- @@ -1132,7 +1131,7 @@ bool ctFindReplaceDialog::DoFind(const wxString& textToFind, bool matchCase, boo return false; } - if (!sm_currentItem.IsEmpty()) + if (!sm_currentItem.empty()) { currentItem = doc->GetTopItem()->FindItem(sm_currentItem); } diff --git a/utils/configtool/src/custompropertydialog.cpp b/utils/configtool/src/custompropertydialog.cpp index 1791d0865a..cc00b9790e 100644 --- a/utils/configtool/src/custompropertydialog.cpp +++ b/utils/configtool/src/custompropertydialog.cpp @@ -166,13 +166,13 @@ void ctCustomPropertyDialog::CreateControls() item21->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxButton* item23 = new wxButton(item1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0); + wxButton* item23 = new wxButton(item1, wxID_OK); item21->Add(item23, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxButton* item24 = new wxButton(item1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0); + wxButton* item24 = new wxButton(item1, wxID_CANCEL); item21->Add(item24, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxButton* item25 = new wxButton(item1, wxID_HELP, _("&Help"), wxDefaultPosition, wxDefaultSize, 0); + wxButton* item25 = new wxButton(item1, wxID_HELP); item21->Add(item25, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); GetSizer()->Fit(this); @@ -217,7 +217,7 @@ void ctCustomPropertyDialog::OnPropertyChoiceAdd( wxCommandEvent& WXUNUSED(event if ( m_customPropertyEditorType->GetSelection() > -1 && m_customPropertyEditorType->GetStringSelection() == wxT("choice") ) { wxString str = wxGetTextFromUser(_T("New choice"), _("Add choice")); - if (!str.IsEmpty() && m_propertyChoices) + if (!str.empty() && m_propertyChoices) { m_propertyChoices->Append(str); m_choices.Add(str); @@ -233,7 +233,7 @@ void ctCustomPropertyDialog::OnPropertyChoiceAdd( wxCommandEvent& WXUNUSED(event void ctCustomPropertyDialog::OnUpdatePropertyChoiceAdd( wxUpdateUIEvent& event ) { if(m_customPropertyEditorType) - event.Enable( m_customPropertyEditorType->GetSelection() > -1 && + event.Enable( m_customPropertyEditorType->GetSelection() > -1 && m_customPropertyEditorType->GetStringSelection() == wxT("choice") ); } @@ -257,7 +257,7 @@ void ctCustomPropertyDialog::OnPropertyChoiceRemove( wxCommandEvent& WXUNUSED(ev void ctCustomPropertyDialog::OnUpdatePropertyChoiceRemove( wxUpdateUIEvent& event ) { if (m_customPropertyEditorType && m_propertyChoices) - event.Enable( m_customPropertyEditorType->GetSelection() > -1 && + event.Enable( m_customPropertyEditorType->GetSelection() > -1 && m_customPropertyEditorType->GetStringSelection() == wxT("choice") && m_propertyChoices->GetSelection() > -1 ); } diff --git a/utils/configtool/src/mainframe.cpp b/utils/configtool/src/mainframe.cpp index 838e331775..43247a405c 100644 --- a/utils/configtool/src/mainframe.cpp +++ b/utils/configtool/src/mainframe.cpp @@ -31,6 +31,7 @@ #include "wx/notebook.h" #include "wx/dataobj.h" #include "wx/clipbrd.h" +#include "wx/stockitem.h" #include "wxconfigtool.h" #include "mainframe.h" #include "appsettings.h" @@ -258,12 +259,12 @@ void ctMainFrame::InitToolBar(wxToolBar* toolBar) toolBar->AddTool(wxID_SAVE, toolBarBitmaps[2], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Save project")); toolBar->AddSeparator(); - toolBar->AddTool(wxID_CUT, toolBarBitmaps[4], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Cut")); - toolBar->AddTool(wxID_COPY, toolBarBitmaps[3], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Copy")); - toolBar->AddTool(wxID_PASTE, toolBarBitmaps[5], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Paste")); + toolBar->AddTool(wxID_CUT, toolBarBitmaps[4], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxGetStockLabel(wxID_CUT, false)); + toolBar->AddTool(wxID_COPY, toolBarBitmaps[3], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxGetStockLabel(wxID_COPY, false)); + toolBar->AddTool(wxID_PASTE, toolBarBitmaps[5], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxGetStockLabel(wxID_PASTE, false)); toolBar->AddSeparator(); - toolBar->AddTool(wxID_UNDO, toolBarBitmaps[10], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Undo")); - toolBar->AddTool(wxID_REDO, toolBarBitmaps[11], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Redo")); + toolBar->AddTool(wxID_UNDO, toolBarBitmaps[10], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxGetStockLabel(wxID_UNDO, false)); + toolBar->AddTool(wxID_REDO, toolBarBitmaps[11], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxGetStockLabel(wxID_REDO, false)); toolBar->AddSeparator(); toolBar->AddTool(ctID_GO, toolBarBitmaps[6], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Save setup.h or configurewx.sh")); toolBar->AddSeparator(); @@ -282,30 +283,30 @@ wxMenuBar* ctMainFrame::CreateMenuBar() wxGetApp().GetFileHistory().UseMenu(fileMenu); - fileMenu->Append(wxID_NEW, wxT("&New...\tCtrl+N"), wxT("Create a new settings document")); - fileMenu->Append(wxID_OPEN, wxT("&Open...\tCtrl+O"), wxT("Open a settings document")); - fileMenu->Append(wxID_CLOSE, wxT("&Close\tCtrl+W"), wxT("Close the current settings document")); + fileMenu->Append(wxID_NEW, wxGetStockLabel(wxID_NEW, true, wxT("Ctrl+N")), wxT("Create a new settings document")); + fileMenu->Append(wxID_OPEN, wxGetStockLabel(wxID_OPEN, true, wxT("Ctrl+O")), wxT("Open a settings document")); + fileMenu->Append(wxID_CLOSE, wxGetStockLabel(wxID_CLOSE, true, wxT("Ctrl+W")), wxT("Close the current settings document")); fileMenu->AppendSeparator(); - fileMenu->Append(wxID_SAVE, wxT("&Save\tCtrl+S"), wxT("Save the settings document")); - fileMenu->Append(wxID_SAVEAS, wxT("&Save As..."), wxT("Save the settings document under a new filename")); + fileMenu->Append(wxID_SAVE, wxGetStockLabel(wxID_SAVE, true, wxT("Ctrl+S")), wxT("Save the settings document")); + fileMenu->Append(wxID_SAVEAS, wxGetStockLabel(wxID_SAVEAS), wxT("Save the settings document under a new filename")); fileMenu->AppendSeparator(); fileMenu->Append(ctID_SAVE_SETUP_FILE, wxT("Save Setup.&h...\tCtrl+H"), wxT("Save the setup.h file")); fileMenu->Append(ctID_SAVE_CONFIGURE_COMMAND, wxT("Save Configure Script...\tCtrl+G"), wxT("Save the configure script file")); fileMenu->AppendSeparator(); fileMenu->Append(ctID_GO, wxT("&Go\tF5"), wxT("Quick-save the setup.h or configure.sh file")); fileMenu->AppendSeparator(); - fileMenu->Append(wxID_EXIT, wxT("E&xit\tAlt+F4"), wxT("Exit the application")); + fileMenu->Append(wxID_EXIT, wxGetStockLabel(wxID_EXIT, true, wxT("Alt+F4")), wxT("Exit the application")); wxGetApp().GetDocManager()->FileHistoryUseMenu(fileMenu); wxMenu *editMenu = new wxMenu; - editMenu->Append(wxID_UNDO, _("&Undo\tCtrl+Z")); - editMenu->Append(wxID_REDO, _("&Redo\tCtrl+Y")); + editMenu->Append(wxID_UNDO, wxGetStockLabel(wxID_UNDO, true, wxT("Ctrl+Z"))); + editMenu->Append(wxID_REDO, wxGetStockLabel(wxID_REDO, true, wxT("Ctrl+Y"))); editMenu->AppendSeparator(); - editMenu->Append(wxID_COPY, _("&Copy\tCtrl+C")); - editMenu->Append(wxID_CUT, _("Cu&t\tCtrl+X")); - editMenu->Append(wxID_PASTE, _("&Paste\tCtrl+V")); + editMenu->Append(wxID_COPY, wxGetStockLabel(wxID_CLOSE, true, wxT("Ctrl+C"))); + editMenu->Append(wxID_CUT, wxGetStockLabel(wxID_CUT, true, wxT("Ctrl+X"))); + editMenu->Append(wxID_PASTE, wxGetStockLabel(wxID_PASTE, true, wxT("Ctrl+V"))); editMenu->AppendSeparator(); wxMenu* itemMenu = new wxMenu; @@ -331,7 +332,7 @@ wxMenuBar* ctMainFrame::CreateMenuBar() editMenu->Append(ctID_DELETE_ITEM, _("&Delete Option"), _("Delete a configuration option")); editMenu->Append(ctID_RENAME_ITEM, _("&Rename Option"), _("Rename a configuration option")); editMenu->AppendSeparator(); - editMenu->Append(wxID_FIND, _("&Find...\tCtrl+F"), _("Search for a string in the settings document")); + editMenu->Append(wxID_FIND, wxGetStockLabel(wxID_FIND, true, wxT("Ctrl+F")), _("Search for a string in the settings document")); // Save for the command processor. m_editMenu = editMenu; @@ -526,7 +527,7 @@ void ctOutputWindow::OnSaveText(wxCommandEvent& WXUNUSED(event)) if (m_codeCtrl->IsModified()) { wxString filename(m_filenameCtrl->GetValue()); - if (!filename.IsEmpty()) + if (!filename.empty()) { m_codeCtrl->SaveFile(filename); m_codeCtrl->DiscardEdits(); diff --git a/utils/configtool/src/propeditor.cpp b/utils/configtool/src/propeditor.cpp index 933d0de280..762df55dfb 100644 --- a/utils/configtool/src/propeditor.cpp +++ b/utils/configtool/src/propeditor.cpp @@ -187,7 +187,7 @@ bool ctPropertyEditor::CanEditDetails() int row; ctProperty* prop = FindSelectedProperty(row); - if (!prop || prop->GetEditorType().IsEmpty()) + if (!prop || prop->GetEditorType().empty()) return false; return true; } @@ -383,7 +383,7 @@ bool ctPropertyEditor::DisplayDefaultProperty() bool ctPropertyEditor::EditDefaultProperty(ctConfigItem* item) { wxString defaultPropertyName = item->GetDefaultProperty(); - if (!defaultPropertyName.IsEmpty()) + if (!defaultPropertyName.empty()) { ctProperty* prop = item->GetProperties().FindProperty(defaultPropertyName); if (prop) @@ -809,10 +809,10 @@ bool ctMultiLineTextEditor::AddControls(wxWindow* parent, const wxString& msg) item4->Add( 5, 5, 1, wxALIGN_CENTRE|wxALL, 5 ); - wxButton *item5 = new wxButton( parent, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton *item5 = new wxButton( parent, wxID_OK); item4->Add( item5, 0, wxALIGN_CENTRE|wxALL, 5 ); - wxButton *item6 = new wxButton( parent, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton *item6 = new wxButton( parent, wxID_CANCEL); item4->Add( item6, 0, wxALIGN_CENTRE|wxALL, 5 ); item1->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); diff --git a/utils/configtool/src/property.h b/utils/configtool/src/property.h index 06fbf4d8f6..e36eeea21b 100644 --- a/utils/configtool/src/property.h +++ b/utils/configtool/src/property.h @@ -34,7 +34,7 @@ public: m_custom = false; m_show = true; } - ctProperty(const ctProperty& property) { Copy(property); } + ctProperty(const ctProperty& property) : wxObject() { Copy(property); } ctProperty(const wxString& descr, const wxVariant& variant, const wxString& editorType = wxEmptyString, bool readOnly = false) @@ -91,7 +91,7 @@ public: inline const wxArrayString& GetChoices() const { return m_choices; } inline const wxString& GetDescription() const { return m_description; } inline bool IsCustom() const { return m_custom; } - + inline void SetName(const wxString& name) { m_variant.SetName(name); } inline void SetValue(const wxString& value) { m_variant = value; } inline void SetValue(const wxVariant& value) { m_variant = value; } @@ -134,7 +134,7 @@ class ctProperties: public wxObject DECLARE_CLASS(ctProperties) public: ctProperties() {} - ctProperties(const ctProperties& properties) { Copy(properties); } + ctProperties(const ctProperties& properties) : wxObject() { Copy(properties); } ~ctProperties() { Clear(); } void operator = (const ctProperties& properties) { Clear(); Copy(properties); } diff --git a/utils/configtool/src/settingsdialog.cpp b/utils/configtool/src/settingsdialog.cpp index a01dc52bd9..0cfefa29e0 100644 --- a/utils/configtool/src/settingsdialog.cpp +++ b/utils/configtool/src/settingsdialog.cpp @@ -98,14 +98,14 @@ void ctSettingsDialog::CreateControls() item21->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxButton* item23 = new wxButton(item1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0); + wxButton* item23 = new wxButton(item1, wxID_OK); item23->SetDefault(); item21->Add(item23, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxButton* item24 = new wxButton(item1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0); + wxButton* item24 = new wxButton(item1, wxID_CANCEL); item21->Add(item24, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxButton* item25 = new wxButton(item1, wxID_HELP, _("&Help"), wxDefaultPosition, wxDefaultSize, 0); + wxButton* item25 = new wxButton(item1, wxID_HELP); item21->Add(item25, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); #if defined(__WXGTK__) || defined(__WXMAC__) @@ -163,7 +163,7 @@ void ctSettingsDialog::OnHelp( wxCommandEvent& WXUNUSED(event) ) helpTopic = wxT("Location settings dialog"); } - if (!helpTopic.IsEmpty()) + if (!helpTopic.empty()) { wxGetApp().GetHelpController().DisplaySection(helpTopic); } diff --git a/utils/configtool/src/settingsdialog.h b/utils/configtool/src/settingsdialog.h index 4005476a8a..44d8633749 100644 --- a/utils/configtool/src/settingsdialog.h +++ b/utils/configtool/src/settingsdialog.h @@ -54,7 +54,7 @@ class ctLocationSettingsDialog; */ class ctSettingsDialog: public wxDialog -{ +{ public: /// Constructor ctSettingsDialog( wxWindow* parent ); @@ -96,7 +96,7 @@ protected: */ class ctGeneralSettingsDialog: public wxPanel -{ +{ public: /// Constructor ctGeneralSettingsDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER|wxTAB_TRAVERSAL ); @@ -124,7 +124,7 @@ public: */ class ctLocationSettingsDialog: public wxPanel -{ +{ public: /// Constructor ctLocationSettingsDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER|wxTAB_TRAVERSAL ); -- 2.45.2