[Kde-kiosk] Making text completion options immutable

Chris Howells kde-kiosk@mail.kde.org
Fri, 14 Feb 2003 17:50:47 +0000


--Boundary-00=_3xST+rDEsmxKKpu
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Description: clearsigned data
Content-Disposition: inline

=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

On Sunday 09 February 2003 23:04, Bill Kendrick wrote:
> This caused the default mode to be "None", which is what I want.
> However, if I right-click the Location: field, the
> "Text Completion" submenu is still there in the pop-up menu,
> and I can still change it from "None" to something else.

The attached patch for kdelibs enables this by adding a:

lineedit_text_completion key to [KDE Action Restrictions]

Waldo, is it OK to commit this to HEAD? If so, can it also be comitted to=20
3_1_BRANCH?

=2D --=20
Cheers, Chris Howells -- chris@chrishowells.co.uk, howells@kde.org
Web: http://chrishowells.co.uk, PGP key: http://chrishowells.co.uk/pgp.txt
KDE: http://www.koffice.org, http://printing.kde.org, http://usability.kde.=
org

=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE+TSx3F8Iu1zN5WiwRAlnCAJ9NZX/UmgMGtFh1nPQqIeTUG7KQMwCeNwIR
RI/n0ErodHS9JYqO1/mdHI8=3D
=3DouR/
=2D----END PGP SIGNATURE-----

--Boundary-00=_3xST+rDEsmxKKpu
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="kdelibs.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="kdelibs.patch"

Index: klineedit.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeui/klineedit.cpp,v
retrieving revision 1.155
diff -u -3 -p -r1.155 klineedit.cpp
--- klineedit.cpp	8 Jan 2003 23:24:16 -0000	1.155
+++ klineedit.cpp	14 Feb 2003 17:47:01 -0000
@@ -39,6 +39,7 @@
 #include <kurl.h>
 #include <kurldrag.h>
 #include <kiconloader.h>
+#include <kapplication.h>
 
 #include "klineedit.h"
 #include "klineedit.moc"
@@ -761,7 +762,7 @@ QPopupMenu *KLineEdit::createPopupMenu()
     // If a completion object is present and the input
     // widget is not read-only, show the Text Completion
     // menu item.
-    if ( compObj() && !isReadOnly() )
+    if ( compObj() && !isReadOnly() && kapp->authorize("lineedit_text_completion"))
     {
         QPopupMenu *subMenu = new QPopupMenu( popup );
         connect( subMenu, SIGNAL( activated( int ) ),

--Boundary-00=_3xST+rDEsmxKKpu--