|
|
@ -233,7 +233,7 @@ void kpowersave::initMenu() {
|
|
|
|
void kpowersave::resizeEvent ( TQResizeEvent * )
|
|
|
|
void kpowersave::resizeEvent ( TQResizeEvent * )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
|
|
|
|
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
|
|
|
|
loadIcon();
|
|
|
|
loadIcon(true);
|
|
|
|
drawIcon();
|
|
|
|
drawIcon();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -304,7 +304,7 @@ void kpowersave::showConfigureNotificationsDialog() {
|
|
|
|
* To reduce the systemload the icons are only reloaded if \ref pixmap_name
|
|
|
|
* To reduce the systemload the icons are only reloaded if \ref pixmap_name
|
|
|
|
* is changed.
|
|
|
|
* is changed.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void kpowersave::loadIcon(){
|
|
|
|
void kpowersave::loadIcon(bool forceReload){
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
|
|
TQString pixmap_name_tmp = "NONE";
|
|
|
|
TQString pixmap_name_tmp = "NONE";
|
|
|
@ -352,7 +352,7 @@ void kpowersave::loadIcon(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// reload icon only if new icon selected
|
|
|
|
// reload icon only if new icon selected
|
|
|
|
if(pixmap_name_tmp != pixmap_name) {
|
|
|
|
if ((pixmap_name_tmp != pixmap_name) || (forceReload)) {
|
|
|
|
pixmap_name = pixmap_name_tmp;
|
|
|
|
pixmap_name = pixmap_name_tmp;
|
|
|
|
if (pixmap_name.startsWith("ERROR")) {
|
|
|
|
if (pixmap_name.startsWith("ERROR")) {
|
|
|
|
pixmap = SmallIcon("laptoppower", width(), KIcon::DisabledState);
|
|
|
|
pixmap = SmallIcon("laptoppower", width(), KIcon::DisabledState);
|
|
|
|