KDE/kdebase/workspace/plasma/containments/desktop
Jason Stubbs
jasonbstubbs at gmail.com
Sun Jan 6 02:29:11 CET 2008
On Sunday 06 January 2008 04:51:37 JST, Aaron J. Seigo wrote:
> On Saturday 05 January 2008, Jason Stubbs wrote:
> > Save the config after setting the default wallpaper so it is available
> > for
> >
> > --- trunk/KDE/kdebase/workspace/plasma/containments/desktop/desktop.cpp
> > #757554:757555 @@ -248,6 +248,7 @@
> > }
> >
> > kDebug() << "Setting wallpaper to default" << m_wallpaperPath;
> > + emit configNeedsSaving();
>
> this part probably do what you think it does. this is just about flushing
> to disk. if setting the default wallpaper doesn't set the value in config()
> then there's a problem, otherwise this won't do anything.
You're right, it's not doing anything. Should I remove it for the time being?
The intention was for the config dialog to pick up the default wallpaper that
has been chosen, but it handles the case that one hasn't been chosen yet
anyway.
> what's needed here is:
>
> KConfigGroup cg = config();
> cg..writeEntry("wallpaper", m_wallpaperPath);
>
> as a side note: the code can not know *when* the flushing to disk caused by
> configNeedsSaving is going to happen so code must not be written in a way
> that holds any assumptions about that. right now with this code if the user
> were to configure their desktop within the first 2 minutes of plasma this
> call will not have actually done anything yet.
Yep, the settings dialog should probably be reading the current configuration
from DefaultDesktop rather than communicating via the config file. That would
eliminate the above issue and also mean that defaults don't need to be stored
in two places as well. Slightly bigger patch though...
--
Jason Stubbs
More information about the Panel-devel
mailing list