Final touches to the BiDirection disabling patch as requested by Robert. I am still missing a global shortcut, and when I find how to code this properly I will commit

(lazy lazy...). 

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=795807
wilder-portage
Diego Iastrubni 18 years ago
parent 300defac4a
commit f04dccea56
  1. 2
      src/EditProfileDialog.ui
  2. 1
      src/Profile.cpp
  3. 7
      src/TerminalDisplay.cpp

@ -951,7 +951,7 @@
<string>Enable BiDirectional display on terminals (valid for Arabic, Farsi or Hebrew only)</string>
</property>
<property name="text" >
<string>Enable BiDi rendering </string>
<string>Enable Bi-Directional rendering </string>
</property>
</widget>
</item>

@ -165,6 +165,7 @@ FallbackProfile::FallbackProfile()
setProperty(BlinkingTextEnabled,true);
setProperty(BlinkingCursorEnabled,false);
setProperty(BidiRenderingEnabled,false);
setProperty(CursorShape,BlockCursor);
setProperty(UseCustomCursorColor,false);
setProperty(CustomCursorColor,Qt::black);

@ -78,6 +78,10 @@ using namespace Konsole;
bool TerminalDisplay::_antialiasText = true;
bool TerminalDisplay::HAVE_TRANSPARENCY = false;
// we use this to force QPainter to display text in LTR mode
// more information can be found in: http://unicode.org/reports/tr9/
const QChar LTR_OVERRIDE_CHAR( 0x202D );
/* ------------------------------------------------------------------------- */
/* */
/* Colors */
@ -676,10 +680,11 @@ void TerminalDisplay::drawCharacters(QPainter& painter,
// the application's default layout direction to be used instead of
// the widget-specific layout direction, which should always be
// Qt::LeftToRight for this widget
// This was discussed in: http://lists.kde.org/?t=120552223600002&r=1&w=2
if (_bidiEnabled)
painter.drawText(rect,0,text);
else
painter.drawText(rect,0,QChar(0x202D)+text);
painter.drawText(rect,0,LTR_OVERRIDE_CHAR+text);
}
}

Loading…
Cancel
Save