[gnome-boxes] Keep Libvirt connections around
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Keep Libvirt connections around
- Date: Thu, 27 Oct 2011 15:56:44 +0000 (UTC)
commit 75411936138cd28eea576464de2f905c7cc7549a
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Oct 27 18:44:45 2011 +0300
Keep Libvirt connections around
src/app.vala | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index 9b48985..a3ad99e 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -32,10 +32,13 @@ private class Boxes.App: Boxes.UI {
private Collection collection;
private CollectionView view;
+ private HashTable<string,GVir.Connection> connections;
+
public App () {
settings = new GLib.Settings ("org.gnome.boxes");
setup_ui ();
collection = new Collection (this);
+ connections = new HashTable<string, GVir.Connection> (str_hash, str_equal);
collection.item_added.connect ((item) => {
item.actor.set_reactive (true);
item.actor.button_press_event.connect ((actor, event) => {
@@ -66,6 +69,8 @@ private class Boxes.App: Boxes.UI {
var machine = new LibvirtMachine (source, this, connection, domain);
collection.add_item (machine);
}
+
+ connections.replace (source.uri, connection);
}
public void add_collection_source (CollectionSource source) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]