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

List:       kde-devel
Subject:    Hosts kcm module
From:       Mike Dransfield <mike () blueroot ! co ! uk>
Date:       2008-05-27 14:16:16
Message-ID: 483C17B0.9090903 () blueroot ! co ! uk
[Download RAW message or body]

Hi

I am trying to learn a bit of C++ and Q, so I wrote a small KCM module 
for editing and viewing the hosts file.

It is mostly working, there are a couple of UI problems that I want to 
solve first.  What is the procedure to get this into the main tree 
(obviously once it is unfrozen and if it is acceptable)?

The KCM module documents say that there is a .desktop file entry called 
X-KDE-RootOnly which will disable the entire module if it is not run as 
root.  I am looking for something a little more fine-grained because I 
want the user to be able to view the hosts but not change them unless 
they are root.  I think at the moment it would disable my combo box so 
they could not view all the different hosts.  Are there any plans to 
improve this feature or will I need to code that part individually?  I 
was thinking of something like a isRoot() method for KCModule, but there 
are situations where a user may not be root but will be able to write to 
the hosts file so we may need something more complicated where the 
module can set if the user has root abilities and what they can or 
cannot do (Maybe a signal sent when the user changes).

I am looking for comments on the coding or anything else relating to 
this.  I know that the coding style is not exactly KDE compliant but I 
will change that soon.  If there is a better doc than this one, please 
can someone point me to it 
http://techbase.kde.org/Policies/Kdelibs_Coding_Style I do not really 
understand the m_ naming convention that I see a lot.

Regards
Mike

["kcm-hosts-0.1.tar.gz" (application/gzip)]

>> 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