Re: Desktop Slideshow Settings

2010-12-08 Thread Aaron J. Seigo
On Tuesday, December 7, 2010, Steven Sroka wrote:
> In kdebase/workspace/libs/plasmagenericshell/backgrounddialog.cpp, what
> happens in BackgroundDialog::saveConfig() specifically?
> 
> In general, I know that the wallpaper/mouse settings are saved and the last
> 'if' statement forces the wallpaper to change. But, what does the code
> above the last 'if' statement *specifically* do?

saveConfig() does the following:

* determine what the names of the wallpaper and containment plugins are (first 
three lines)

* if the containment plugin is changing (e.g. desktop -> folderview) then 
create the new containment, swap it with the current one (that includes 
ensuring the mouse actions and wallpaper go with it)

* save the settings of the wallpaper configuration (d->wallpaper is an 
instance of the wallpaper plugin in the dialog, not in the containment)

* have the containment re-load the wallpaper settings by calling setWallpaper 
(which has that side effect)

* reset the modified state (and therefore the Apply button, etc)

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks


signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


RE: Desktop Slideshow Settings

2010-12-07 Thread Steven Sroka





In kdebase/workspace/libs/plasmagenericshell/backgrounddialog.cpp, what happens 
in BackgroundDialog::saveConfig() specifically?

In general, I know that the wallpaper/mouse settings are saved and the last 
'if' statement forces the wallpaper to change. But, what does the code above 
the last 'if' statement *specifically* do?


Steve


From: ase...@kde.org
To: plasma-devel@kde.org
Subject: Re: Desktop Slideshow Settings
Date: Sun, 5 Dec 2010 23:01:33 -0800

On Sunday, December 5, 2010, Steven Sroka wrote:
> add at the very beginning of BackgroundDialog::saveConfig(),if(
> !hasChanged() ) { return;}orif( hasChanged() ) { //the existing code that
> is run when a setting is changed.}
 
yes, that would work. it would still mean the wallpaper would reload if the 
layout type was changed (e.g. default dekstop -> folderview) or when the mouse 
actions are changed.
 
so while what you suggest would be an improvement (and i'd probably accept 
such a patch), it would be even nicer to track wallpaper changes independantly 
as well.
 
-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
 
KDE core developer sponsored by Qt Development Frameworks

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
  ___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Desktop Slideshow Settings

2010-12-05 Thread Aaron J. Seigo
On Sunday, December 5, 2010, Steven Sroka wrote:
> add at the very beginning of BackgroundDialog::saveConfig(),if(
> !hasChanged() ) { return;}orif( hasChanged() ) { //the existing code that
> is run when a setting is changed.}

yes, that would work. it would still mean the wallpaper would reload if the 
layout type was changed (e.g. default dekstop -> folderview) or when the mouse 
actions are changed.

so while what you suggest would be an improvement (and i'd probably accept 
such a patch), it would be even nicer to track wallpaper changes independantly 
as well.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks


signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


RE: Desktop Slideshow Settings

2010-12-05 Thread Steven Sroka

Excuse the messing message before from me, I should top post like this since 
Windows Live doesn't put arrows before each line of previous emails when 
replying to them. Even though its not recommended to top post ;)

From: steven.sr...@live.ca
To: plasma-devel@kde.org
Subject: RE: Desktop Slideshow Settings
Date: Mon, 6 Dec 2010 00:42:01 -0500








On Sunday, December 5, 2010, Steven Sroka wrote:
> I'm assuming the settingsChanged() signal is emitted twice, once by 'Apply'
> and once by 'OK'. Is there anyway to stop the signal from emitting from
> the 'OK' button if the settings aren't changed (because the 'Apply' button
> has already emitted the signal and done all the necessary work)?
 
yes. and now that i understand what you are trying to accomplish ... :)
 
the problem is in BackgroundDialog::saveConfig in 
kdebase/workspace/libs/plasmagenericshell/backgrounddialog.cpp
 
it is called when apply or ok is clicked and it unconditionally resets the 
wallpaper. it probably needs to track when the wallpaper settings actually 
change. right now it does this:
 
connect(wallpaperWidget, SIGNAL(modified(bool)), this, 
SLOT(settingsModified(bool)));
 
settingsModified is a generic "something's changed" handler; a new slot could 
be added that calls settingsModified, but which also tracks that value for the 
wallpaper itself and if no changes have been made to the wallpaper config, 
just not reset it.
---I
 see, now I know what to look for.I noticed that BackgroundDialog keeps track 
if there are changes made through BackgroundDialog::hasChanged()Would it be 
possible to add at the very beginning of BackgroundDialog::saveConfig(),if( 
!hasChanged() ) { return;}orif( hasChanged() ) { //the existing code that is 
run when a setting is changed.}

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel  
  ___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


RE: Desktop Slideshow Settings

2010-12-05 Thread Steven Sroka

On Sunday, December 5, 2010, Steven Sroka wrote:
> I'm assuming the settingsChanged() signal is emitted twice, once by 'Apply'
> and once by 'OK'. Is there anyway to stop the signal from emitting from
> the 'OK' button if the settings aren't changed (because the 'Apply' button
> has already emitted the signal and done all the necessary work)?
 
yes. and now that i understand what you are trying to accomplish ... :)
 
the problem is in BackgroundDialog::saveConfig in 
kdebase/workspace/libs/plasmagenericshell/backgrounddialog.cpp
 
it is called when apply or ok is clicked and it unconditionally resets the 
wallpaper. it probably needs to track when the wallpaper settings actually 
change. right now it does this:
 
