Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Staging:A:DVD
apper
no-popup-for-background-actions.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File no-popup-for-background-actions.patch of Package apper
From: Stephan Kulow <coolo@suse.de> 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 <KService> #include <KPixmapSequence> #include <KPixmapSequenceOverlayPainter> +#include <KNotification> #include <KDebug> @@ -765,11 +766,26 @@ void PkTransaction::showSorry(const QStr { PkTransactionWidget *widget = qobject_cast<PkTransactionWidget *>(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); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor