Commit f04dccea authored by Diego Iastrubni's avatar Diego Iastrubni
Browse files

Final touches to the BiDirection disabling patch as requested by Robert. I am...

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
parent 300defac
...@@ -951,7 +951,7 @@ ...@@ -951,7 +951,7 @@
<string>Enable BiDirectional display on terminals (valid for Arabic, Farsi or Hebrew only)</string> <string>Enable BiDirectional display on terminals (valid for Arabic, Farsi or Hebrew only)</string>
</property> </property>
<property name="text" > <property name="text" >
<string>Enable BiDi rendering </string> <string>Enable Bi-Directional rendering </string>
</property> </property>
</widget> </widget>
</item> </item>
......
...@@ -165,6 +165,7 @@ FallbackProfile::FallbackProfile() ...@@ -165,6 +165,7 @@ FallbackProfile::FallbackProfile()
setProperty(BlinkingTextEnabled,true); setProperty(BlinkingTextEnabled,true);
setProperty(BlinkingCursorEnabled,false); setProperty(BlinkingCursorEnabled,false);
setProperty(BidiRenderingEnabled,false);
setProperty(CursorShape,BlockCursor); setProperty(CursorShape,BlockCursor);
setProperty(UseCustomCursorColor,false); setProperty(UseCustomCursorColor,false);
setProperty(CustomCursorColor,Qt::black); setProperty(CustomCursorColor,Qt::black);
......
...@@ -78,6 +78,10 @@ using namespace Konsole; ...@@ -78,6 +78,10 @@ using namespace Konsole;
bool TerminalDisplay::_antialiasText = true; bool TerminalDisplay::_antialiasText = true;
bool TerminalDisplay::HAVE_TRANSPARENCY = false; 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 */ /* Colors */
...@@ -676,10 +680,11 @@ void TerminalDisplay::drawCharacters(QPainter& painter, ...@@ -676,10 +680,11 @@ void TerminalDisplay::drawCharacters(QPainter& painter,
// the application's default layout direction to be used instead of // the application's default layout direction to be used instead of
// the widget-specific layout direction, which should always be // the widget-specific layout direction, which should always be
// Qt::LeftToRight for this widget // Qt::LeftToRight for this widget
// This was discussed in: http://lists.kde.org/?t=120552223600002&r=1&w=2
if (_bidiEnabled) if (_bidiEnabled)
painter.drawText(rect,0,text); painter.drawText(rect,0,text);
else else
painter.drawText(rect,0,QChar(0x202D)+text); painter.drawText(rect,0,LTR_OVERRIDE_CHAR+text);
} }
} }
......
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