[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-accessibility
Subject:    [Kde-accessibility] making fallback access keys configurable
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2006-02-27 22:00:02
Message-ID: 200602271500.03532.aseigo () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


hi all...

i'm sure you've hit CTRL in konqi and seen the billion access keys popup up 
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 
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 world 
of kde much as we do with slow keys, etc ....

-- 
Aaron J. Seigo
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)

["fallback_accesskeys_die_die_die.diff" (text/x-diff)]

Index: khtml_settings.cc
===================================================================
--- 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;
 
     // the virtual global "domain"
     KPerDomainSettings global;
@@ -316,6 +317,7 @@
   if (reset || config->hasGroup("Access Keys")) {
       config->setGroup( "Access Keys" );
       d->m_accessKeysEnabled = config->readBoolEntry( "Enabled", true );
+      d->m_autogenerateAccessKeys = config->readBoolEntry( "Autogenerate", false );
   }
 
   if (reset || config->hasGroup("Filter Settings"))
@@ -708,6 +710,11 @@
     return d->m_accessKeysEnabled;
 }
 
+bool KHTMLSettings::autogenerateAccessKeys() const
+{
+    return d->m_autogenerateAccessKeys;
+}
+
 bool KHTMLSettings::isAdFilterEnabled() const
 {
     return d->m_adFilterEnabled;
Index: khtml_settings.h
===================================================================
--- khtml_settings.h	(revision 510324)
+++ khtml_settings.h	(working copy)
@@ -178,6 +178,7 @@
 
     // Access Keys
     bool accessKeysEnabled() const;
+    bool autogenerateAccessKeys() const;
 
     KJSWindowOpenPolicy windowOpenPolicy( const QString& hostname = QString::null ) \
                const;
     KJSWindowMovePolicy windowMovePolicy( const QString& hostname = QString::null ) \
                const;
Index: khtmlview.cpp
===================================================================
--- khtmlview.cpp	(revision 510324)
+++ khtmlview.cpp	(working copy)
@@ -261,6 +261,7 @@
         // We ref/deref to ensure defaultHTMLSettings is available
         KHTMLFactory::ref();
         accessKeysEnabled = \
KHTMLFactory::defaultHTMLSettings()->accessKeysEnabled(); +        \
accessKeysUseFallbacks = \
KHTMLFactory::defaultHTMLSettings()->autogenerateAccessKeys();  \
KHTMLFactory::deref();  
         emitCompletedAfterRepaint = 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 );
-    displayAccessKeys( NULL, this, taken, true );
+
+    if (d->accessKeysUseFallbacks)
+    {
+        displayAccessKeys( NULL, this, taken, true );
+    }
 }
 
 void KHTMLView::displayAccessKeys( KHTMLView* caller, KHTMLView* origview, \
QValueVector< QChar >& taken, bool use_fallbacks )


[Attachment #8 (application/pgp-signature)]

_______________________________________________
kde-accessibility mailing list
kde-accessibility@kde.org
https://mail.kde.org/mailman/listinfo/kde-accessibility


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic