projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yet another compilation fix for ItemDeleted
[wxWidgets.git]
/
src
/
xrc
/
xh_radbx.cpp
diff --git
a/src/xrc/xh_radbx.cpp
b/src/xrc/xh_radbx.cpp
index edbbbf6a492d4cf39d397bd9ff5e4bb2e1ccb5c6..dbbf54b5e450b55e82489f4f3bb01d3f605030f0 100644
(file)
--- a/
src/xrc/xh_radbx.cpp
+++ b/
src/xrc/xh_radbx.cpp
@@
-80,37
+80,53
@@
wxObject *wxRadioBoxXmlHandler::DoCreateResource()
SetupWindow(control);
SetupWindow(control);
-#if wxUSE_TOOLTIPS
const unsigned count = labels.size();
for( unsigned i = 0; i < count; i++ )
{
const unsigned count = labels.size();
for( unsigned i = 0; i < count; i++ )
{
+#if wxUSE_TOOLTIPS
if ( !tooltips[i].empty() )
control->SetItemToolTip(i, tooltips[i]);
if ( !tooltips[i].empty() )
control->SetItemToolTip(i, tooltips[i]);
- }
#endif // wxUSE_TOOLTIPS
#endif // wxUSE_TOOLTIPS
+#if wxUSE_HELP
+ if ( helptextSpecified[i] )
+ control->SetItemHelpText(i, helptexts[i]);
+#endif // wxUSE_HELP
+ }
labels.clear(); // dump the strings
labels.clear(); // dump the strings
+
tooltips.clear(); // dump the tooltips
tooltips.clear(); // dump the tooltips
+ helptexts.clear(); // dump the helptexts
+ helptextSpecified.clear();
+
return control;
}
else // inside the radiobox element
{
return control;
}
else // inside the radiobox element
{
- // we handle
<item tooltip
="...">Label</item> constructs here
+ // we handle
handle <item tooltip="..." helptext
="...">Label</item> constructs here
wxString str = GetNodeContent(m_node);
wxString str = GetNodeContent(m_node);
+
wxString tooltip;
wxString tooltip;
- m_node->GetPropVal(wxT("tooltip"), &tooltip);
+ m_node->GetAttribute(wxT("tooltip"), &tooltip);
+
+ wxString helptext;
+ bool hasHelptext = m_node->GetAttribute(wxT("helptext"), &helptext);
if (m_resource->GetFlags() & wxXRC_USE_LOCALE)
{
if (m_resource->GetFlags() & wxXRC_USE_LOCALE)
{
- str = wxGetTranslation(str);
+ str = wxGetTranslation(str
, m_resource->GetDomain()
);
if ( !tooltip.empty() )
if ( !tooltip.empty() )
- tooltip = wxGetTranslation(tooltip);
+ tooltip = wxGetTranslation(tooltip, m_resource->GetDomain());
+ if ( hasHelptext )
+ helptext = wxGetTranslation(helptext, m_resource->GetDomain());
}
labels.push_back(str);
tooltips.push_back(tooltip);
}
labels.push_back(str);
tooltips.push_back(tooltip);
+ helptexts.push_back(helptext);
+ helptextSpecified.push_back(hasHelptext);
return NULL;
}
return NULL;
}