[gnome-boxes] Rename s/DisplayConfig/BoxConfig



commit 720086bafd9c10b0f18b4a2291a79d7a38cd501a
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date:   Wed Oct 24 22:38:47 2012 +0200

    Rename s/DisplayConfig/BoxConfig
    
    https://bugzilla.gnome.org/show_bug.cgi?id=680826

 src/Makefile.am                              |    2 +-
 src/{display-config.vala => box-config.vala} |    4 ++--
 src/display-properties.vala                  |    2 +-
 src/gnome-boxes-search-provider.vala         |   14 +++++++-------
 src/machine.vala                             |    4 ++--
 src/spice-display.vala                       |   14 +++++++-------
 src/vnc-display.vala                         |    8 ++++----
 7 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 72d7aa8..16523cb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -42,8 +42,8 @@ AM_VALAFLAGS =						\
 
 noinst_LIBRARIES = libcommon.a
 libcommon_a_VALASOURCES =			\
+	box-config.vala                         \
 	collection-source.vala			\
-	display-config.vala			\
 	display-properties.vala			\
 	util.vala				\
 	$(NULL)
diff --git a/src/display-config.vala b/src/box-config.vala
similarity index 97%
rename from src/display-config.vala
rename to src/box-config.vala
index b889bab..4c954a7 100644
--- a/src/display-config.vala
+++ b/src/box-config.vala
@@ -1,6 +1,6 @@
 // This file is part of GNOME Boxes. License: LGPLv2+
 
