}
else
{
+#if __WXGTK12__
if ( *pc == _T('_') )
{
// underscores must be doubled to prevent them from being
// interpreted as accelerator character prefix by GTK
str << *pc;
}
+#endif // GTK+ 1.2
str << *pc;
}
{
#if (GTK_MINOR_VERSION > 0)
m_text << _T('_');
- } else
- if (*pc == _T('/')) /* we have to filter out slashes ... */
+ }
+ else if ( *pc == _T('_') ) // escape underscores
+ {
+ m_text << _T("__");
+ }
+ else if (*pc == _T('/')) /* we have to filter out slashes ... */
{
m_text << _T('\\'); /* ... and replace them with back slashes */
#endif
wxString s = _T("<main>/");
for ( const wxChar *pc = text; *pc != _T('\0'); pc++ )
{
- if (*pc == _T('_')) pc++; /* skip it */
+ while (*pc == _T('_')) pc++; /* skip it */
s << *pc;
}