diff --git a/src/kpowersave.cpp b/src/kpowersave.cpp index b1c3a35..92cddc5 100644 --- a/src/kpowersave.cpp +++ b/src/kpowersave.cpp @@ -239,7 +239,7 @@ void kpowersave::initMenu() { void kpowersave::resizeEvent ( TQResizeEvent * ) { // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes - loadIcon(); + loadIcon(true); drawIcon(); } @@ -310,7 +310,7 @@ void kpowersave::showConfigureNotificationsDialog() { * To reduce the systemload the icons are only reloaded if \ref pixmap_name * is changed. */ -void kpowersave::loadIcon(){ +void kpowersave::loadIcon(bool forceReload){ kdDebugFuncIn(trace); TQString pixmap_name_tmp = "NONE"; @@ -358,7 +358,7 @@ void kpowersave::loadIcon(){ } // 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; if (pixmap_name.startsWith("ERROR")) { pixmap = SmallIcon("laptoppower", width(), KIcon::DisabledState); diff --git a/src/kpowersave.h b/src/kpowersave.h index 6d3f124..7715392 100644 --- a/src/kpowersave.h +++ b/src/kpowersave.h @@ -306,7 +306,7 @@ private: //! to intialise the menu for the kickerapplet void initMenu(); //! load the icon for \ref redrawPixmap() - void loadIcon(); + void loadIcon(bool forceReload = false); //! draw/redraw the icon for the kickerapplet void redrawPixmap(); //! to set the screensaver settings