From: Stephan Kulow Subject: Avoid popup message boxes for locked or masked PK Index: apper-0.9.1/libapper/PkTransaction.cpp =================================================================== --- apper-0.9.1.orig/libapper/PkTransaction.cpp +++ apper-0.9.1/libapper/PkTransaction.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include @@ -765,11 +766,26 @@ void PkTransaction::showSorry(const QStr { PkTransactionWidget *widget = qobject_cast(d->parentWindow); if (!widget || widget->isCancelVisible()) { + // for background jobs like getupdates (triggered by a timer) we don't want a popup + if (role() == Transaction::RoleGetUpdates) { + KNotification *notify; + notify = new KNotification("TransactionMessage", 0, KNotification::Persistent); + notify->setComponentData(KComponentData("apperd")); + notify->setTitle(title); + if (details.isEmpty()) + notify->setText(description); + else + notify->setText(details); + + notify->setPixmap(KIcon("dialog-warning").pixmap(KPK_ICON_SIZE, KPK_ICON_SIZE)); + notify->sendEvent(); + } else { if (details.isEmpty()) { KMessageBox::sorry(d->parentWindow, description, title); } else { KMessageBox::detailedSorry(d->parentWindow, description, details, title); } + } } else { emit sorry(title, description, details); }