[gnome-boxes] machine: Fix some methods visibility



commit 35d52d69355f7ebf602edda9d1b74004343a6d2b
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Fri Jul 6 10:31:04 2012 +0200

    machine: Fix some methods visibility
    
    Some methods from the Machine class were public while they are
    not really useful in the public interface. Mark these as protected
    or private.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=681747

 src/libvirt-machine.vala |    2 +-
 src/machine.vala         |   12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index 561cc53..8846421 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -336,7 +336,7 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
         }
     }
 
-    public override async Gdk.Pixbuf? take_screenshot () throws GLib.Error {
+    protected override async Gdk.Pixbuf? take_screenshot () throws GLib.Error {
         var state = DomainState.NONE;
         try {
             state = (yield domain.get_info_async (null)).state;
diff --git a/src/machine.vala b/src/machine.vala
index 5e5b4f8..fe04f28 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -5,7 +5,7 @@ using Gtk;
 
 private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesProvider {
     public override Clutter.Actor actor { get { return machine_actor.actor; } }
-    public MachineActor machine_actor;
+    private MachineActor machine_actor;
     public Boxes.CollectionSource source;
     public Boxes.BoxConfig config;
     public Gdk.Pixbuf? pixbuf { get; set; }
@@ -185,7 +185,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
 
     }
 
-    public void load_screenshot () {
+    protected void load_screenshot () {
         try {
             var screenshot = new Gdk.Pixbuf.from_file (get_screenshot_filename ());
             set_screenshot (screenshot, false);
@@ -193,7 +193,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
         }
     }
 
-    public void set_screenshot_enable (bool enable) {
+    protected void set_screenshot_enable (bool enable) {
         if (enable) {
             if (screenshot_id != 0)
                 return;
@@ -236,7 +236,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
     protected virtual async void save_real () throws GLib.Error {
     }
 
-    public virtual async Gdk.Pixbuf? take_screenshot () throws GLib.Error {
+    protected virtual async Gdk.Pixbuf? take_screenshot () throws GLib.Error {
         return null;
     }
 
@@ -332,7 +332,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
         return energy / h;
     }
 
-    public void set_screenshot (Gdk.Pixbuf? large_screenshot, bool save) {
+    private void set_screenshot (Gdk.Pixbuf? large_screenshot, bool save) {
         if (large_screenshot != null) {
             var pw = large_screenshot.get_width ();
             var ph = large_screenshot.get_height ();
@@ -368,7 +368,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
     }
 
     int screenshot_counter;
-    public async void update_screenshot (bool force_save = false, bool first_check = false) {
+    private async void update_screenshot (bool force_save = false, bool first_check = false) {
         if (updating_screenshot)
             return;
 



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