[gnome-boxes] Make utils' public



commit 8d9cdf4b3d36bf0ac54677a4f35de291b95fce19
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Oct 28 16:04:16 2011 +0300

    Make utils' public
    
    This rids of loads of 'unused identifier' warnings.

 src/util.vala |   56 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 28 insertions(+), 28 deletions(-)
---
diff --git a/src/util.vala b/src/util.vala
index 40b0e8c..1af2193 100644
--- a/src/util.vala
+++ b/src/util.vala
@@ -3,29 +3,29 @@ using Gtk;
 using Config;
 using Xml;
 
-private errordomain Boxes.Error {
+public errordomain Boxes.Error {
     INVALID
 }
 
 namespace Boxes {
     // FIXME: Remove these when we can use Vala release that provides binding for gdkkeysyms.h
-    private const uint F10_KEY = 0xffc7;
-    private const uint F11_KEY = 0xffc8;
-    private const uint F12_KEY = 0xffc9;
+    public const uint F10_KEY = 0xffc7;
+    public const uint F11_KEY = 0xffc8;
+    public const uint F12_KEY = 0xffc9;
 
-    private string get_pkgdata (string? file_name = null) {
+    public string get_pkgdata (string? file_name = null) {
         return Path.build_filename (DATADIR, Config.PACKAGE_TARNAME, file_name);
     }
 
-    private string get_style (string? file_name = null) {
+    public string get_style (string? file_name = null) {
         return Path.build_filename (get_pkgdata (), "style", file_name);
     }
 
-    private string get_pixmap (string? file_name = null) {
+    public string get_pixmap (string? file_name = null) {
         return Path.build_filename (get_pkgdata (), "pixmaps", file_name);
     }
 
-    private string get_unattended_dir (string? file_name = null) {
+    public string get_unattended_dir (string? file_name = null) {
         var dir = Path.build_filename (get_pkgdata (), "unattended");
 
         ensure_directory (dir);
@@ -33,7 +33,7 @@ namespace Boxes {
         return Path.build_filename (dir, file_name);
     }
 
-    private string get_user_unattended_dir (string? file_name = null) {
+    public string get_user_unattended_dir (string? file_name = null) {
         var dir = Path.build_filename (get_pkgconfig (), "unattended", file_name);
 
         ensure_directory (dir);
@@ -41,11 +41,11 @@ namespace Boxes {
         return Path.build_filename (dir, file_name);
     }
 
-    private string get_pkgdata_source (string? file_name = null) {
+    public string get_pkgdata_source (string? file_name = null) {
         return Path.build_filename (get_pkgdata (), "sources", file_name);
     }
 
-    private string get_pkgcache (string? file_name = null) {
+    public string get_pkgcache (string? file_name = null) {
         var dir = Path.build_filename (Environment.get_user_cache_dir (), Config.PACKAGE_TARNAME);
 
         ensure_directory (dir);
@@ -53,7 +53,7 @@ namespace Boxes {
         return Path.build_filename (dir, file_name);
     }
 
-    private string get_pkgconfig (string? file_name = null) {
+    public string get_pkgconfig (string? file_name = null) {
         var dir = Path.build_filename (Environment.get_user_config_dir (), Config.PACKAGE_TARNAME);
 
         ensure_directory (dir);
@@ -61,11 +61,11 @@ namespace Boxes {
         return Path.build_filename (dir, file_name);
     }
 
-    private bool has_pkgconfig_sources () {
+    public bool has_pkgconfig_sources () {
         return FileUtils.test (Path.build_filename (get_pkgconfig (), "sources"), FileTest.IS_DIR);
     }
 
-    private string get_pkgconfig_source (string? file_name = null) {
+    public string get_pkgconfig_source (string? file_name = null) {
         var dir = Path.build_filename (get_pkgconfig (), "sources");
 
         ensure_directory (dir);
@@ -73,7 +73,7 @@ namespace Boxes {
         return Path.build_filename (dir, file_name);
     }
 
-    private void ensure_directory (string dir) {
+    public void ensure_directory (string dir) {
         try {
             var file = GLib.File.new_for_path (dir);
             file.make_directory_with_parents (null);
@@ -84,7 +84,7 @@ namespace Boxes {
         }
     }
 
-    private Clutter.Color gdk_rgba_to_clutter_color (Gdk.RGBA gdk_rgba) {
+    public Clutter.Color gdk_rgba_to_clutter_color (Gdk.RGBA gdk_rgba) {
         Clutter.Color color = {
             (uint8) (gdk_rgba.red * 255).clamp (0, 255),
             (uint8) (gdk_rgba.green * 255).clamp (0, 255),
@@ -95,7 +95,7 @@ namespace Boxes {
         return color;
     }
 
-    private Gdk.RGBA get_boxes_bg_color () {
+    public Gdk.RGBA get_boxes_bg_color () {
         var style = new Gtk.StyleContext ();
         var path = new Gtk.WidgetPath ();
         path.append_type (typeof (Gtk.Window));
@@ -104,13 +104,13 @@ namespace Boxes {
         return style.get_background_color (0);
     }
 
-    private Gdk.Color get_color (string desc) {
+    public Gdk.Color get_color (string desc) {
         Gdk.Color color;
         Gdk.Color.parse (desc, out color);
         return color;
     }
 
-    private void tree_view_activate_on_single_click (Gtk.TreeView tree_view, bool should_activate) {
+    public void tree_view_activate_on_single_click (Gtk.TreeView tree_view, bool should_activate) {
         var id = tree_view.get_data<ulong> ("boxes-tree-view-activate");
 
         if (id != 0 && should_activate == false) {
@@ -134,7 +134,7 @@ namespace Boxes {
         }
     }
 
-    private async void output_stream_write (OutputStream stream, uint8[] buffer) throws GLib.IOError {
+    public async void output_stream_write (OutputStream stream, uint8[] buffer) throws GLib.IOError {
         var length = buffer.length;
         ssize_t i = 0;
 
@@ -142,7 +142,7 @@ namespace Boxes {
             i += yield stream.write_async (buffer[i:length]);
     }
 
-    private string? extract_xpath (string xmldoc, string xpath, bool required = false) throws Boxes.Error {
+    public string? extract_xpath (string xmldoc, string xpath, bool required = false) throws Boxes.Error {
         var parser = new ParserCtxt ();
         var doc = parser.read_doc (xmldoc, "doc.xml");
 
@@ -164,7 +164,7 @@ namespace Boxes {
         return obj->stringval;
     }
 
-    private bool keyfile_save (KeyFile key_file, string file_name, bool overwrite = false) {
+    public bool keyfile_save (KeyFile key_file, string file_name, bool overwrite = false) {
         try {
             var file = File.new_for_path (file_name);
 
@@ -194,7 +194,7 @@ namespace Boxes {
         }
     }
 
-    private string make_filename (string name) {
+    public string make_filename (string name) {
         var filename = replace_regex (name, "[\\\\/:()<>|?*]", "_");
 
         var tryname = filename;
@@ -205,7 +205,7 @@ namespace Boxes {
         return tryname;
     }
 
-    private void actor_add (Clutter.Actor actor, Clutter.Container container) {
+    public void actor_add (Clutter.Actor actor, Clutter.Container container) {
         if (actor.get_parent () == (Clutter.Actor) container)
             return;
 
@@ -213,7 +213,7 @@ namespace Boxes {
         container.add (actor);
     }
 
-    private void actor_remove (Clutter.Actor actor) {
+    public void actor_remove (Clutter.Actor actor) {
         var container = actor.get_parent () as Clutter.Container;
 
         if (container == null)
@@ -222,11 +222,11 @@ namespace Boxes {
         container.remove (actor);
     }
 
-    private void actor_pin (Clutter.Actor actor) {
+    public void actor_pin (Clutter.Actor actor) {
         actor.set_geometry (actor.get_geometry ());
     }
 
-    private void actor_unpin (Clutter.Actor actor) {
+    public void actor_unpin (Clutter.Actor actor) {
         actor.set_size (-1, -1);
         actor.set_position (-1, -1);
     }
@@ -255,7 +255,7 @@ namespace Boxes {
             parse ();
         }
 
-        private void parse () {
+        public void parse () {
             foreach (var p in query.split ("&")) {
                 var pair = p.split ("=");
                 if (pair.length != 2)



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