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

List:       kde-core-devel
Subject:    Re: kio&kcontrol patch against hardcoded subdir paths
From:       Waldo Bastian <bastian () kde ! org>
Date:       2000-09-05 0:48:34
[Download RAW message or body]

On Mon, 04 Sep 2000, David Faure wrote:
> > kcontrol looks for its items in "Settings/". But if you use the menu
> editor to move that as a subdir of something else, or if you work
> for a distribution that likes things named another way :), then hardcoding
> a relative path looks no good at all.
>
> The attached patch introduces a new notion: the one of base group.
>
> A key in the .directory is added in the config file (X-KDE-BaseGroup),
> so that it gets moved with the directory. KServiceGroup provides a method
> for finding the group.
>
> Used by kcontrol for the Settings group, and by kscreensaver for the
> System/ScreenSavers group.

I don't like the use of magic numbers for stuff like this why not use a 
string and give it a names like "settings" and "screensavers".

The other thing that I don't like about it is that you do a linear search for 
these items. If you add an index for "basegroups" you can find them much 
faster.

Cheers,
Waldo
-- 
KDE/Linux, Leading the Desktop Revolution.

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

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