+// ----------------------------------------------------------------------------
+// static function for translating menu labels
+// ----------------------------------------------------------------------------
+
+static wxString TextToLabel(const wxString& rTitle)
+{
+ wxString Title;
+ const wxChar *pc;
+ for (pc = rTitle; *pc != wxT('\0'); pc++ )
+ {
+ if (*pc == wxT('&') )
+ {
+ if (*(pc+1) == wxT('&'))
+ {
+ pc++;
+ Title << wxT('&');
+ }
+ else
+ Title << wxT('~');
+ }
+// else if (*pc == wxT('/'))
+// {
+// Title << wxT('\\');
+// }
+ else
+ {
+ if ( *pc == wxT('~') )
+ {
+ // tildes must be doubled to prevent them from being
+ // interpreted as accelerator character prefix by PM ???
+ Title << *pc;
+ }
+ Title << *pc;
+ }
+ }
+ return Title;
+}
+