[gnome-boxes/wip/props-ui-files: 3/12] Drop now redundant PropertyCreationFlag type



commit 4dc08de0069497598b03951a0c32eea55f4b5160
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 4e534a4..3039f33 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 3b13d1d..ebfee7a 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 5440c5e..a2f9f76 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -356,7 +356,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 20896ab..c8a9819 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 6ed9bbc..fd1e369 100644
--- a/src/remote-machine.vala
+++ b/src/remote-machine.vala
@@ -50,7 +50,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) {
@@ -82,7 +82,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 ad3e592..0a28f19 100644
--- a/src/spice-display.vala
+++ b/src/spice-display.vala
@@ -313,7 +313,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) {
@@ -326,7 +326,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 7cbf4df..89ffa92 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]