1 |
k_f 15/03/01 22:30:54 |
2 |
|
3 |
Added: pinentry-0.9.0-accessibility.patch |
4 |
Log: |
5 |
Fix for bug #541400 |
6 |
|
7 |
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0xFED5002857C1ABFA!) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-crypt/pinentry/files/pinentry-0.9.0-accessibility.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/pinentry/files/pinentry-0.9.0-accessibility.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/pinentry/files/pinentry-0.9.0-accessibility.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: pinentry-0.9.0-accessibility.patch |
16 |
=================================================================== |
17 |
diff --git a/qt4/main.cpp b/qt4/main.cpp |
18 |
index 106999e..b2a69f2 100644 |
19 |
--- a/qt4/main.cpp |
20 |
+++ b/qt4/main.cpp |
21 |
@@ -217,8 +217,9 @@ qt_cmd_handler (pinentry_t pe) |
22 |
for ( size_t i = 0 ; i < sizeof buttonLabels / sizeof *buttonLabels ; ++i ) |
23 |
if ( (buttons & buttonLabels[i].button) && !buttonLabels[i].label.isEmpty() ) { |
24 |
box.button( buttonLabels[i].button )->setText( buttonLabels[i].label ); |
25 |
+#ifndef QT_NO_ACCESSIBILITY |
26 |
box.button( buttonLabels[i].button )->setAccessibleDescription ( buttonLabels[i].label ); |
27 |
- |
28 |
+#endif |
29 |
} |
30 |
|
31 |
box.setIconPixmap( icon() ); |
32 |
diff --git a/qt4/pinentryconfirm.cpp b/qt4/pinentryconfirm.cpp |
33 |
index dfbd19f..6b3d545 100644 |
34 |
--- a/qt4/pinentryconfirm.cpp |
35 |
+++ b/qt4/pinentryconfirm.cpp |
36 |
@@ -30,8 +30,10 @@ PinentryConfirm::PinentryConfirm(Icon icon, int timeout, const QString &title, |
37 |
connect(_timer, SIGNAL(timeout()), this, SLOT(slotTimeout())); |
38 |
_timer->start(timeout*1000); |
39 |
} |
40 |
+#ifndef QT_NO_ACCESSIBILITY |
41 |
setAccessibleDescription (desc); |
42 |
setAccessibleName (title); |
43 |
+#endif |
44 |
raiseWindow (this); |
45 |
} |
46 |
|
47 |
diff --git a/qt4/pinentrydialog.cpp b/qt4/pinentrydialog.cpp |
48 |
index 3a6dacc..456f022 100644 |
49 |
--- a/qt4/pinentrydialog.cpp |
50 |
+++ b/qt4/pinentrydialog.cpp |
51 |
@@ -217,7 +217,9 @@ void PinEntryDialog::setDescription( const QString& txt ) |
52 |
{ |
53 |
_desc->setVisible( !txt.isEmpty() ); |
54 |
_desc->setText( txt ); |
55 |
+#ifndef QT_NO_ACCESSIBILITY |
56 |
_desc->setAccessibleDescription ( txt ); |
57 |
+#endif |
58 |
_icon->setPixmap( icon() ); |
59 |
setError( QString::null ); |
60 |
} |
61 |
@@ -231,7 +233,9 @@ void PinEntryDialog::setError( const QString& txt ) |
62 |
{ |
63 |
if( !txt.isNull() )_icon->setPixmap( icon( QStyle::SP_MessageBoxCritical ) ); |
64 |
_error->setText( txt ); |
65 |
+#ifndef QT_NO_ACCESSIBILITY |
66 |
_error->setAccessibleDescription ( txt ); |
67 |
+#endif |
68 |
_error->setVisible( !txt.isEmpty() ); |
69 |
} |
70 |
|
71 |
@@ -264,14 +268,18 @@ QString PinEntryDialog::prompt() const |
72 |
void PinEntryDialog::setOkText( const QString& txt ) |
73 |
{ |
74 |
_ok->setText( txt ); |
75 |
+#ifndef QT_NO_ACCESSIBILITY |
76 |
_ok->setAccessibleDescription ( txt ); |
77 |
+#endif |
78 |
_ok->setVisible( !txt.isEmpty() ); |
79 |
} |
80 |
|
81 |
void PinEntryDialog::setCancelText( const QString& txt ) |
82 |
{ |
83 |
_cancel->setText( txt ); |
84 |
+#ifndef QT_NO_ACCESSIBILITY |
85 |
_cancel->setAccessibleDescription ( txt ); |
86 |
+#endif |
87 |
_cancel->setVisible( !txt.isEmpty() ); |
88 |
} |
89 |
|
90 |
@@ -279,7 +287,9 @@ void PinEntryDialog::setQualityBar( const QString& txt ) |
91 |
{ |
92 |
if (_have_quality_bar) { |
93 |
_quality_bar_label->setText( txt ); |
94 |
+#ifndef QT_NO_ACCESSIBILITY |
95 |
_quality_bar_label->setAccessibleDescription ( txt ); |
96 |
+#endif |
97 |
} |
98 |
} |