| Summary: | Add missing slider controls for logout confirmation fancy fadeaway darkness and fade speeds | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Darrell <darrella> |
| Component: | tdebase | Assignee: | Calvin Morrison <mutantturkey> |
| Status: | NEW --- | ||
| Severity: | normal | CC: | bugwatch, darrella, slavek.banko |
| Priority: | P1 | ||
| Version: | 3.5.13.x [Trinity] | ||
| Hardware: | All | ||
| OS: | All | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ksmserver | |
| Bug Depends on: | |||
| Bug Blocks: | 681, 760 | ||
| Attachments: |
Partial patch to add GUI controls for the logoff gray fadeaway
Partial patch to add GUI controls for the logoff gray fadeaway (updated) |
||
|
Description
Darrell
2010-09-06 16:52:31 CDT
A second check box in KControl/KDE Components/Session Manager is a good location. The new check box would appear indented and under the Confirm logout check box. An example of a second indented check box is seen in KControl/Desktop/Behavior/General. When the Confirm logout check box is disabled, the new check box is ghosted and unavailable. When the Confirm logout check box is enabled the new check box becomes usable too. The new check box could be called "Enable background fadeaway effect. The responsible code snippet is found in kdebase/ksmserver/shutdown.cpp.
============================================
dialogActive = true;
if ( !logoutConfirmed ) {
KSMShutdownFeedback::start(); // make the screen gray
logoutConfirmed =
KSMShutdownDlg::confirmShutdown( maysd, sdtype, bopt );
// ###### We can't make the screen remain gray while talking to the apps,
// because this prevents interaction ("do you want to save", etc.)
// TODO: turn the feedback widget into a list of apps to be closed,
// with an indicator of the current status for each.
KSMShutdownFeedback::stop(); // make the screen become normal again
}
============================================
We could use a sledge hammer to solve the problem and delete the entire snippet. That kind of a solution rarely pleases anybody. Some people probably like the gray fadeaway eye candy. The check box option in KControl/KDE Components/Session Manager, General section is an appropriate solution.
The check box option should be stored in $KDEHOME/share/config/ksmserverrc, [General], using a key of grayFadeaway=true/false.
I'm not a C++ programmer but my guess is something similar to this will suffice:
- if ( !logoutConfirmed ) {
+ if ( !logoutConfirmed && config->readBoolEntry( "grayFadeaway", true )) {
But I don't know how to ghost the check box.
TDE is a good option for older hardware. The gray fadeaway is eye candy that needs to be disabled on such hardware. The fadeaway is too slow.
Would be nice if in KPersonalizer when the user adjusts the eye candy slider to full minimum that the fadeaway gets disabled. Support to disable the gray fadeaway effect already exists in kdebase/ksmserver/shutdowndlg.cpp. There is no KControl interface to configure the settings. The required settings belong in $KDEHOME/share/config/ksmserverrc. The layout: [Logout] doFancyLogout=false doFancyLogoutAdditionalDarkness=0.6 doFancyLogoutFadeBackTime=1000 doFancyLogoutFadeTime=4000 doUbuntuLogout=false Manually setting doFancyLogout to false does indeed stop the fadeaway effect. The doFancyLogoutAdditionalDarkness seems to have an upper limit of 1.0. Beyond that and my screen went goofy. The lower limit seems to be 0.0. The entire screen goes black and only a remnant of the kicker panel is still seen. Playing with doFancyLogoutFadeTime and doFancyLogoutFadeBackTime changes how fast the fadeaway appears and disappears. I don't know the lower and upper limits. I imagine zero is the lower limit as the numbers represent milliseconds. For anybody who wants to create a KControl interface, I think something like this in KDE Components/Session Manager, General section: All of the following are disabled/ghosted when "Confirm logout" is unchecked. When "Confirm logout" is enabled then the following widget is enabled/unghosted. * A check box: Enable fancy gray fadeaway When that check box is enabled then the following become enabled/unghosted: * A slider control from zero to 1.0 for darkness * A slider control from zero to ?? milliseconds for fade time * A slider control from zero to ?? milliseconds for restore time * If the system is running the Ubuntu OS, then a check box appears, but only if the OS is Ubuntu. Additionally, the doFancyLogout option should be added to KPersonalizer Step 3: Eyecandy-O-Meter. When the user moves the slider to full minimum the option gets set to false. Should be able to resolve this before R14. Great! I was reviewing this report just last night. I belive my proposed design is good (Comment 4). Please contact me for any help you need! There is an easy fix so I am bumpin severity down to normal. Calvin, Two notes: 1. In Comment 4 I typed "doFancyLogout," which is incorrect. The proper key is showFancyLogout. The other keys are correct. 2. Resolving this bug report will provide a temporary work-around for bug report 922. Calvin: This is confusing! There are two ksmserverrc keys/options: doFancyLogout --> controls gray fading showFancyLogout --> controls feedback dialog To avoid confusion, I'm in favor of renaming these keys/options: doFancyLogout --> doGrayFading doFancyLogoutAdditionalDarkness --> doGrayFadingDarkness doFancyLogoutFadeBackTime --> doGrayFadingReverseTime doFancyLogoutFadeTime --> doGrayFadingShowTime showFancyLogout --> showFeedbackDlg (refer to bug report 681) As there never have been any KControl options for these features, almost nobody will have them in their ksmserverrc. Thus, changing the ksmserverrc key names will have no effect on almost all users. And even for those few users who know about the keys/options and have set them manually, the old key names simply get ignored when the new key names are installed. By the way, doFancyLogout is effective only when confirmLogout=true. That is, confirmLogout=false and doFancyLogout=true will not show the gray fading. Thus, as previously suggested, when the KControl "Confirm logout" check box is disabled (confirmLogout=false), the KControl gray fading controls should be ghosted. Calvin, I submitted a patch for bug report 681. In the patch I changed the ksmserverrc key name from showFancyLogout to showFeedbackDlg. This should help avoid confusion between the two key names. I remain in favor of changing the current key names associated with the gray fade effect: doFancyLogout --> doGrayFading doFancyLogoutAdditionalDarkness --> doGrayFadingDarkness doFancyLogoutFadeBackTime --> doGrayFadingReverseTime doFancyLogoutFadeTime --> doGrayFadingShowTime These key names are more descriptive about what they control. :) The latest patch for bug report 681 resolved terminology concerns for the control names. In that patch showFeedbackDlg -> showLogoutStatusDlg. The patch for 681 has not been pushed to GIT because the patch for this bug report and 681 should place the controls together in the same KControl group box. Calvin, What is the status of this patch? Created attachment 855 [details]
Partial patch to add GUI controls for the logoff gray fadeaway
This patch is a nominal first effort to resolve this bug report. The following remains to be completed before closing this report:
* The new check box and text should be indented as a child control under Confirm logout.
The reason for the indent is the gray fadeaway is disabled unless Confirm logout=true.
* The new check box and text should be ghosted/disabled when Confirm logout=false
The reason for the ghosting is the gray fadeaway is disabled unless Confirm logout=true.
* Add slider controls:
user's rc config file: ksmserverrc [Logout]
A slider control from zero to 1.0 for darkness (default is 0.6; zero makes no sense --- make 0.1 the low limit?)
Control label: Darkness:
doFancyLogoutAdditionalDarkness=0.6 [0.0 to 1.0]
A slider control from zero to 1000 (??) milliseconds for fade time (default is 1000; zero makes no sense --- make 100 the low limit; what is the maximum?)
Control label: Fade-in speed:
doFancyLogoutFadeBackTime=1000 [0 to 1000]
A slider control from zero to 4000 (??) milliseconds for restore time (default is 4000; zero makes no sense --- make 100 the low limit?; what is the maximum?)
Control label: Fade-out speed:
doFancyLogoutFadeTime=4000 [0 to 4000]
* Slider controls should be indented/ghosted concurrently with the new check box.
I tried to indent the new check box using the <grid></grid> attributes, but I haven't yet learned how.
Remember this bug report only addresses adding the GUI controls. The underlying code for these controls already exists and is functional --- edit the rc file to see changes.
Created attachment 856 [details]
Partial patch to add GUI controls for the logoff gray fadeaway (updated)
Attached is an updated patch that disables/enables the new check box based upon the status of the parent 'Confirm logout' check box.
Still needed are indents and sliders to control darkness and fade speeds.
Looking at the code, I find lines to read the three variables for controlling darkness and speed, but I do not find any lines to save the settings. They will need to be added.
Patch in attachment 856 [details] pushed in GIT commit daff95cb.
Work is needed to provide sliders to control darkness and fade speeds.
I am changing the summary description because the patch in bug 1999 effectively and finally resolves the original problem described in this report. |