[gnome-clocks] Whitespace cleanup



commit ad729da84874dd5e9e57a99b32b13783668d6fdd
Author: Paolo Borelli <pborelli gnome org>
Date:   Sat Apr 29 23:12:42 2017 +0200

    Whitespace cleanup

 src/alarm.vala   |   36 ++++++++++++++++++------------------
 src/widgets.vala |   16 ++++++++--------
 src/world.vala   |   20 ++++++++++----------
 3 files changed, 36 insertions(+), 36 deletions(-)
---
diff --git a/src/alarm.vala b/src/alarm.vala
index bf5490b..a7fd1a4 100644
--- a/src/alarm.vala
+++ b/src/alarm.vala
@@ -117,8 +117,8 @@ private class Item : Object, ContentItem, ContentThumb {
         bell = new Utils.Bell ("alarm-clock-elapsed");
         notification = new GLib.Notification (_("Alarm"));
         notification.set_body (name);
-        notification.add_button (_("Stop"), "app.stop-alarm::".concat(id));
-        notification.add_button (_("Snooze"), "app.snooze-alarm::".concat(id));
+        notification.add_button (_("Stop"), "app.stop-alarm::".concat (id));
+        notification.add_button (_("Snooze"), "app.snooze-alarm::".concat (id));
     }
 
     public void reset () {
@@ -130,13 +130,13 @@ private class Item : Object, ContentItem, ContentThumb {
     private void update_alarm_time () {
         var wallclock = Utils.WallClock.get_default ();
         var now = wallclock.date_time;
-        var dt = new GLib.DateTime(wallclock.timezone,
-                                   now.get_year (),
-                                   now.get_month (),
-                                   now.get_day_of_month (),
-                                   time.hour,
-                                   time.minute,
-                                   0);
+        var dt = new GLib.DateTime (wallclock.timezone,
+                                    now.get_year (),
+                                    now.get_month (),
+                                    now.get_day_of_month (),
+                                    time.hour,
+                                    time.minute,
+                                    0);
 
         if (days.empty) {
             // Alarm without days.
@@ -378,8 +378,8 @@ private class SetupDialog : Gtk.Dialog {
         if (alarm == null) {
             var wc = Utils.WallClock.get_default ();
             name = _("Alarm");
-            hour = wc.date_time.get_hour();
-            minute = wc.date_time.get_minute();
+            hour = wc.date_time.get_hour ();
+            minute = wc.date_time.get_minute ();
             days = null;
             active = true;
         } else {
@@ -422,7 +422,7 @@ private class SetupDialog : Gtk.Dialog {
 
     // Sets alarm according to the current dialog settings.
     public void apply_to_alarm (Item alarm) {
-        var name = name_entry.get_text();
+        var name = name_entry.get_text ();
         var active = active_switch.active;
         var hour = h_spinbutton.get_value_as_int ();
         var minute = m_spinbutton.get_value_as_int ();
@@ -554,24 +554,24 @@ public class Face : Gtk.Stack, Clocks.Clock {
         alarms = new ContentStore ();
         settings = new GLib.Settings ("org.gnome.clocks");
 
-        var app = GLib.Application.get_default();
+        var app = GLib.Application.get_default ();
         var action = app.lookup_action ("stop-alarm");
         ((GLib.SimpleAction)action).activate.connect ((action, param) => {
             var a = (Item)alarms.find ((a) => {
-                return ((Item)a).id == param.get_string();
+                return ((Item)a).id == param.get_string ();
             });
             if (a != null) {
-                a.stop();
+                a.stop ();
             }
         });
 
         action = app.lookup_action ("snooze-alarm");
         ((GLib.SimpleAction)action).activate.connect ((action, param) => {
             var a = (Item)alarms.find ((a) => {
-                return ((Item)a).id == param.get_string();
+                return ((Item)a).id == param.get_string ();
             });
             if (a != null) {
-                a.snooze();
+                a.snooze ();
             }
         });
 
@@ -599,7 +599,7 @@ public class Face : Gtk.Stack, Clocks.Clock {
         Utils.WallClock.get_default ().tick.connect (() => {
             alarms.foreach ((i) => {
                 var a = (Item)i;
-                if (a.tick()) {
+                if (a.tick ()) {
                     if (a.state == Item.State.RINGING) {
                         show_ringing_panel (a);
                         ring ();
diff --git a/src/widgets.vala b/src/widgets.vala
index a574885..b519b58 100644
--- a/src/widgets.vala
+++ b/src/widgets.vala
@@ -295,7 +295,7 @@ public class ContentStore : GLib.Object, GLib.ListModel {
         return store.get_item (position);
     }
 
-    public void set_sorting(owned CompareDataFunc sort) {
+    public void set_sorting (owned CompareDataFunc sort) {
         sort_func = (owned) sort;
 
         // TODO: we should re-sort, but for now we only
@@ -317,18 +317,18 @@ public class ContentStore : GLib.Object, GLib.ListModel {
         item.notify["selected"].connect (on_item_selection_toggle);
     }
 
-    public delegate void ForeachFunc(ContentItem item);
+    public delegate void ForeachFunc (ContentItem item);
 
-    public void foreach(ForeachFunc func) {
+    public void foreach (ForeachFunc func) {
         var n = store.get_n_items ();
         for (int i = 0; i < n; i++) {
-            func(store.get_object (i) as ContentItem);
+            func (store.get_object (i) as ContentItem);
         }
     }
 
-    public delegate bool FindFunc(ContentItem item);
+    public delegate bool FindFunc (ContentItem item);
 
-    public ContentItem? find(FindFunc func) {
+    public ContentItem? find (FindFunc func) {
         var n = store.get_n_items ();
         for (int i = 0; i < n; i++) {
             var item = store.get_object (i) as ContentItem;
@@ -410,7 +410,7 @@ public class ContentStore : GLib.Object, GLib.ListModel {
         return builder.end ();
     }
 
-    public delegate ContentItem? DeserializeItemFunc(Variant v);
+    public delegate ContentItem? DeserializeItemFunc (Variant v);
 
     public void deserialize (Variant variant, DeserializeItemFunc deserialize_item) {
         foreach (var v in variant) {
@@ -857,7 +857,7 @@ public class AnalogFrame : Gtk.Bin {
         context.restore ();
         cr.restore ();
 
-        return base.draw(cr);
+        return base.draw (cr);
     }
 
     public virtual void draw_progress (Cairo.Context cr, int center_x, int center_y, int radius) {
diff --git a/src/world.vala b/src/world.vala
index 4997730..a484fd0 100644
--- a/src/world.vala
+++ b/src/world.vala
@@ -62,11 +62,11 @@ public class Item : Object, ContentItem, ContentThumb {
 
     public string? state_name {
         owned get {
-            GWeather.Location? parent = location.get_parent();
+            GWeather.Location? parent = location.get_parent ();
 
             if (parent != null) {
-                if (parent.get_level() == GWeather.LocationLevel.ADM1) {
-                    return parent.get_name();
+                if (parent.get_level () == GWeather.LocationLevel.ADM1) {
+                    return parent.get_name ();
                 }
             }
 
@@ -145,7 +145,7 @@ public class Item : Object, ContentItem, ContentThumb {
         Object (location: location);
 
         var weather_time_zone = location.get_timezone ();
-        time_zone = new GLib.TimeZone (weather_time_zone.get_tzid());
+        time_zone = new GLib.TimeZone (weather_time_zone.get_tzid ());
 
         tick ();
     }
@@ -237,7 +237,7 @@ private class LocationDialog : Gtk.Dialog {
             }
         }
 
-        set_response_sensitive(1, l != null && t != null);
+        set_response_sensitive (1, l != null && t != null);
     }
 
     public Item? get_location () {
@@ -281,9 +281,9 @@ public class Face : Gtk.Stack, Clocks.Clock {
         locations = new ContentStore ();
         settings = new GLib.Settings ("org.gnome.clocks");
 
-        locations.set_sorting((item1, item2) => {
-            var offset1 = ((Item) item1).location.get_timezone().get_offset();
-            var offset2 = ((Item) item2).location.get_timezone().get_offset();
+        locations.set_sorting ((item1, item2) => {
+            var offset1 = ((Item) item1).location.get_timezone ().get_offset ();
+            var offset2 = ((Item) item2).location.get_timezone ().get_offset ();
             if (offset1 < offset2)
                 return -1;
             if (offset1 > offset2)
@@ -330,7 +330,7 @@ public class Face : Gtk.Stack, Clocks.Clock {
         // Start ticking...
         Utils.WallClock.get_default ().tick.connect (() => {
             locations.foreach ((l) => {
-                ((Item)l).tick();
+                ((Item)l).tick ();
             });
             content_view.queue_draw ();
             update_standalone ();
@@ -475,7 +475,7 @@ public class Face : Gtk.Stack, Clocks.Clock {
             break;
         case HeaderBar.Mode.STANDALONE:
             if (standalone_location.state_name != null) {
-                header_bar.title = "%s, %s".printf(standalone_location.city_name, 
standalone_location.state_name);
+                header_bar.title = "%s, %s".printf (standalone_location.city_name, 
standalone_location.state_name);
             } else {
                 header_bar.title = standalone_location.city_name;
             }


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