X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9354814833f4685f57bed6116ef9c7e851c8031d..d1a6e2b7a103d761fbc15e0e9c1c20ab53a849d9:/contrib/utils/wxrcedit/pe_basic.cpp?ds=sidebyside diff --git a/contrib/utils/wxrcedit/pe_basic.cpp b/contrib/utils/wxrcedit/pe_basic.cpp index 8ae8056f4f..ab467eb453 100644 --- a/contrib/utils/wxrcedit/pe_basic.cpp +++ b/contrib/utils/wxrcedit/pe_basic.cpp @@ -39,7 +39,7 @@ wxWindow *PropEditCtrlTxt::CreateEditCtrl() -void PropEditCtrlTxt::OnText(wxCommandEvent& event) +void PropEditCtrlTxt::OnText(wxCommandEvent& WXUNUSED(event)) { if (CanSave()) { @@ -69,7 +69,9 @@ void PropEditCtrlTxt::WriteValue() wxWindow *PropEditCtrlInt::CreateEditCtrl() { PropEditCtrlTxt::CreateEditCtrl(); +#if wxUSE_VALIDATORS m_TextCtrl->SetValidator(wxTextValidator(wxFILTER_NUMERIC)); +#endif return m_TextCtrl; } @@ -124,7 +126,7 @@ wxString PropEditCtrlBool::GetValueAsText(wxTreeItemId ti) -void PropEditCtrlBool::OnChoice(wxCommandEvent& event) +void PropEditCtrlBool::OnChoice(wxCommandEvent& WXUNUSED(event)) { if (CanSave()) { @@ -170,7 +172,7 @@ class PropEditCtrlCoordXY : public PropEditCtrlInt wxString prev = XmlReadValue(GetNode(), m_PropInfo->Name); if (prev[prev.Len()-1] == _T('d')) s << _T('d'); XmlWriteValue(GetNode(), m_PropInfo->Name, s); - m_TreeCtrl->SetItemBold(m_TreeCtrl->GetParent(m_TreeItem), TRUE); + m_TreeCtrl->SetItemBold(m_TreeCtrl->GetItemParent(m_TreeItem), TRUE); } virtual wxString GetValueAsText(wxTreeItemId ti) @@ -226,7 +228,7 @@ class PropEditCtrlCoordDlg : public PropEditCtrlBool wxString s = XmlReadValue(GetNode(), m_PropInfo->Name).BeforeFirst(_T('d')); if (m_Choice->GetSelection() == 1) s << _T('d'); XmlWriteValue(GetNode(), m_PropInfo->Name, s); - m_TreeCtrl->SetItemBold(m_TreeCtrl->GetParent(m_TreeItem), TRUE); + m_TreeCtrl->SetItemBold(m_TreeCtrl->GetItemParent(m_TreeItem), TRUE); } virtual wxString GetValueAsText(wxTreeItemId ti) @@ -307,7 +309,7 @@ class PropEditCtrlDimX : public PropEditCtrlInt s = m_c; if (dlg) s << _T('d'); XmlWriteValue(GetNode(), m_PropInfo->Name, s); - m_TreeCtrl->SetItemBold(m_TreeCtrl->GetParent(m_TreeItem), TRUE); + m_TreeCtrl->SetItemBold(m_TreeCtrl->GetItemParent(m_TreeItem), TRUE); } virtual wxString GetValueAsText(wxTreeItemId ti) @@ -357,19 +359,19 @@ wxTreeItemId PropEditCtrlDim::CreateTreeEntry(wxTreeItemId parent, const Propert -// --------------------- PropEditCtrlXMLID ----------------------------- +// --------------------- PropEditCtrlXRCID ----------------------------- #define REAL_NODE (NodeHandler::Find(GetNode())->GetRealNode(GetNode())) -void PropEditCtrlXMLID::ReadValue() +void PropEditCtrlXRCID::ReadValue() { m_TextCtrl->SetValue(REAL_NODE->GetPropVal(_T("name"), wxEmptyString)); } -void PropEditCtrlXMLID::WriteValue() +void PropEditCtrlXRCID::WriteValue() { wxString s =m_TextCtrl->GetValue(); if (s.IsEmpty()) s = _T("-1"); @@ -383,7 +385,7 @@ void PropEditCtrlXMLID::WriteValue() -void PropEditCtrlXMLID::Clear() +void PropEditCtrlXRCID::Clear() { EndEdit(); REAL_NODE->DeleteProperty(_T("name")); @@ -393,10 +395,10 @@ void PropEditCtrlXMLID::Clear() -void PropEditCtrlXMLID::OnDetails() +void PropEditCtrlXRCID::OnDetails() { wxString choices[] = {wxString(_T("-1")) - #define stdID(id) , wxString(#id) + #define stdID(id) , wxString(_T(#id)) stdID(wxID_OK) stdID(wxID_CANCEL) stdID(wxID_YES) stdID(wxID_NO) stdID(wxID_APPLY) stdID(wxID_HELP) @@ -418,7 +420,7 @@ void PropEditCtrlXMLID::OnDetails() }; wxString s = - wxGetSingleChoice(_("Choose from predefined IDs:"), _("XMLID"), + wxGetSingleChoice(_("Choose from predefined IDs:"), _("XRCID"), 38/*sizeof choices*/, choices); if (!s) return; m_TextCtrl->SetValue(s); @@ -428,14 +430,14 @@ void PropEditCtrlXMLID::OnDetails() -wxString PropEditCtrlXMLID::GetValueAsText(wxTreeItemId ti) +wxString PropEditCtrlXRCID::GetValueAsText(wxTreeItemId WXUNUSED(ti)) { return REAL_NODE->GetPropVal(_T("name"), wxEmptyString); } -bool PropEditCtrlXMLID::IsPresent(const PropertyInfo& pinfo) +bool PropEditCtrlXRCID::IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return REAL_NODE->HasProp(_T("name")); }