connect(wallpaperWidget, SIGNAL(modified(bool)), this, 
SLOT(settingsModified(bool)));
 
settingsModified is a generic "something's changed" handler; a new slot could 
be added that calls settingsModified, but which also tracks that value for the 
wallpaper itself and if no changes have been made to the wallpaper config, 
just not reset it.
---I
 see, now I know what to look for.I noticed that BackgroundDialog keeps track 
if there are changes made through BackgroundDialog::hasChanged()Would it be 
possible to add at the very beginning of BackgroundDialog::saveConfig(),if( 
!hasChanged() ) { return;}orif( hasChanged() ) { //the existing code that is 
run when a setting is changed.}___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Desktop Slideshow Settings

2010-12-05 Thread Aaron J. Seigo
On Sunday, December 5, 2010, Steven Sroka wrote:
> I'm assuming the settingsChanged() signal is emitted twice, once by 'Apply'
> and once by 'OK'. Is there anyway to stop the signal from emitting from
> the 'OK' button if the settings aren't changed (because the 'Apply' button
> has already emitted the signal and done all the necessary work)?

and one other thing that's probably needed: the slideshow should probably not 
reset itself if the directory lists haven't changed from it already has been 
set to.

so this is probably two small fixes, one in libplasmagenericshell and one in 
the image wallpaper init()

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks


signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Desktop Slideshow Settings

2010-12-05 Thread Aaron J. Seigo
On Sunday, December 5, 2010, Steven Sroka wrote:
> I'm assuming the settingsChanged() signal is emitted twice, once by 'Apply'
> and once by 'OK'. Is there anyway to stop the signal from emitting from
> the 'OK' button if the settings aren't changed (because the 'Apply' button
> has already emitted the signal and done all the necessary work)?

yes. and now that i understand what you are trying to accomplish ... :)

the problem is in BackgroundDialog::saveConfig in 
kdebase/workspace/libs/plasmagenericshell/backgrounddialog.cpp

it is called when apply or ok is clicked and it unconditionally resets the 
wallpaper. it probably needs to track when the wallpaper settings actually 
change. right now it does this:

connect(wallpaperWidget, SIGNAL(modified(bool)), this, 
SLOT(settingsModified(bool)));

settingsModified is a generic "something's changed" handler; a new slot could 
be added that calls settingsModified, but which also tracks that value for the 
wallpaper itself and if no changes have been made to the wallpaper config, 
just not reset it.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks


signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


RE: Desktop Slideshow Settings

2010-12-05 Thread Steven Sroka
Sorry for the late reply, I just switched to KDE 4.6 Beta 1 and it took some 
time to get stable and fast enough to set up the development dependancies. I'm 
try to prevent the slideshow wallpaper from changing everytime a user clicks 
'OK' after clicking 'Apply'.

I'm assuming the settingsChanged() signal is emitted twice, once by 'Apply' and 
once by 'OK'. Is there anyway to stop the signal from emitting from the 'OK' 
button if the settings aren't changed (because the 'Apply' button has already 
emitted the signal and done all the necessary work)?


From: ase...@kde.org
To: plasma-devel@kde.org
Subject: Re: Desktop Slideshow Settings
Date: Mon, 29 Nov 2010 16:07:03 -0800

On Monday, November 29, 2010, Steven Sroka wrote:
> Pic of window and buttons attached. I think it is created in image.cpp
 
aha. the ok/apply/cancel buttons. (this is one time when a picture was only 
worth 5 words. ;)
 
those are handled automatically by KConfigDialog. when the settingsChanged 
signal is emitted, Apply becomes enabled. the state is reset after Apply is 
clicked. (this is actually covered in the Plasma::Wallpaper apidox, but 
sometimes that's more like a buried treasure than a useful learning tool.)
 
Cancel and Ok are always there.
 
assuming you are wanting to do something with Apply, what you are looking for 
is probably the Image::modified() slot in image.cpp. take a look at the things 
that connect to it / call it.
 
or are you trying to do someting else with the buttons in that area?
 
-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
 
KDE core developer sponsored by Qt Development Frameworks

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel  
  ___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Desktop Slideshow Settings

2010-11-29 Thread Aaron J. Seigo
On Monday, November 29, 2010, Steven Sroka wrote:
> Pic of window and buttons attached. I think it is created in image.cpp

aha. the ok/apply/cancel buttons. (this is one time when a picture was only 
worth 5 words. ;)

those are handled automatically by KConfigDialog. when the settingsChanged 
signal is emitted, Apply becomes enabled. the state is reset after Apply is 
clicked. (this is actually covered in the Plasma::Wallpaper apidox, but 
sometimes that's more like a buried treasure than a useful learning tool.)

Cancel and Ok are always there.

assuming you are wanting to do something with Apply, what you are looking for 
is probably the Image::modified() slot in image.cpp. take a look at the things 
that connect to it / call it.

or are you trying to do someting else with the buttons in that area?

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks


signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Desktop Slideshow Settings

2010-11-29 Thread Aaron J. Seigo
On Monday, November 29, 2010, Steven Sroka wrote:
> I'm trying to change some configurations with the KDE desktop sideshow, but
> I can't figure out where the code is to control the buttons on the window,

which buttons on which window?

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks


signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Desktop Slideshow Settings

2010-11-29 Thread Steven Sroka



I'm trying to change some configurations with the KDE desktop sideshow, but I 
can't figure out where the code is to control the buttons on the window, funny 
enough.

The code is here: 
http://websvn.kde.org/trunk/KDE/kdebase/workspace/plasma/generic/wallpapers/image/
  ___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel