[gnome-boxes/wip/props-ui-files: 18/23] i-props-provider: get_properties() now async
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/props-ui-files: 18/23] i-props-provider: get_properties() now async
- Date: Thu, 18 Aug 2016 16:21:19 +0000 (UTC)
commit 5b3c56c069e4d7d61d0b6b5635d44319dbfb9116
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Jun 2 18:46:11 2016 +0100
i-props-provider: get_properties() now async
In a following patch, this method will start returning a
PropertiesPageWidget and some of the IPropertiesProvider implementers
will need to make some async calls while constructing these widgets.
src/display.vala | 2 +-
src/i-properties-provider.vala | 2 +-
src/libvirt-machine-properties.vala | 2 +-
src/libvirt-machine.vala | 6 +++---
src/machine.vala | 2 +-
src/ovirt-machine.vala | 4 ++--
src/properties-page-widget.vala | 2 +-
src/remote-machine.vala | 4 ++--
src/spice-display.vala | 2 +-
src/vnc-display.vala | 2 +-
10 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/display.vala b/src/display.vala
index c42a06b..43128f2 100644
--- a/src/display.vala
+++ b/src/display.vala
@@ -37,7 +37,7 @@ private abstract class Boxes.Display: GLib.Object, Boxes.IPropertiesProvider {
}
public abstract void send_keys (uint[] keyvals);
- public abstract List<Boxes.Property> get_properties (Boxes.PropertiesPage page);
+ public abstract async List<Boxes.Property> get_properties (Boxes.PropertiesPage page);
protected HashTable<int, Gtk.Widget?> displays;
diff --git a/src/i-properties-provider.vala b/src/i-properties-provider.vala
index f326621..0a670d2 100644
--- a/src/i-properties-provider.vala
+++ b/src/i-properties-provider.vala
@@ -193,7 +193,7 @@ private class Boxes.EditableStringProperty : Boxes.Property {
}
private interface Boxes.IPropertiesProvider: GLib.Object {
- public abstract List<Boxes.Property> get_properties (Boxes.PropertiesPage page);
+ public abstract async List<Boxes.Property> get_properties (Boxes.PropertiesPage page);
protected Boxes.Property add_property (ref List<Boxes.Property> list,
string? name,
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 1bccd92..b210fbe 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -80,7 +80,7 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
return builder.str;
}
- public List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
+ public async List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
var list = new List<Boxes.Property> ();
// the wizard may want to modify display properties, before connect_display()
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index b841069..ef3871c 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -384,11 +384,11 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
}
}
- public override List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
- var list = properties.get_properties (page);
+ public override async List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
+ var list = yield properties.get_properties (page);
if (display != null)
- list.concat (display.get_properties (page));
+ list.concat (yield display.get_properties (page));
return list;
}
diff --git a/src/machine.vala b/src/machine.vala
index d27523a..a13d54a 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -358,7 +358,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
return display.get_pixbuf (0);
}
- public abstract List<Boxes.Property> get_properties (Boxes.PropertiesPage page);
+ public abstract async List<Boxes.Property> get_properties (Boxes.PropertiesPage page);
public abstract async void connect_display (ConnectFlags flags) throws GLib.Error;
public abstract void restart ();
diff --git a/src/ovirt-machine.vala b/src/ovirt-machine.vala
index b684d6a..e510d63 100644
--- a/src/ovirt-machine.vala
+++ b/src/ovirt-machine.vala
@@ -63,7 +63,7 @@ private class Boxes.OvirtMachine: Boxes.Machine {
}
}
- public override List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
+ public override async List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
var list = new List<Boxes.Property> ();
switch (page) {
@@ -74,7 +74,7 @@ private class Boxes.OvirtMachine: Boxes.Machine {
break;
}
- list.concat (display.get_properties (page));
+ list.concat (yield display.get_properties (page));
return list;
}
diff --git a/src/properties-page-widget.vala b/src/properties-page-widget.vala
index 3500dc6..485a947 100644
--- a/src/properties-page-widget.vala
+++ b/src/properties-page-widget.vala
@@ -66,7 +66,7 @@ private class Boxes.PropertiesPageWidget: Gtk.Box {
scrolled_win.add (grid);
pack_end (scrolled_win, true, true);
- properties = machine.get_properties (page);
+ properties = yield machine.get_properties (page);
empty = properties.length () == 0;
if (!empty) {
foreach (var property in properties) {
diff --git a/src/remote-machine.vala b/src/remote-machine.vala
index 3a3fdde..ece3ecb 100644
--- a/src/remote-machine.vala
+++ b/src/remote-machine.vala
@@ -53,7 +53,7 @@ private class Boxes.RemoteMachine: Boxes.Machine, Boxes.IPropertiesProvider {
}
}
- public override List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
+ public override async List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
var list = new List<Boxes.Property> ();
switch (page) {
@@ -85,7 +85,7 @@ private class Boxes.RemoteMachine: Boxes.Machine, Boxes.IPropertiesProvider {
if (display == null)
display = create_display ();
- list.concat (display.get_properties (page));
+ list.concat (yield display.get_properties (page));
} catch (Boxes.Error error) {
warning (error.message);
}
diff --git a/src/spice-display.vala b/src/spice-display.vala
index b118099..3a05fa8 100644
--- a/src/spice-display.vala
+++ b/src/spice-display.vala
@@ -306,7 +306,7 @@ private class Boxes.SpiceDisplay: Boxes.Display {
}
}
- public override List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
+ public override async List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
var list = new List<Boxes.Property> ();
switch (page) {
diff --git a/src/vnc-display.vala b/src/vnc-display.vala
index 2c82588..d572ae3 100644
--- a/src/vnc-display.vala
+++ b/src/vnc-display.vala
@@ -133,7 +133,7 @@ private class Boxes.VncDisplay: Boxes.Display {
display.close ();
}
- public override List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
+ public override async List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
var list = new List<Boxes.Property> ();
switch (page) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]