[gnome-boxes/wip/resize-snapshots2: 4/6] Revert "libvirt-machine-props: Drop redundant fetch_snapshots()"
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/resize-snapshots2: 4/6] Revert "libvirt-machine-props: Drop redundant fetch_snapshots()"
- Date: Wed, 6 Apr 2016 22:39:02 +0000 (UTC)
commit 33c04d31fa6b3676cec8aab6ab211c5ad8c2f7e5
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Apr 6 15:51:41 2016 +0100
Revert "libvirt-machine-props: Drop redundant fetch_snapshots()"
This reverts commit f0295e0294fffcac87e53326a6e1ff61b338e14d.
In a folowing patch, we are going to move fetching of snapshots to
LibvirtMachine construction method and hence this change becomes
redundant.
src/libvirt-machine-properties.vala | 4 +++-
src/snapshots-property.vala | 3 ++-
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index edc1b4b..8feaa33 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -678,9 +678,11 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
}
}
- public async List<GVir.DomainSnapshot>? get_snapshots (GLib.Cancellable? cancellable) throws GLib.Error {
+ public async void fetch_snapshots (GLib.Cancellable? cancellable) throws GLib.Error {
yield machine.domain.fetch_snapshots_async (GVir.DomainSnapshotListFlags.ALL, cancellable);
+ }
+ public List<GVir.DomainSnapshot>? get_snapshots () {
return machine.domain.get_snapshots ();
}
diff --git a/src/snapshots-property.vala b/src/snapshots-property.vala
index 7278152..970303e 100644
--- a/src/snapshots-property.vala
+++ b/src/snapshots-property.vala
@@ -88,7 +88,8 @@ private class Boxes.SnapshotsProperty : Boxes.Property {
private async void fetch_snapshots () {
try {
- var snapshots = yield machine.properties.get_snapshots (null);
+ yield machine.properties.fetch_snapshots (null);
+ var snapshots = machine.properties.get_snapshots ();
foreach (var snapshot in snapshots) {
var row = new SnapshotListRow (snapshot, machine);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]