on xenial help sign in
Use the sync command so that we don't need a main loop
9a5c188Ted Gould
plugins/Unity/Indicators/indicatorsmanager.cpp+7−4
@@ -236,13 +236,16 @@ void IndicatorsManager::setLoaded(bool loaded)
236 Q_EMIT loadedChanged(m_loaded);
236 Q_EMIT loadedChanged(m_loaded);
237
237
238 if (m_upstart != NULL) {
238 if (m_upstart != NULL) {
239− DBusPendingCall * pending = NULL;
239+ int event_sent = 0;
240 if (m_loaded) {
240 if (m_loaded) {
241− pending = upstart_emit_event(m_upstart, "indicator-services-start", NULL, 0, NULL, NULL, NULL, 100);
241+ event_sent = upstart_emit_event_sync(NULL, m_upstart, "indicator-services-start", NULL, 0);
242 } else {
242 } else {
243− pending = upstart_emit_event(m_upstart, "indicator-services-end", NULL, 0, NULL, NULL, NULL, 100);
243+ event_sent = upstart_emit_event_sync(NULL, m_upstart, "indicator-services-end", NULL, 0);
244 }
244 }
245− dbus_pending_call_unref(pending);
245+
246+ if (event_sent != 0) {
247+ qDebug() << "Unable to send indicator event to Upstart";
248+ }
246 }
249 }
247 }
250 }
248}
251}