[gnome-boxes] search-provider: implement ActivateResult
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] search-provider: implement ActivateResult
- Date: Mon, 13 Aug 2012 12:21:28 +0000 (UTC)
commit 05ecb7602f646f0c360839c1918b02cbf1de8dc5
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date: Sun Aug 5 15:52:04 2012 +0200
search-provider: implement ActivateResult
https://bugzilla.gnome.org/show_bug.cgi?id=681246
src/gnome-boxes-search-provider.vala | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-boxes-search-provider.vala b/src/gnome-boxes-search-provider.vala
index 5d61427..c7d67b8 100644
--- a/src/gnome-boxes-search-provider.vala
+++ b/src/gnome-boxes-search-provider.vala
@@ -148,6 +148,23 @@ private class Boxes.SearchProvider: Object {
debug ("ActivateResult (%s)", search_id);
+ var box = boxes.lookup (search_id);
+ if (box == null) {
+ warning ("Can't find id: " + search_id);
+ app.release ();
+ return;
+ }
+
+ string uuid = box.config.uuid;
+ try {
+ var cmd = "gnome-boxes --open-uuid " + uuid;
+ if (!Process.spawn_command_line_async (cmd))
+ stderr.printf ("Failed to launch Boxes with uuid '%s'\n", uuid);
+ } catch (SpawnError error) {
+ stderr.printf ("Failed to launch Boxes with uuid '%s'\n", uuid);
+ warning (error.message);
+ }
+
app.release ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]