[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: [PATCH] kdeui/dialogs/kmessagebox.cpp
From: "=?UTF-8?Q?Rafael_Fern=C3=A1ndez_L=C3=B3pez?=" <ereslibre () gmail ! com>
Date: 2007-08-25 19:27:29
Message-ID: 93f85fee0708251227l70389c18kf9b5ef8e8a6c2c92 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
[Attachment #4 (text/plain)]
Hi,
I would like if this is OK to commit. I wonder if this is internally done by
Qt if it is compiled with RIGHT_TO_LEFT symbol.
I also wonder how this works on distributions. They always ship Qt compiled
with LEFT_TO_RIGHT so we have to check always layoutDirection() ?
For keeping quality on KDE, if the case is that Qt is always shipped
compiled with left to right support and we need to check layoutDirection(),
I really think we should consider take a look on how things are for RTL
languages. This "fix" is because KMessageBox is called from KPluginSelector,
and I noticed that when it was shown the layout direction wasn't respected
(I forced it on KPluginSelector to RTL for testing purposes).
Bye and thanks,
Rafael Fernández López.
[Attachment #5 (text/html)]
Hi,<br><br>I would like if this is OK to commit. I wonder if this is internally done \
by Qt if it is compiled with RIGHT_TO_LEFT symbol.<br><br>I also wonder how this \
works on distributions. They always ship Qt compiled with LEFT_TO_RIGHT so we have to \
check always layoutDirection() ? <br clear="all"><br>For keeping quality on KDE, if \
the case is that Qt is always shipped compiled with left to right support and we need \
to check layoutDirection(), I really think we should consider take a look on how \
things are for RTL languages. This "fix" is because KMessageBox is called \
from KPluginSelector, and I noticed that when it was shown the layout direction \
wasn't respected (I forced it on KPluginSelector to RTL for testing purposes). \
<br><br><br>Bye and thanks,<br>Rafael Fernández López.
["kdeui-dialogs.diff" (text/x-diff)]
Index: kdeui/dialogs/kmessagebox.cpp
===================================================================
--- kdeui/dialogs/kmessagebox.cpp (revisión: 703914)
+++ kdeui/dialogs/kmessagebox.cpp (copia de trabajo)
@@ -415,6 +415,9 @@
QWidget* parent = QWidget::find( parent_id );
KDialog *dialog = new KDialog(parent, Qt::Dialog);
+ if (parent) {
+ dialog->setLayoutDirection(parent->layoutDirection());
+ }
dialog->setCaption( caption.isEmpty() ? i18n("Question") : caption );
dialog->setButtons( KDialog::Yes | KDialog::No );
dialog->setObjectName( "questionYesNo" );
@@ -566,6 +569,9 @@
QWidget* parent = QWidget::find( parent_id );
KDialog *dialog = new KDialog(parent, Qt::Dialog);
+ if (parent) {
+ dialog->setLayoutDirection(parent->layoutDirection());
+ }
dialog->setCaption( caption.isEmpty() ? i18n("Warning") : caption );
dialog->setButtons( KDialog::Yes | KDialog::No );
dialog->setObjectName( "warningYesNoList" );
@@ -645,6 +651,9 @@
QWidget* parent = QWidget::find( parent_id );
KDialog *dialog = new KDialog(parent, Qt::Dialog);
+ if (parent) {
+ dialog->setLayoutDirection(parent->layoutDirection());
+ }
dialog->setCaption( caption.isEmpty() ? i18n("Warning") : caption );
dialog->setButtons( KDialog::Yes | KDialog::No );
dialog->setObjectName( "warningYesNo" );
@@ -730,6 +739,9 @@
QWidget* parent = QWidget::find( parent_id );
KDialog *dialog = new KDialog(parent, Qt::Dialog);
+ if (parent) {
+ dialog->setLayoutDirection(parent->layoutDirection());
+ }
dialog->setCaption( caption.isEmpty() ? i18n("Warning") : caption );
dialog->setButtons( KDialog::Yes | KDialog::No | KDialog::Cancel );
dialog->setObjectName( "warningYesNoCancel" );
@@ -790,6 +802,9 @@
{
QWidget* parent = QWidget::find( parent_id );
KDialog *dialog = new KDialog(parent, Qt::Dialog);
+ if (parent) {
+ dialog->setLayoutDirection(parent->layoutDirection());
+ }
dialog->setCaption( caption.isEmpty() ? i18n("Error") : caption );
dialog->setButtons( KDialog::Yes );
dialog->setObjectName( "error" );
@@ -954,6 +969,9 @@
QWidget* parent = QWidget::find( parent_id );
KDialog *dialog = new KDialog(parent, Qt::Dialog);
+ if (parent) {
+ dialog->setLayoutDirection(parent->layoutDirection());
+ }
dialog->setCaption( caption.isEmpty() ? i18n("Information") : caption );
dialog->setButtons( KDialog::Yes );
dialog->setObjectName( "information" );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic