on xenial help sign in
Use the sync command so that we don't need a main loop
commit9a5c18840fd6fd0d184b44245caa06453b7a3002 authorTed Gould <ted@gould.cx> dateWed 7 Aug 2013, 11:35 (13 years ago) parent2535deb
1 file changed+7−4
plugins/Unity/Indicators/indicatorsmanager.cpp+7−4
plugins/Unity/Indicators/indicatorsmanager.cpp+7−4
@@ -236,13 +236,16 @@ void IndicatorsManager::setLoaded(bool loaded)
236236 Q_EMIT loadedChanged(m_loaded);
237237
238238 if (m_upstart != NULL) {
239− DBusPendingCall * pending = NULL;
239+ int event_sent = 0;
240240 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);
242242 } 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);
244244 }
245− dbus_pending_call_unref(pending);
245+
246+ if (event_sent != 0) {
247+ qDebug() << "Unable to send indicator event to Upstart";
248+ }
246249 }
247250 }
248251}