[gnome-boxes] box-config: SyncProperty -> SavedProperty



commit 262cfe580c18cdbbbae5e3e8c6523ecf9f444b81
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Wed Mar 16 16:54:06 2016 +0000

    box-config: SyncProperty -> SavedProperty
    
    SyncProperty is a silly and confusing name.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761202

 src/box-config.vala      |   16 ++++++++--------
 src/libvirt-machine.vala |    8 ++++----
 src/spice-display.vala   |   12 ++++++------
 src/vnc-display.vala     |    8 ++++----
 4 files changed, 22 insertions(+), 22 deletions(-)
---
diff --git a/src/box-config.vala b/src/box-config.vala
index f43f4ab..ff4e01a 100644
--- a/src/box-config.vala
+++ b/src/box-config.vala
@@ -1,7 +1,7 @@
 // This file is part of GNOME Boxes. License: LGPLv2+
 
 public class Boxes.BoxConfig: GLib.Object, Boxes.IConfig {
-    public struct SyncProperty {
+    public struct SavedProperty {
         string name;
         Value default_value;
     }
@@ -41,14 +41,14 @@ public class Boxes.BoxConfig: GLib.Object, Boxes.IConfig {
     public int64 access_first_time { set; get; }
     public int64 access_total_time { set; get; } // in seconds
     public int64 access_ntimes { set; get; }
-    private SyncProperty[] access_properties;
+    private SavedProperty[] access_properties;
 
     construct {
         access_properties = {
-            SyncProperty () { name = "access-last-time", default_value = (int64) (-1) },
-            SyncProperty () { name = "access-first-time", default_value = (int64) (-1) },
-            SyncProperty () { name = "access-total-time", default_value = (int64) (-1) },
-            SyncProperty () { name = "access-ntimes", default_value = (uint64) 0 }
+            SavedProperty () { name = "access-last-time", default_value = (int64) (-1) },
+            SavedProperty () { name = "access-first-time", default_value = (int64) (-1) },
+            SavedProperty () { name = "access-total-time", default_value = (int64) (-1) },
+            SavedProperty () { name = "access-ntimes", default_value = (uint64) 0 }
         };
     }
 
@@ -58,7 +58,7 @@ public class Boxes.BoxConfig: GLib.Object, Boxes.IConfig {
         warn_if_fail (group.has_prefix ("display"));
         this.group = group;
 
-        sync_properties (this, access_properties);
+        save_properties (this, access_properties);
     }
 
     public void delete () {
@@ -143,7 +143,7 @@ public class Boxes.BoxConfig: GLib.Object, Boxes.IConfig {
         object.set_property (property_name, value);
     }
 
-    public void sync_properties (Object object, SyncProperty[] properties) {
+    public void save_properties (Object object, SavedProperty[] properties) {
         foreach (var prop in properties)
             load_property (object, prop.name, prop.default_value);
 
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index 5722bcc..ec4ea6d 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -124,7 +124,7 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
 
     private GVir.Connection system_virt_connection;
 
-    private BoxConfig.SyncProperty[] sync_properties;
+    private BoxConfig.SavedProperty[] saved_properties;
 
     construct {
         stats = new MachineStat[STATS_SIZE];
@@ -238,11 +238,11 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
         update_info ();
         source.notify["uri"].connect (update_info);
 
-        sync_properties = {
-            BoxConfig.SyncProperty () { name = "run-in-bg", default_value = false },
+        saved_properties = {
+            BoxConfig.SavedProperty () { name = "run-in-bg", default_value = false },
         };
 
-        this.config.sync_properties (this, sync_properties);
+        this.config.save_properties (this, saved_properties);
     }
 
     private void update_cpu_stat (DomainInfo info, ref MachineStat stat) {
diff --git a/src/spice-display.vala b/src/spice-display.vala
index f9984b7..fe5109a 100644
--- a/src/spice-display.vala
+++ b/src/spice-display.vala
@@ -15,8 +15,8 @@ private class Boxes.SpiceDisplay: Boxes.Display {
     private unowned Spice.Audio audio;
     private ulong channel_new_id;
     private ulong channel_destroy_id;
-    private BoxConfig.SyncProperty[] display_sync_properties;
-    private BoxConfig.SyncProperty[] gtk_session_sync_properties;
+    private BoxConfig.SavedProperty[] display_saved_properties;
+    private BoxConfig.SavedProperty[] gtk_session_saved_properties;
     private bool closed;
 
     private GLib.HashTable<Spice.Channel,SpiceChannelHandler> channel_handlers;
@@ -37,8 +37,8 @@ private class Boxes.SpiceDisplay: Boxes.Display {
     }
 
     construct {
-        gtk_session_sync_properties = {
-            BoxConfig.SyncProperty () { name = "auto-clipboard", default_value = true },
+        gtk_session_saved_properties = {
+            BoxConfig.SavedProperty () { name = "auto-clipboard", default_value = true },
         };
 
         need_password = false;
@@ -58,7 +58,7 @@ private class Boxes.SpiceDisplay: Boxes.Display {
         }
 
         this.notify["config"].connect (() => {
-            config.sync_properties (gtk_session, gtk_session_sync_properties);
+            config.save_properties (gtk_session, gtk_session_saved_properties);
         });
     }
 
@@ -145,7 +145,7 @@ private class Boxes.SpiceDisplay: Boxes.Display {
             display.keyboard_grab.connect((status) => {
                 keyboard_grabbed = status != 0;
             });
-            config.sync_properties (this, display_sync_properties);
+            config.save_properties (this, display_saved_properties);
             display.scaling = true;
 
             displays.replace (n, display);
diff --git a/src/vnc-display.vala b/src/vnc-display.vala
index 8cf5d42..4ca84a8 100644
--- a/src/vnc-display.vala
+++ b/src/vnc-display.vala
@@ -9,11 +9,11 @@ private class Boxes.VncDisplay: Boxes.Display {
     private string host;
     private int port;
     private Gtk.Window window;
-    private BoxConfig.SyncProperty[] sync_properties;
+    private BoxConfig.SavedProperty[] saved_properties;
 
     construct {
-        sync_properties = {
-            BoxConfig.SyncProperty () { name = "read-only", default_value = false }
+        saved_properties = {
+            BoxConfig.SavedProperty () { name = "read-only", default_value = false }
         };
         need_password = false;
 
@@ -71,7 +71,7 @@ private class Boxes.VncDisplay: Boxes.Display {
         });
 
         this.notify["config"].connect (() => {
-            config.sync_properties (display, sync_properties);
+            config.save_properties (display, saved_properties);
         });
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]