-public class Boxes.DisplayConfig: GLib.Object, Boxes.IConfig {
+public class Boxes.BoxConfig: GLib.Object, Boxes.IConfig {
     public struct SyncProperty {
         string name;
         Value default_value;
@@ -52,7 +52,7 @@ public class Boxes.DisplayConfig: GLib.Object, Boxes.IConfig {
         };
     }
 
-    public DisplayConfig.with_group (CollectionSource source, string group) {
+    public BoxConfig.with_group (CollectionSource source, string group) {
         this.source = source;
 
         warn_if_fail (group.has_prefix ("display"));
diff --git a/src/display-properties.vala b/src/display-properties.vala
index 4f45f94..092a9f0 100644
--- a/src/display-properties.vala
+++ b/src/display-properties.vala
@@ -30,5 +30,5 @@ public class Boxes.DisplayProperties: GLib.Object {
         access_finish ();
     }
 
-    public DisplayConfig? config { get; set; }
+    public BoxConfig? config { get; set; }
 }
diff --git a/src/gnome-boxes-search-provider.vala b/src/gnome-boxes-search-provider.vala
index 53dd166..d1a28e5 100644
--- a/src/gnome-boxes-search-provider.vala
+++ b/src/gnome-boxes-search-provider.vala
@@ -5,15 +5,15 @@ public class Boxes.SearchProvider: Object {
     private SearchProviderApp app;
     private bool loading;
     public bool loaded { get; set; }
-    private HashTable<string, DisplayConfig> boxes;
+    private HashTable<string, BoxConfig> boxes;
     private uint next_id;
 
     public SearchProvider (SearchProviderApp app) {
         this.app = app;
-        boxes = new HashTable<string, DisplayConfig> (str_hash, str_equal);
+        boxes = new HashTable<string, BoxConfig> (str_hash, str_equal);
     }
 
-    private void add_box (DisplayConfig box) {
+    private void add_box (BoxConfig box) {
         var id = next_id++.to_string ();
         box.set_data ("search-id", id);
 
@@ -42,7 +42,7 @@ public class Boxes.SearchProvider: Object {
                 return false;
 
             foreach (var group in source.get_groups ("display")) {
-                var box = new DisplayConfig.with_group (source, group);
+                var box = new BoxConfig.with_group (source, group);
                 add_box (box);
             }
 
@@ -53,7 +53,7 @@ public class Boxes.SearchProvider: Object {
         loading = false;
     }
 
-    private static int compare_boxes (DisplayConfig a, DisplayConfig b) {
+    private static int compare_boxes (BoxConfig a, BoxConfig b) {
         // sort first by last time used
         if (a.access_last_time > b.access_last_time)
             return -1;
@@ -77,7 +77,7 @@ public class Boxes.SearchProvider: Object {
     private async string[] search (owned string[] terms) {
         app.hold ();
         string[] normalized_terms = canonicalize_for_search (string.joinv(" ", terms)).split(" ");
-        var matches = new GenericArray<DisplayConfig> ();
+        var matches = new GenericArray<BoxConfig> ();
 
         debug ("search (%s)", string.joinv (", ", terms));
         if (!loaded)
@@ -88,7 +88,7 @@ public class Boxes.SearchProvider: Object {
                 matches.add (box);
         }
 
-        matches.sort((CompareFunc<DisplayConfig>) compare_boxes);
+        matches.sort((CompareFunc<BoxConfig>) compare_boxes);
         var results = new string[matches.length];
         for (int i = 0; i < matches.length; i++)
             results[i] = matches[i].get_data ("search-id");
diff --git a/src/machine.vala b/src/machine.vala
index d8ade95..cc39364 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -7,7 +7,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
     public override Clutter.Actor actor { get { return machine_actor.actor; } }
     public MachineActor machine_actor;
     public Boxes.CollectionSource source;
-    public Boxes.DisplayConfig config;
+    public Boxes.BoxConfig config;
     public Gdk.Pixbuf? pixbuf { get; set; }
     public bool stay_on_display;
     public string? info { get; set; }
@@ -239,7 +239,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
         if (uuid != null)
             group += " " + uuid;
 
-        config = new DisplayConfig.with_group (source, group);
+        config = new BoxConfig.with_group (source, group);
         if (config.last_seen_name != name)
             config.last_seen_name = name;
 
diff --git a/src/spice-display.vala b/src/spice-display.vala
index 7ba5389..e0a4c82 100644
--- a/src/spice-display.vala
+++ b/src/spice-display.vala
@@ -11,8 +11,8 @@ private class Boxes.SpiceDisplay: Boxes.Display, Boxes.IPropertiesProvider {
     private unowned Spice.Audio audio;
     private ulong channel_new_id;
     private ulong channel_destroy_id;
-    private DisplayConfig.SyncProperty[] display_sync_properties;
-    private DisplayConfig.SyncProperty[] gtk_session_sync_properties;
+    private BoxConfig.SyncProperty[] display_sync_properties;
+    private BoxConfig.SyncProperty[] gtk_session_sync_properties;
     private bool connected;
 
     public bool resize_guest { get; set; }
@@ -28,12 +28,12 @@ private class Boxes.SpiceDisplay: Boxes.Display, Boxes.IPropertiesProvider {
 
     construct {
         display_sync_properties = {
-            DisplayConfig.SyncProperty () { name = "resize-guest", default_value = true }
+            BoxConfig.SyncProperty () { name = "resize-guest", default_value = true }
         };
 
         gtk_session_sync_properties = {
-            DisplayConfig.SyncProperty () { name = "auto-clipboard", default_value = true },
-            DisplayConfig.SyncProperty () { name = "auto-usbredir", default_value = false }
+            BoxConfig.SyncProperty () { name = "auto-clipboard", default_value = true },
+            BoxConfig.SyncProperty () { name = "auto-usbredir", default_value = false }
         };
 
         need_password = false;
@@ -68,14 +68,14 @@ private class Boxes.SpiceDisplay: Boxes.Display, Boxes.IPropertiesProvider {
         main_cleanup ();
     }
 
-    public SpiceDisplay (DisplayConfig config, string host, int port) {
+    public SpiceDisplay (BoxConfig config, string host, int port) {
         this.config = config;
 
         session.port = port.to_string ();
         session.host = host;
     }
 
-    public SpiceDisplay.with_uri (DisplayConfig config, string uri) {
+    public SpiceDisplay.with_uri (BoxConfig config, string uri) {
         this.config = config;
 
         session.uri = uri;
diff --git a/src/vnc-display.vala b/src/vnc-display.vala
index 9a9da52..052d813 100644
--- a/src/vnc-display.vala
+++ b/src/vnc-display.vala
@@ -9,12 +9,12 @@ private class Boxes.VncDisplay: Boxes.Display {
     private string host;
     private int port;
     private Gtk.Window window;
-    private DisplayConfig.SyncProperty[] sync_properties;
+    private BoxConfig.SyncProperty[] sync_properties;
     private bool connected;
 
     construct {
         sync_properties = {
-            DisplayConfig.SyncProperty () { name = "read-only", default_value = false }
+            BoxConfig.SyncProperty () { name = "read-only", default_value = false }
         };
         need_password = false;
 
@@ -76,14 +76,14 @@ private class Boxes.VncDisplay: Boxes.Display {
         });
     }
 
-    public VncDisplay (DisplayConfig config, string host, int port) {
+    public VncDisplay (BoxConfig config, string host, int port) {
         this.config = config;
 
         this.host = host;
         this.port = port;
     }
 
-    public VncDisplay.with_uri (DisplayConfig config, string _uri) throws Boxes.Error {
+    public VncDisplay.with_uri (BoxConfig config, string _uri) throws Boxes.Error {
         this.config = config;
 
         var uri = Xml.URI.parse (_uri);



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