@@ -21,6 +21,8 @@
2121#include <QSettings>
2222#include <QDebug>
2323
24+#include <upstart.h>
25+
2426#include "paths.h"
2527
2628
@@ -31,13 +33,33 @@ public:
3133 : m_name(name)
3234 , m_fileInfo(fileInfo)
3335 , m_verified (true)
34− {}
36+ , m_upstart (NULL)
37+ {
38+ auto upstartsession = qgetenv("UPSTART_SESSION");
39+ if (!upstartsession.isNull()) {
40+ DBusConnection * conn = NULL;
41+ conn = dbus_connection_open(upstartsession.constData(), NULL);
42+ if (conn != NULL) {
43+ m_upstart = nih_dbus_proxy_new(NULL, conn,
44+ NULL,
45+ DBUS_PATH_UPSTART,
46+ NULL, NULL);
47+ dbus_connection_unref(conn);
48+ }
49+ }
50+
51+ if (m_upstart != NULL) {
52+ m_upstart->auto_start = FALSE;
53+ }
54+ }
3555
3656 QString m_name;
3757 QFileInfo m_fileInfo;
3858
3959 bool m_verified;
4060 Indicator::Ptr m_indicator;
61+
62+ NihDBusProxy * m_upstart;
4163};
4264
4365IndicatorsManager::IndicatorsManager(QObject* parent)