Wallpaper plugins in default rendering mode

Will Stephenson wstephenson at kde.org
Fri Jul 30 07:57:26 CEST 2010


I've been looking at a bug in the Image plugin where dropping an image file
on the desktop when the Image wallpaper plugin is not in use causes Image to
start up in Slideshow mode.  This is because Containment tries to set the
default rendering mode using an empty string, whereas Image's logic falls
through to Slideshow if the mode is empty.

The documentation for
Plasma::Wallpaper::setRenderingMode( const QString & mode) says that /mode/
should be "One of the modes supported by the plugin, or an empty string for
the default mode".

Should Plasma::Wallpaper::setRenderingMode() discover
the wallpaper's default mode and set it explicitly, if an empty string is
passed?  Or should each wallpaper plugin's logic be written to treat an
empty renderingMode().name() as its default
mode?

Bug:
https://bugs.kde.org/show_bug.cgi?id=245606

Monkey patch to
Image:
https://build.opensuse.org/package/view_file?file=bko245606_no_slides
how_for_dnd_image_wallpaper.diff&package=kdebase4-workspace&project=KDE:Distr
o:Stable

I think it would be simpler for wallpaper plugin writers if they
did not have to consider this case.  What's the correct reading of the
API?

Will




More information about the Plasma-devel mailing list