[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: KControl admin mode flexibility (RFC)
From: Michael Goffioul <goffioul () imec ! be>
Date: 2001-11-05 15:01:50
[Download RAW message or body]
Hi,
Following a small thread about the "non-flexibility" of the administrator
mode of kcontrol, which sometimes lead to inconsistencies
(http://lists.kde.org/?t=100452455200003&w=2&r=1), and after loogin a
little bit at KControl code, I had an idea on how to make this a little
bit more flexible.
Basically, the idea would be to add an item "Administrator" in the list
of available buttons in KCModule API, and to show the button either if
"run_as_root" is true or if "b" includes KCModule::Administrator (see
/kdebase/kcontrol/kcontrol/proxywidget.cpp). Second, to add a
"setAdminMessage" in KCModule API to be able to customize the message.
RootInfoWidget would then use it if available.
So you can imagine 2 situations:
1) a real root-only module (like kcmclock): like before, you simply have
X-KDE-RootOnly=true in desktop file
2) a module that can be run as root or not:
- if you want a message to appear, add X-KDE-RootOnly=true in desktop
file and set a customize message
- if you don't want a message to appear (for example if you already
put somewhere in your module that the user may use the admin button
to switch), then don't put anything in your desktop file, but add
the Administrator button in the constructor of KCModule.
It's probably not prefect, but I think this could make everybody happy
(at least me, and maybe the developer of kfontinst).
BTW, I volonteer to do it if needed.
Bye.
Michael.
--
------------------------------------------------------------------
Michael Goffioul IMEC-DESICS-MIRA
e-mail: goffioul@imec.be (Mixed-Signal and RF Applications)
Tel: +32/16/28-8510 Kapeldreef, 75
Fax: +32/16/28-1515 3001 HEVERLEE, BELGIUM
------------------------------------------------------------------
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic