[gnome-boxes] libvirt-machine: Server in 'info' if remote
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] libvirt-machine: Server in 'info' if remote
- Date: Tue, 18 Aug 2015 17:57:37 +0000 (UTC)
commit 84e4834539e284e0361424310f72da69d5632433
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Fri Jul 3 15:43:45 2015 +0100
libvirt-machine: Server in 'info' if remote
Set info property of remote libvirt machines to "host: server" where
server is server part (hostname or IP address) of it's host URL. 'info'
property is bound to 2nd text line in the collection view under the
thumbnail.
https://bugzilla.gnome.org/show_bug.cgi?id=744004
src/libvirt-machine.vala | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index 9c8cfbc..44ce2c3 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -237,6 +237,7 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
}
update_info ();
+ source.notify["uri"].connect (update_info);
sync_properties = {
BoxConfig.SyncProperty () { name = "run-in-bg", default_value = false },
@@ -732,7 +733,11 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
info = _("Live");
else if (VMConfigurator.is_import_config (domain_config))
info = _("Importing…");
- else
+ else if (!is_local) {
+ var uri = Xml.URI.parse (source.uri);
+
+ info = _("host: %s").printf (uri.server);
+ } else
info = null;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]