Branch: master

869f7536 2014-07-08 08:53:31 Timothy Pearson
Further cleanup to notifier tray icon system
M adept/notifier/app.cpp
diff --git a/adept/notifier/app.cpp b/adept/notifier/app.cpp
index 3abcfd2..9b9ffce 100644
--- a/adept/notifier/app.cpp
+++ b/adept/notifier/app.cpp
@@ -70,13 +70,13 @@
 
     if ( m_updates == 0 ) {
         if (isShown()) {
-            loadSizedIcon( u8( "adept_notifier_ok" ), width() );
+            setPixmap(loadSizedIcon( u8( "adept_notifier_ok" ), width() ));
         }
         hide();
     }
     else {
         show();
-        loadSizedIcon( u8( "adept_notifier_warning" ), width() );
+        setPixmap(loadSizedIcon( u8( "adept_notifier_warning" ), width() ));
     }
 
     TQToolTip::remove(this);
@@ -171,7 +171,7 @@
 
         if (m_crashes) {
             ApportTrayWindow* crashApplet = new ApportTrayWindow;
-            crashApplet->setPixmap( crashApplet->loadSizedIcon(u8("apport"), crashApplet->width()) );
+            crashApplet->setPixmap( crashApplet->loadIcon(u8("apport")) );
             TQString crashMessage = i18n("An application has crashed on your "
                                        "system (now or in the past).\n"
                                        "Click to "
@@ -180,6 +180,7 @@
             TQToolTip::add(crashApplet, crashMessage);
             connect( crashApplet, TQT_SIGNAL(clicked()), this, TQT_SLOT(crashWatcher()) );
             crashApplet->show();
+            crashApplet->setPixmap( crashApplet->loadSizedIcon(u8("apport"), crashApplet->width()) );
             TQPixmap icon = BarIcon(u8("apport"));
 	    KPassivePopup::message(i18n("Crash Handler"), crashMessage, icon, crashApplet);
 	}
@@ -231,12 +232,13 @@
   if (path == TQString("/var/lib/update-notifier/dpkg-run-stamp") && m_rebootRequired && !m_rebootShown) {
 
     RebootTrayWindow* rebootApplet = new RebootTrayWindow;
-    rebootApplet->setPixmap( rebootApplet->loadSizedIcon(u8("reload"), rebootApplet->width()) );
+    rebootApplet->setPixmap( rebootApplet->loadIcon(u8("reload")) );
 
     TQString rebootMessage = i18n("In order to complete the update your system needs to be restarted.");
     TQToolTip::add(rebootApplet, rebootMessage);
     connect( rebootApplet, TQT_SIGNAL(clicked()), this, TQT_SLOT(rebootClicked()) );
     rebootApplet->show();
+    rebootApplet->setPixmap( rebootApplet->loadSizedIcon(u8("reload"), rebootApplet->width()) );
     TQPixmap icon = BarIcon(u8("reload"));
     KPassivePopup::message(i18n("Reboot Required"), rebootMessage, icon, rebootApplet);
     m_rebootShown = true;