From kde-core-devel Tue Sep 05 00:48:34 2000 From: Waldo Bastian Date: Tue, 05 Sep 2000 00:48:34 +0000 To: kde-core-devel Subject: Re: kio&kcontrol patch against hardcoded subdir paths X-MARC-Message: https://marc.info/?l=kde-core-devel&m=96811526114349 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.