Further cleanup to notifier tray icon system

master
Timothy Pearson 10 years ago
parent d69942a009
commit 869f753650

@ -70,13 +70,13 @@ void TrayWindow::setAvailableUpdates( int n )
if ( m_updates == 0 ) { if ( m_updates == 0 ) {
if (isShown()) { if (isShown()) {
loadSizedIcon( u8( "adept_notifier_ok" ), width() ); setPixmap(loadSizedIcon( u8( "adept_notifier_ok" ), width() ));
} }
hide(); hide();
} }
else { else {
show(); show();
loadSizedIcon( u8( "adept_notifier_warning" ), width() ); setPixmap(loadSizedIcon( u8( "adept_notifier_warning" ), width() ));
} }
TQToolTip::remove(this); TQToolTip::remove(this);
@ -171,7 +171,7 @@ NotifierApp::NotifierApp(bool allowStyles, bool GUIenabled)
if (m_crashes) { if (m_crashes) {
ApportTrayWindow* crashApplet = new ApportTrayWindow; 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 " TQString crashMessage = i18n("An application has crashed on your "
"system (now or in the past).\n" "system (now or in the past).\n"
"Click to " "Click to "
@ -180,6 +180,7 @@ NotifierApp::NotifierApp(bool allowStyles, bool GUIenabled)
TQToolTip::add(crashApplet, crashMessage); TQToolTip::add(crashApplet, crashMessage);
connect( crashApplet, TQT_SIGNAL(clicked()), this, TQT_SLOT(crashWatcher()) ); connect( crashApplet, TQT_SIGNAL(clicked()), this, TQT_SLOT(crashWatcher()) );
crashApplet->show(); crashApplet->show();
crashApplet->setPixmap( crashApplet->loadSizedIcon(u8("apport"), crashApplet->width()) );
TQPixmap icon = BarIcon(u8("apport")); TQPixmap icon = BarIcon(u8("apport"));
KPassivePopup::message(i18n("Crash Handler"), crashMessage, icon, crashApplet); KPassivePopup::message(i18n("Crash Handler"), crashMessage, icon, crashApplet);
} }
@ -231,12 +232,13 @@ void NotifierApp::rebootWatcher(const TQString& path) {
if (path == TQString("/var/lib/update-notifier/dpkg-run-stamp") && m_rebootRequired && !m_rebootShown) { if (path == TQString("/var/lib/update-notifier/dpkg-run-stamp") && m_rebootRequired && !m_rebootShown) {
RebootTrayWindow* rebootApplet = new RebootTrayWindow; 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."); TQString rebootMessage = i18n("In order to complete the update your system needs to be restarted.");
TQToolTip::add(rebootApplet, rebootMessage); TQToolTip::add(rebootApplet, rebootMessage);
connect( rebootApplet, TQT_SIGNAL(clicked()), this, TQT_SLOT(rebootClicked()) ); connect( rebootApplet, TQT_SIGNAL(clicked()), this, TQT_SLOT(rebootClicked()) );
rebootApplet->show(); rebootApplet->show();
rebootApplet->setPixmap( rebootApplet->loadSizedIcon(u8("reload"), rebootApplet->width()) );
TQPixmap icon = BarIcon(u8("reload")); TQPixmap icon = BarIcon(u8("reload"));
KPassivePopup::message(i18n("Reboot Required"), rebootMessage, icon, rebootApplet); KPassivePopup::message(i18n("Reboot Required"), rebootMessage, icon, rebootApplet);
m_rebootShown = true; m_rebootShown = true;

Loading…
Cancel
Save