New patch for selecting random K Screensavers ...

Stephen Anthony stephena at
Tue Jan 14 17:10:24 GMT 2003

Just to reiterate, I've included the original email I sent on the subject:

This patch is against kdebase cvs (as of December 31), and concerns the
handling of random screensavers in KDE.  The idea was inspired by the
interface to xscreensaver.  Now, you no longer have to physically move
*.desktop screensaver entries from certain directories to disable them. 
Just deselect them in the GUI, and they are no longer considered.

Basically, what it does is move the ability to select a random screensaver
away from the krandom.kss saver, and into the actual KDE screensaver core
logic (specifically, kdebase/kdesktop/lock/

My initial reason for doing this is that I wanted to select a random
screensaver from a sublist of those available.  Previously, when the
random screensaver was selected, it picked a random saver from among
*all* savers in the system.  I wanted to have the random saver be from a
certain specified list, but configurable from the main saver dialog (and
not the krandom.kss dialog).

I've made changes to the kdebase/kcontrol/screensaver/scrnsave.cpp class
which allows one to select from the following modes:

1)  Only one screensaver (this is exactly how it works now).

2)  A random saver.  If this is selected, then the list of savers will
have checkboxes attached to them.  You select which screensavers that you
want by checking the boxes.  Then, when the saver starts (or is locked by
the user), it picks a random saver *from that list*.

Two other things that should be done are:

1)  The krandom.kss saver is no longer needed, and leaving it there could
actually confuse users.  It should be removed.

2)  The documentation will need to be updated.  There is a passage in it
concerning removing savers from the system (presumably to get around the
limitation of the current random handling) which should be updated.

I hope you will consider this patch.  If you have any questions, or if
you're not the right person I should be talking to, I'd appreciate a

This new patch is against CVS as of Jan. 14.  It also adds a QWhatsThis 
description to the mode combo box.

To Neil Stevens, who included the following message:

On Tuesday December 31, 2002 10:16, Stephen Anthony wrote:
> 1)  The krandom.kss saver is no longer needed, and leaving it there
> could actually confuse users.  It should be removed.

Can you add to your patch a kconf_update file that converts users'
configurations from using krandom.css to using your replacement?  This
would keep the KDE 3.2 upgrade non-destructive.

Neil, I don't think that there is a way to convert non-destructively.  For 
example, this new code adds functionality that wasn't there before.  How 
do you upgrade to that?

If a kconf_update file is indeed needed, I'd appreciate some info on how 
to write one, as this is my first KDE patch.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: screensaver_random_kdebase-cvs.diff
Type: text/x-diff
Size: 22381 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list