Ubuntu Pastebin

Paste from a at Mon, 4 May 2015 11:49:18 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Description: call kubuntu-notifications-helper to prompt for installing restricted codecs
Author: Jonathan Riddell
Origin: kubuntu
Forwarded: no cos k-n-h is kubuntu only, but I have a gsoc project to do this better upstream
Last-Update: 2015-04-01
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/app/main.cpp	2015-02-21 07:46:09.000000000 +0100
+++ b/src/app/main.cpp	2015-04-01 18:19:17.478573756 +0200
@@ -26,6 +26,9 @@
 #include <KCmdLineArgs>
 #include <KLocalizedString>
 
+#include <QDBusMessage>
+#include <QDBusConnection>
+
 static KAboutData aboutData( APP_NAME, 0,
         ki18n("Dragon Player"), APP_VERSION,
         ki18n("A video player that has a usability focus"), KAboutData::License_GPL_V2,
@@ -52,5 +55,17 @@
     KUniqueApplication::addCmdLineOptions();
 
     Dragon::PlayerApplication application;
+
+    //Added by Kubuntu for update-notifier-kde to prompt for restricted codec install
+    QDBusMessage m = QDBusMessage::createMethodCall("org.kubuntu.restrictedInstall",
+                                                    "/org/kubuntu/restrictedInstall",
+                                                    "org.kubuntu.restrictedInstall",
+                                                    "installRestricted");
+    QList<QVariant> dbusargs;
+    dbusargs.append("Dragon Video Player");
+    dbusargs.append("gstreamer1.0-libav");
+    m.setArguments(dbusargs);
+    bool queued = QDBusConnection::sessionBus().send(m);
+
     return application.exec();
 }
Download as text