on xenial help sign in
Indicator services started by unity8 upstart configuration rather than manual emmision from indicator manager.
3116599Nick Dedekind
data/unity8.conf+2−1
@@ -1,7 +1,7 @@
1description "Unity Shell v8"
1description "Unity Shell v8"
2author "Ricardo Mendoza <ricmm@ubuntu.com>"
2author "Ricardo Mendoza <ricmm@ubuntu.com>"
3
3
4−emits scope-ui-starting
4+emits scope-ui-starting indicator-services-start
5
5
6start on ((xsession SESSION=ubuntu-touch) or (xsession SESSION=ubuntu-touch-surfaceflinger)) and started dbus
6start on ((xsession SESSION=ubuntu-touch) or (xsession SESSION=ubuntu-touch-surfaceflinger)) and started dbus
7stop on desktop-end
7stop on desktop-end
@@ -42,6 +42,7 @@ pre-start script
42 fi
42 fi
43
43
44 initctl emit scope-ui-starting
44 initctl emit scope-ui-starting
45+ initctl emit indicator-services-start
45end script
46end script
46
47
47exec ${BINARY:-unity8} $ARGS
48exec ${BINARY:-unity8} $ARGS
debian/control−3
@@ -13,13 +13,10 @@ Build-Depends: cmake,
13 libgles2-mesa-dev[armhf],
13 libgles2-mesa-dev[armhf],
14 libgsettings-qt-dev,
14 libgsettings-qt-dev,
15 libhud-client2-dev,
15 libhud-client2-dev,
16− libnih-dbus-dev,
17− libnih-dev,
18 libpulse-dev,
16 libpulse-dev,
19 libqmenumodel-dev (>= 0.2.7),
17 libqmenumodel-dev (>= 0.2.7),
20 libunity-api-dev (>= 7.80.6),
18 libunity-api-dev (>= 7.80.6),
21 libunity-mir-dev,
19 libunity-mir-dev,
22− libupstart-dev,
23 libusermetricsoutput1-dev,
20 libusermetricsoutput1-dev,
24 libxcb1-dev,
21 libxcb1-dev,
25 libglib2.0-dev,
22 libglib2.0-dev,
plugins/Unity/Indicators/CMakeLists.txt−3
@@ -6,7 +6,6 @@ project(IndicatorsQml)
6pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32)
6pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32)
7pkg_check_modules(GIO REQUIRED gio-2.0>=2.32)
7pkg_check_modules(GIO REQUIRED gio-2.0>=2.32)
8pkg_check_modules(QMENUMODEL REQUIRED qmenumodel)
8pkg_check_modules(QMENUMODEL REQUIRED qmenumodel)
9−pkg_check_modules(LIBUPSTART REQUIRED libupstart libnih libnih-dbus dbus-1)
10
9
11find_package(Qt5Core REQUIRED)
10find_package(Qt5Core REQUIRED)
12find_package(Qt5Quick REQUIRED)
11find_package(Qt5Quick REQUIRED)
@@ -19,7 +18,6 @@ include_directories(
19 ${GLIB_INCLUDE_DIRS}
18 ${GLIB_INCLUDE_DIRS}
20 ${GIO_INCLUDE_DIRS}
19 ${GIO_INCLUDE_DIRS}
21 ${QMENUMODEL_INCLUDE_DIRS}
20 ${QMENUMODEL_INCLUDE_DIRS}
22− ${LIBUPSTART_INCLUDE_DIRS}
23)
21)
24
22
25set(IndicatorsQML_SOURCES
23set(IndicatorsQML_SOURCES
@@ -54,7 +52,6 @@ target_link_libraries(IndicatorsQml
54 ${GLIB_LIBRARIES}
52 ${GLIB_LIBRARIES}
55 ${GIO_LIBRARIES}
53 ${GIO_LIBRARIES}
56 ${QMENUMODEL_LDFLAGS}
54 ${QMENUMODEL_LDFLAGS}
57− ${LIBUPSTART_LIBRARIES}
58)
55)
59
56
60qt5_use_modules(IndicatorsQml Core Qml Quick)
57qt5_use_modules(IndicatorsQml Core Qml Quick)
plugins/Unity/Indicators/indicatorsmanager.cpp−33
@@ -21,9 +21,6 @@
21#include <QSettings>
21#include <QSettings>
22#include <QDebug>
22#include <QDebug>
23
23
24−#include <upstart.h>
25−#include <nih/alloc.h>
26−
27#include <paths.h>
24#include <paths.h>
28
25
29
26
@@ -216,36 +213,6 @@ void IndicatorsManager::setLoaded(bool loaded)
216 {
213 {
217 m_loaded = loaded;
214 m_loaded = loaded;
218 Q_EMIT loadedChanged(m_loaded);
215 Q_EMIT loadedChanged(m_loaded);
219−
220− auto upstartsession = qgetenv("UPSTART_SESSION");
221− NihDBusProxy * upstart = NULL;
222−
223− if (!upstartsession.isNull()) {
224− DBusConnection * conn = NULL;
225− conn = dbus_connection_open(upstartsession.constData(), NULL);
226− if (conn != NULL) {
227− upstart = nih_dbus_proxy_new(NULL, conn,
228− NULL,
229− DBUS_PATH_UPSTART,
230− NULL, NULL);
231− dbus_connection_unref(conn);
232− }
233− }
234−
235− if (upstart != NULL) {
236− int event_sent = 0;
237− if (m_loaded) {
238− event_sent = upstart_emit_event_sync(NULL, upstart, "indicator-services-start", NULL, 0);
239− } else {
240− event_sent = upstart_emit_event_sync(NULL, upstart, "indicator-services-end", NULL, 0);
241− }
242−
243− if (event_sent != 0) {
244− qWarning() << "Unable to send indicator event to Upstart";
245− }
246− nih_unref(upstart, NULL);
247− upstart = NULL;
248− }
249 }
216 }
250}
217}
251
218
plugins/Unity/Indicators/indicatorsmanager.h−2
@@ -28,8 +28,6 @@
28#include <QHash>
28#include <QHash>
29#include <QSharedPointer>
29#include <QSharedPointer>
30
30
31−typedef struct nih_dbus_proxy NihDBusProxy;
32−
33class UNITYINDICATORS_EXPORT IndicatorsManager : public QObject
31class UNITYINDICATORS_EXPORT IndicatorsManager : public QObject
34{
32{
35 Q_OBJECT
33 Q_OBJECT