From kde-accessibility Mon Feb 27 22:00:02 2006 From: "Aaron J. Seigo" Date: Mon, 27 Feb 2006 22:00:02 +0000 To: kde-accessibility Subject: [Kde-accessibility] making fallback access keys configurable Message-Id: <200602271500.03532.aseigo () kde ! org> X-MARC-Message: https://marc.info/?l=kde-accessibility&m=114122578630746 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0711795164==" --===============0711795164== Content-Type: multipart/signed; boundary="nextPart2074219.flp7D8PRuc"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart2074219.flp7D8PRuc Content-Type: multipart/mixed; boundary="Boundary-01=_jZ3AEho/ma8u2zW" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_jZ3AEho/ma8u2zW Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline hi all... i'm sure you've hit CTRL in konqi and seen the billion access keys popup up= =20 all over the page. better yet is when it happens in kmail ;) attached is a patch that disables fallback keys by default, but makes them= =20 configurable. i'd like to commit this for 3.5.2 as well as to trunk/ in future i think it would make sense to add this into the accessibility wo= rld=20 of kde much as we do with slow keys, etc .... =2D-=20 Aaron J. Seigo GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 =46ull time KDE developer sponsored by Trolltech (http://www.trolltech.com) --Boundary-01=_jZ3AEho/ma8u2zW Content-Type: text/x-diff; charset="us-ascii"; name="fallback_accesskeys_die_die_die.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="fallback_accesskeys_die_die_die.diff" Index: khtml_settings.cc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- khtml_settings.cc (revision 510324) +++ khtml_settings.cc (working copy) @@ -85,6 +85,7 @@ bool m_hideAdsEnabled : 1; bool m_jsPopupBlockerPassivePopup : 1; bool m_accessKeysEnabled : 1; + bool m_autogenerateAccessKeys : 1; =20 // the virtual global "domain" KPerDomainSettings global; @@ -316,6 +317,7 @@ if (reset || config->hasGroup("Access Keys")) { config->setGroup( "Access Keys" ); d->m_accessKeysEnabled =3D config->readBoolEntry( "Enabled", true ); + d->m_autogenerateAccessKeys =3D config->readBoolEntry( "Autogenerate= ", false ); } =20 if (reset || config->hasGroup("Filter Settings")) @@ -708,6 +710,11 @@ return d->m_accessKeysEnabled; } =20 +bool KHTMLSettings::autogenerateAccessKeys() const +{ + return d->m_autogenerateAccessKeys; +} + bool KHTMLSettings::isAdFilterEnabled() const { return d->m_adFilterEnabled; Index: khtml_settings.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- khtml_settings.h (revision 510324) +++ khtml_settings.h (working copy) @@ -178,6 +178,7 @@ =20 // Access Keys bool accessKeysEnabled() const; + bool autogenerateAccessKeys() const; =20 KJSWindowOpenPolicy windowOpenPolicy( const QString& hostname =3D QStr= ing::null ) const; KJSWindowMovePolicy windowMovePolicy( const QString& hostname =3D QStr= ing::null ) const; Index: khtmlview.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- khtmlview.cpp (revision 510324) +++ khtmlview.cpp (working copy) @@ -261,6 +261,7 @@ // We ref/deref to ensure defaultHTMLSettings is available KHTMLFactory::ref(); accessKeysEnabled =3D KHTMLFactory::defaultHTMLSettings()->accessK= eysEnabled(); + accessKeysUseFallbacks =3D KHTMLFactory::defaultHTMLSettings()->au= togenerateAccessKeys(); KHTMLFactory::deref(); =20 emitCompletedAfterRepaint =3D CSNone; @@ -384,6 +385,7 @@ bool typeAheadActivated; #endif // KHTML_NO_TYPE_AHEAD_FIND bool accessKeysEnabled; + bool accessKeysUseFallbacks; bool accessKeysActivated; bool accessKeysPreActivate; CompletedState emitCompletedAfterRepaint; @@ -2180,7 +2182,11 @@ { QValueVector< QChar > taken; displayAccessKeys( NULL, this, taken, false ); =2D displayAccessKeys( NULL, this, taken, true ); + + if (d->accessKeysUseFallbacks) + { + displayAccessKeys( NULL, this, taken, true ); + } } =20 void KHTMLView::displayAccessKeys( KHTMLView* caller, KHTMLView* origview,= QValueVector< QChar >& taken, bool use_fallbacks ) --Boundary-01=_jZ3AEho/ma8u2zW-- --nextPart2074219.flp7D8PRuc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBEA3Zj1rcusafx20MRAmJmAKCAYcX7ivhaOpEfECxiwVJSAGSWEgCfc9to 83lmaFCQVisIobXkfhe5HyA= =/uLP -----END PGP SIGNATURE----- --nextPart2074219.flp7D8PRuc-- --===============0711795164== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kde-accessibility mailing list kde-accessibility@kde.org https://mail.kde.org/mailman/listinfo/kde-accessibility --===============0711795164==--