[gnome-boxes] Codestyle corrections



commit 7343d75dcf33fe029f7dbfe500feccace6b5d4d2
Author: Lasse Schuirmann <lasse schuirmann net>
Date:   Wed Mar 12 06:13:42 2014 +0100

    Codestyle corrections
    
    This corrects the following things in some sources:
    - space usage instead of tabs
    - newlines before return statements
    - lines that exceed 120 characters
    - some more brackets for better readability
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726227

 src/app-window.vala     |    4 ++++
 src/editable-entry.vala |   10 +++++-----
 src/mini-graph.vala     |    2 +-
 src/vm-creator.vala     |    3 ++-
 src/wizard.vala         |    9 ++++++---
 5 files changed, 18 insertions(+), 10 deletions(-)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index 95a13d8..bc2bc6a 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -161,14 +161,17 @@ private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
 
         if (event.keyval == Gdk.Key.F11) {
             fullscreened = !fullscreened;
+
             return true;
         } else if (event.keyval == Gdk.Key.q &&
                    (event.state & default_modifiers) == Gdk.ModifierType.CONTROL_MASK) {
             App.app.quit_app ();
+
             return true;
         } else if (event.keyval == Gdk.Key.a &&
                    (event.state & default_modifiers) == Gdk.ModifierType.MOD1_MASK) {
             App.app.quit_app ();
+
             return true;
         } else if (event.keyval == Gdk.Key.Left && // ALT + Left -> back
                    (event.state & default_modifiers) == Gdk.ModifierType.MOD1_MASK) {
@@ -211,6 +214,7 @@ private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
             return false;
 
         settings.set_boolean ("window-maximized", maximized);
+
         return false;
     }
 
diff --git a/src/editable-entry.vala b/src/editable-entry.vala
index ea8c2ee..bb70a0c 100644
--- a/src/editable-entry.vala
+++ b/src/editable-entry.vala
@@ -53,9 +53,9 @@ private class Boxes.EditableEntry: Alignment {
     }
 
     private Pango.Weight _weight = Pango.Weight.NORMAL;
-       /* This is disabled for now since its impossible to
-          declare a default for the paramspec, and the number that
-          valac picks (0) is invalid for the Pango.Weight enum.
+    /* This is disabled for now since its impossible to
+       declare a default for the paramspec, and the number that
+       valac picks (0) is invalid for the Pango.Weight enum.
 
     public Pango.Weight weight {
         get { return _weight; }
@@ -68,8 +68,8 @@ private class Boxes.EditableEntry: Alignment {
 
             update_fonts ();
         }
-       }
-       */
+    }
+    */
     public bool weight_set { get; set; }
 
     private double _scale = 1.0;
diff --git a/src/mini-graph.vala b/src/mini-graph.vala
index aa4509a..c96fbed 100644
--- a/src/mini-graph.vala
+++ b/src/mini-graph.vala
@@ -67,7 +67,7 @@ private class Boxes.MiniGraph: Gtk.DrawingArea {
 
         Gdk.cairo_set_source_rgba (cr, style.get_border_color (get_state_flags ()));
         cr.set_line_width (1.0);
-               x = 0.0;
+        x = 0.0;
         foreach (var p in points) {
             var y = height - p * dy;
 
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index 6c44ac9..6d8cbfa 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -45,7 +45,8 @@ private class Boxes.VMCreator {
         try {
             yield install_media.prepare_for_installation (name, cancellable);
         } catch (GLib.Error error) {
-            App.window.notificationbar.display_error (_("An error occurred during installation preparation. 
Express Install disabled."));
+            var msg = _("An error occurred during installation preparation. Express Install disabled.");
+            App.window.notificationbar.display_error (msg);
             debug("Disabling unattended installation: %s", error.message);
         }
 
diff --git a/src/wizard.vala b/src/wizard.vala
index df2f1aa..316aeef 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -53,7 +53,7 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
     public WizardPage page {
         get { return _page; }
         private set {
-            back_button.sensitive = value != WizardPage.INTRODUCTION;
+            back_button.sensitive = (value != WizardPage.INTRODUCTION);
 
             var forwards = value > page;
 
@@ -296,7 +296,8 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
         } catch (IOError.CANCELLED cancel_error) { // We did this, so no warning!
         } catch (GLib.Error error) {
             debug("Failed to analyze installer image: %s", error.message);
-            App.window.notificationbar.display_error (_("Failed to analyze installer media. Corrupted or 
incomplete media?"));
+            var msg = _("Failed to analyze installer media. Corrupted or incomplete media?");
+            App.window.notificationbar.display_error (msg);
             page = WizardPage.SOURCE;
         }
     }
@@ -451,7 +452,9 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
 
             try {
                 var config = null as GVirConfig.Domain;
-                yield run_in_thread (() => { config = libvirt_machine.domain.get_config 
(GVir.DomainXMLFlags.INACTIVE); });
+                yield run_in_thread (() => {
+                    config = libvirt_machine.domain.get_config (GVir.DomainXMLFlags.INACTIVE);
+                });
 
                 var memory = format_size (config.memory * Osinfo.KIBIBYTES, FormatSizeFlags.IEC_UNITS);
                 summary.add_property (_("Memory"), memory);


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