Hi all,

I am attaching to this mail a patch which forces the combo box in the krunner 
window to be LTR even on RTL desktops. The motivation is that this window is 
mostly used for writing commands (english words). 

In KDE3 the combo boxes would detect the direction from the content (the text 
entered) but in KDE4 this does not happen, so the best hack we can do (until 
we get this fixed in KDElibs) is hack it to be LTR - less problems IMHO.

The patch is relative to kdebase/workspace/krunner/interfaces/default

- diego

PS: the review board is funky and I could not publish my code in there, it 
kept saying "There must be one reviewer before this review request can be 
published". I could not even view the diff properly (I kept getting errors). 
When I asked in the IRC channel Chany pointed my to 

http://chani.ccdevnet.org/plasma/
http://aseigo.blogspot.com/2008/02/post-review-plasma.html

But still, I am unsure what else is needed (python?) and the configuration is 
not clear. I am so sorry I cannot use this, but my dedicated time to KDE this 
week is over.... 
Index: interface.cpp
===================================================================
--- interface.cpp	(revision 904826)
+++ interface.cpp	(working copy)
@@ -119,6 +119,13 @@
     KLineEdit *lineEdit = new KLineEdit(m_searchTerm);
     QAction *focusEdit = new QAction(this);
     focusEdit->setShortcut(Qt::Key_F6);
+    
+    // in therory, the widget should detect the direction from the content
+    // but this is not available in Qt4.4/KDE 4.2, so the best default for this widget
+    // is LTR: as it's more or less a "command line interface"
+    // TODO remove this code when KLineEdit has automatic direction detection of the "paragraph"
+    m_searchTerm->setLayoutDirection( Qt::LeftToRight );
+    
     connect(focusEdit, SIGNAL(triggered(bool)), lineEdit, SLOT(setFocus()));
     addAction(focusEdit);
 
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to