[gnome-boxes] libvirt-machine-props: Drop redundant fetch_snapshots()
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] libvirt-machine-props: Drop redundant fetch_snapshots()
- Date: Fri, 1 Apr 2016 23:03:29 +0000 (UTC)
commit f0295e0294fffcac87e53326a6e1ff61b338e14d
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Fri Apr 1 23:41:14 2016 +0100
libvirt-machine-props: Drop redundant fetch_snapshots()
There is only one use of fetch_snapshots() and it's followed by a
get_snapshots() call so there is no point of keeping these two separate.
src/libvirt-machine-properties.vala | 4 +---
src/snapshots-property.vala | 3 +--
2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 22ba610..91d69c8 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -674,11 +674,9 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
}
}
- public async void fetch_snapshots (GLib.Cancellable? cancellable) throws GLib.Error {
+ public async List<GVir.DomainSnapshot>? get_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 970303e..7278152 100644
--- a/src/snapshots-property.vala
+++ b/src/snapshots-property.vala
@@ -88,8 +88,7 @@ private class Boxes.SnapshotsProperty : Boxes.Property {
private async void fetch_snapshots () {
try {
- yield machine.properties.fetch_snapshots (null);
- var snapshots = machine.properties.get_snapshots ();
+ var snapshots = yield machine.properties.get_snapshots (null);
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]