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

List:       kde-core-devel
Subject:    Re: Bug#16955: CTRL-A should not be 'select all' when in text fields
From:       Waldo Bastian <bastian () kde ! org>
Date:       2000-12-13 5:47:58
[Download RAW message or body]

On Tuesday 12 December 2000 14:20, Carsten Pfeiffer wrote:
> On Tue, Dec 12, 2000 at 12:11:06PM -0800, Waldo Bastian wrote:
> > You can change the key-binding for select-all in the control center after
> > which Ctrl-A will work the same as <Home>.
>
> you can't deactivate "Select all" tho. You _have_ to assign another key to
> it, to make "begin of line" work.

It seems that the configuration of keys is broken, selecting "No Key" 
effectively results in the default key being selected.

The following patch should fix that, please review.

Cheers,
Waldo
["kstdaccel.diff" (text/plain)]

Index: kstdaccel.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kstdaccel.cpp,v
retrieving revision 1.22
diff -u -r1.22 kstdaccel.cpp
--- kstdaccel.cpp	2000/12/04 11:03:59	1.22
+++ kstdaccel.cpp	2000/12/13 05:44:40
@@ -27,9 +27,12 @@
 uint KStdAccel::key(StdAccel id)
 {
     KConfigGroupSaver saver(KGlobal::config(), "Keys");
-    QString s = saver.config()->readEntry(action(id));
-    int v = KAccel::stringToKey(s);
-    return v ? v : defaultKey(id);
+    QString a = action(id);
+    if (!saver.config()->hasKey(a))
+       return defaultKey(id);
+    
+    QString s = saver.config()->readEntry(a);
+    return KAccel::stringToKey(s);
 }
 
 bool KStdAccel::isEqual(QKeyEvent* ev, int skey)


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

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