[Differential] [Request, 50 lines] D3606: RFC: Listen for broadcast notifications on system bus

broulik (Kai Uwe Broulik) noreply at phabricator.kde.org
Tue Dec 6 13:29:27 UTC 2016


broulik created this revision.
broulik added a reviewer: Plasma.
broulik set the repository for this revision to R120 Plasma Workspace.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  This will listen for a signal on the system DBus to show a notification to all users on the current machine. This allows prettier and more versatile notifications than using wall/write.

TEST PLAN
  Requested by LiMux project
  
  Little test app that works:
  
    #include <QCoreApplication>
    #include <QDBusConnection>
    #include <QDBusMessage>
    #include <QTimer>
    
    int main(int argc, char *argv[])
    {
        QCoreApplication app(argc, argv);
    
        QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/de/muenchen/limux/Broadcast"),
                                                          QStringLiteral("org.kde.plasmashell.broadcastNotification"),
                                                          QStringLiteral("Notify"));
        message.setArguments({ QVariantMap{
            {QStringLiteral("summary"), "Cannot restore network shares"},
            {QStringLiteral("body"), "Please contact system administration if you cannot find your stuff."},
            {QStringLiteral("appIcon"), QStringLiteral("network-disconnect")}
        } });
        QDBusConnection::systemBus().send(message);
    
        QTimer::singleShot(500, &app, QCoreApplication::quit);
    
        return app.exec();
    }
  
  F651894: Screenshot_20161206_142824.png <https://phabricator.kde.org/F651894>

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D3606

AFFECTED FILES
  dataengines/notifications/notificationsengine.cpp
  dataengines/notifications/notificationsengine.h

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: broulik, #plasma
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20161206/3153b6f3/attachment.html>


More information about the Plasma-devel mailing list