@@ -159,15 +159,37 @@ void Scope::preview(const QVariant &uri, const QVariant &icon_hint, const QVaria
159159 m_unityScope->Preview(res);
160160}
161161
162−void Scope::onActivated(unity::dash::LocalResult const& result, unity::dash::ScopeHandledType type, unity::glib::HintsMap const&)
162+void Scope::onActivated(unity::dash::LocalResult const& result, unity::dash::ScopeHandledType type, unity::glib::HintsMap const& hints)
163163{
164− if (type == unity::dash::NOT_HANDLED) {
165− fallbackActivate(QString::fromStdString(result.uri));
164+ // note: we will not get called on SHOW_PREVIEW, instead UnityCore will signal preview_ready.
165+ switch (type)
166+ {
167+ case unity::dash::NOT_HANDLED:
168+ fallbackActivate(QString::fromStdString(result.uri));
169+ break;
170+ case unity::dash::SHOW_DASH:
171+ Q_EMIT showDash();
172+ break;
173+ case unity::dash::HIDE_DASH:
174+ Q_EMIT hideDash();
175+ break;
176+ case unity::dash::GOTO_DASH_URI:
177+ if (hints.contains("goto-uri")) {
178+ Q_EMIT gotoUri(QString::fromStdString(hints["goto-uri"]));
179+ } else {
180+ qWarning() << "Missing goto-uri hint for GOTO_DASH_URI activation reply";
181+ }
182+ break;
183+ default:
184+ qWarning() << "Unhandled activation response:" << type;
166185 }
167186}
168187
169188void Scope::onPreviewReady(unity::dash::LocalResult const& result, unity::dash::Preview::Ptr const& preview)
170189{
190+ auto res = createLocalResult(uri, icon_hint, category, result_type, mimetype, title, comment, dnd_uri, metadata);
191+ auto prv = Preview::newFromUnityPreview(preview);
192+ Q_EMIT previewReady(prv);
171193}
172194
173195void Scope::fallbackActivate(const QString& uri)