[gnome-boxes] Drop now redundant PropertyCreationFlag type
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Drop now redundant PropertyCreationFlag type
- Date: Fri, 15 Jul 2016 14:54:18 +0000 (UTC)
commit dbc83178858753cd2ff45dac9d6b50d1b16e9f43
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Fri May 27 16:22:20 2016 +0100
Drop now redundant PropertyCreationFlag type
These flags were only invented for hacks to deal with lack of USB
direction in old Qemu. Now that we have droped those hacks, we don't
need these flags.
src/display.vala | 2 +-
src/i-properties-provider.vala | 8 +-------
src/libvirt-machine-properties.vala | 2 +-
src/libvirt-machine.vala | 7 +++----
src/machine.vala | 2 +-
src/ovirt-machine.vala | 4 ++--
src/properties-page-widget.vala | 3 +--
src/remote-machine.vala | 4 ++--
src/spice-display.vala | 4 ++--
src/vnc-display.vala | 2 +-
10 files changed, 15 insertions(+), 23 deletions(-)
---
diff --git a/src/display.vala b/src/display.vala
index 076f469..c42a06b 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, ref PropertyCreationFlag
flags);
+ public abstract 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 f94e088..f326621 100644
--- a/src/i-properties-provider.vala
+++ b/src/i-properties-provider.vala
@@ -192,14 +192,8 @@ private class Boxes.EditableStringProperty : Boxes.Property {
}
}
-[Flags]
-public enum PropertyCreationFlag {
- NONE,
- NO_USB,
-}
-
private interface Boxes.IPropertiesProvider: GLib.Object {
- public abstract List<Boxes.Property> get_properties (Boxes.PropertiesPage page, ref PropertyCreationFlag
flags);
+ public abstract 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 3c06b76..1bccd92 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, ref PropertyCreationFlag flags) {
+ public 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 af907c5..b841069 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -384,12 +384,11 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
}
}
- public override List<Boxes.Property> get_properties (Boxes.PropertiesPage page, ref PropertyCreationFlag
flags) {
- var list = properties.get_properties (page, ref flags);
+ public override List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
+ var list = properties.get_properties (page);
if (display != null)
- list.concat (display.get_properties (page,
- ref flags));
+ list.concat (display.get_properties (page));
return list;
}
diff --git a/src/machine.vala b/src/machine.vala
index a8e5a0f..d27523a 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, ref PropertyCreationFlag
flags);
+ public abstract 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 04058af..b684d6a 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, ref PropertyCreationFlag
flags) {
+ public override 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, ref flags));
+ list.concat (display.get_properties (page));
return list;
}
diff --git a/src/properties-page-widget.vala b/src/properties-page-widget.vala
index add814c..85f4049 100644
--- a/src/properties-page-widget.vala
+++ b/src/properties-page-widget.vala
@@ -41,8 +41,7 @@ private class Boxes.PropertiesPageWidget: Gtk.Box {
scrolled_win.add (grid);
pack_end (scrolled_win, true, true);
- PropertyCreationFlag flags = PropertyCreationFlag.NONE;
- properties = machine.get_properties (page, ref flags);
+ properties = machine.get_properties (page);
empty = properties.length () == 0;
if (!empty) {
int current_row = 1;
diff --git a/src/remote-machine.vala b/src/remote-machine.vala
index 0f84d71..3a3fdde 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, ref PropertyCreationFlag
flags) {
+ public override 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, ref flags));
+ list.concat (display.get_properties (page));
} catch (Boxes.Error error) {
warning (error.message);
}
diff --git a/src/spice-display.vala b/src/spice-display.vala
index b2b40e9..373bbd1 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, ref PropertyCreationFlag
flags) {
+ public override List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
var list = new List<Boxes.Property> ();
switch (page) {
@@ -333,7 +333,7 @@ private class Boxes.SpiceDisplay: Boxes.Display {
break;
case PropertiesPage.DEVICES:
- if (PropertyCreationFlag.NO_USB in flags || !connected)
+ if (!connected)
break;
try {
diff --git a/src/vnc-display.vala b/src/vnc-display.vala
index 481f766..2c82588 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, ref PropertyCreationFlag
flags) {
+ public override 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]