|
|
|
@ -283,7 +283,9 @@ void GenericMonitor::brightnessChange(int direction, int step)
|
|
|
|
|
DCOPReply reply = tdepowersave->call("brightnessGet");
|
|
|
|
|
if (reply.isValid())
|
|
|
|
|
{
|
|
|
|
|
int brightnessLevel = 100 + (int)reply; // reply value is a negative number between 0 and -100.
|
|
|
|
|
int brightnessLevel = (int)reply;
|
|
|
|
|
if (brightnessLevel >= 0)
|
|
|
|
|
{
|
|
|
|
|
brightnessLevel += direction * step; // add requested brightness step
|
|
|
|
|
if (brightnessLevel > 100)
|
|
|
|
|
{
|
|
|
|
@ -304,6 +306,7 @@ void GenericMonitor::brightnessChange(int direction, int step)
|
|
|
|
|
_interface->displayProgress(i18n("Brightness"), brightnessLevel);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int GenericMonitor::progress() const
|
|
|
|
|
{
|
|
|
|
|