Kaydet (Commit) 2233aa52 authored tarafından Thomas Arnhold's avatar Thomas Arnhold

keysymnames: get rid of some insanity

getKeysymReplacementName() returned a translated keyname, now
XKeysymToString() is called directly. This change had no negative
effect to me. I tried it with a fixed string as return value for
getKeysymReplacementName() on a german interface. INSRT is still
translated to EINFG as this is done by po files.
üst f3c1af57
...@@ -470,17 +470,6 @@ public: ...@@ -470,17 +470,6 @@ public:
void SetupInput( SalI18N_InputMethod *pInputMethod ); void SetupInput( SalI18N_InputMethod *pInputMethod );
}; };
/*----------------------------------------------------------
keep track of correct size of the initial window
*/
// get foreign key names
namespace vcl_sal {
rtl::OUString getKeysymReplacementName(
const char* pKeyboard,
KeySym nSymbol );
}
#endif // _SV_SALDISP_HXX #endif // _SV_SALDISP_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -954,16 +954,13 @@ rtl::OUString SalDisplay::GetKeyNameFromKeySym( KeySym nKeySym ) const ...@@ -954,16 +954,13 @@ rtl::OUString SalDisplay::GetKeyNameFromKeySym( KeySym nKeySym ) const
aRet = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "???" ) ); aRet = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "???" ) );
else else
{ {
aRet = ::vcl_sal::getKeysymReplacementName( const_cast<SalDisplay*>(this)->GetKeyboardName(), nKeySym ); const char *pString = XKeysymToString( nKeySym );
if( aRet.isEmpty() ) int n = strlen( pString );
{
const char *pString = XKeysymToString( nKeySym ); if( n > 2 && pString[n-2] == '_' )
int n = strlen( pString ); aRet = rtl::OUString( pString, n-2, RTL_TEXTENCODING_ISO_8859_1 );
if( n > 2 && pString[n-2] == '_' ) else
aRet = rtl::OUString( pString, n-2, RTL_TEXTENCODING_ISO_8859_1 ); aRet = rtl::OUString( pString, n, RTL_TEXTENCODING_ISO_8859_1 );
else
aRet = rtl::OUString( pString, n, RTL_TEXTENCODING_ISO_8859_1 );
}
} }
} }
return aRet; return aRet;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment