avoid translating the /qt/XIMInputStyle options when saving into config

Also use "On The Spot" as the default when the setting in the config is
incorrect.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 34587584ab)
r14.1.x
Alexander Golubev 9 months ago committed by Slávek Banko
parent 53a1dfa82b
commit 7b575b58e5
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -1112,15 +1112,15 @@ bool TQApplication::x11_apply_settings()
if (qt_xim_preferred_style == 0) {
TQString ximInputStyle =
settings.readEntry( "/qt/XIMInputStyle",
TQObject::trUtf8( "On The Spot" ) ).lower();
if ( ximInputStyle == "on the spot" )
qt_xim_preferred_style = XIMPreeditCallbacks | XIMStatusNothing;
else if ( ximInputStyle == "over the spot" )
TQString::fromLatin1( "On The Spot" ) ).lower();
if ( ximInputStyle == "over the spot" )
qt_xim_preferred_style = XIMPreeditPosition | XIMStatusNothing;
else if ( ximInputStyle == "off the spot" )
qt_xim_preferred_style = XIMPreeditArea | XIMStatusArea;
else if ( ximInputStyle == "root" )
qt_xim_preferred_style = XIMPreeditNothing | XIMStatusNothing;
else // ximInputStyle == "on the spot" or others
qt_xim_preferred_style = XIMPreeditCallbacks | XIMStatusNothing;
}
#endif

@ -376,7 +376,8 @@ MainWindow::MainWindow()
rtlExtensions->setChecked( settings.readBoolEntry( "/qt/useRtlExtensions", FALSE ) );
#if defined(TQ_WS_X11)
inputStyle->setCurrentText( settings.readEntry( "/qt/XIMInputStyle", trUtf8( "On The Spot" ) ) );
inputStyle->setCurrentText( trUtf8(
settings.readEntry( "/qt/XIMInputStyle", TQString::fromLatin1( "On The Spot" ) ) ) );
#else
inputStyle->hide();
inputStyleLabel->hide();
@ -517,7 +518,7 @@ void MainWindow::fileSave()
str = "Off The Spot";
else if ( style == trUtf8( "Root" ) )
str = "Root";
settings.writeEntry( "/qt/XIMInputStyle", inputStyle->currentText() );
settings.writeEntry( "/qt/XIMInputStyle", str );
#if !defined(TQT_NO_IM_EXTENSIONS)
TQString imSwitcher = settings.readEntry("/qt/DefaultInputMethodSwitcher", "imsw-multi");

Loading…
Cancel
Save