[gnome-clocks] Wrap extra long lines



commit c51b62b9962afc1feb96f85cbd66c137ff08fa16
Author: Ankit <ankitstarski gmail com>
Date:   Wed Feb 25 02:59:22 2015 +0530

    Wrap extra long lines
    
    Lines with length greater than 120 were wrapped in order to
    make code more readable.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744906

 src/alarm.vala     |    5 ++++-
 src/geocoding.vala |    3 ++-
 src/stopwatch.vala |   12 ++++++++++--
 src/widgets.vala   |   21 +++++++++++++++++----
 src/world.vala     |    8 ++++++--
 5 files changed, 39 insertions(+), 10 deletions(-)
---
diff --git a/src/alarm.vala b/src/alarm.vala
index 13265e4..056b707 100644
--- a/src/alarm.vala
+++ b/src/alarm.vala
@@ -223,7 +223,10 @@ private class Item : Object, ContentItem {
         return state != last_state;
     }
 
-    public void get_thumb_properties (out string text, out string subtext, out Gdk.Pixbuf? pixbuf, out 
string css_class) {
+    public void get_thumb_properties (out string text,
+                                      out string subtext,
+                                      out Gdk.Pixbuf? pixbuf,
+                                      out string css_class) {
         if (state == State.SNOOZING) {
             text = snooze_time_label;
             subtext = "(%s)".printf(time_label);
diff --git a/src/geocoding.vala b/src/geocoding.vala
index 2a06662..2c06ba3 100644
--- a/src/geocoding.vala
+++ b/src/geocoding.vala
@@ -167,7 +167,8 @@ public class Info : Object {
         double lon1 = deg_to_rad (longitude1);
         double lon2 = deg_to_rad (longitude2);
 
-        return Math.acos (Math.cos (lat1) * Math.cos (lat2) * Math.cos (lon1 - lon2) + Math.sin (lat1) * 
Math.sin (lat2)) * earth_radius;
+        return Math.acos (Math.cos (lat1) * Math.cos (lat2) * Math.cos (lon1 - lon2) +
+                          Math.sin (lat1) * Math.sin (lat2)) * earth_radius;
     }
 
     private async void search_locations (GWeather.Location location) {
diff --git a/src/stopwatch.vala b/src/stopwatch.vala
index 0cff95b..00cec8c 100644
--- a/src/stopwatch.vala
+++ b/src/stopwatch.vala
@@ -44,7 +44,11 @@ public class Frame : AnalogFrame {
         var color = context.get_color (Gtk.StateFlags.NORMAL);
         var progress = ((double) seconds + millisecs) / 60;
         if (progress > 0) {
-            cr.arc (center_x, center_y, radius - LINE_WIDTH / 2, 1.5  * Math.PI, (1.5 + progress * 2 ) * 
Math.PI);
+            cr.arc (center_x,
+                    center_y,
+                    radius - LINE_WIDTH / 2,
+                    1.5  * Math.PI,
+                    (1.5 + progress * 2 ) * Math.PI);
             Gdk.cairo_set_source_rgba (cr, color);
             cr.stroke ();
         }
@@ -58,7 +62,11 @@ public class Frame : AnalogFrame {
         color = context.get_color (Gtk.StateFlags.NORMAL);
         progress = millisecs;
         if (progress > 0) {
-            cr.arc (center_x, center_y, radius - LINE_WIDTH / 2, (1.5 + progress * 2 ) * Math.PI - 0.1, (1.5 
+ progress * 2 ) * Math.PI + 0.1);
+            cr.arc (center_x,
+                    center_y,
+                    radius - LINE_WIDTH / 2,
+                    (1.5 + progress * 2 ) * Math.PI - 0.1,
+                    (1.5 + progress * 2 ) * Math.PI + 0.1);
             Gdk.cairo_set_source_rgba (cr, color);
             cr.stroke ();
         }
diff --git a/src/widgets.vala b/src/widgets.vala
index 50865b8..87d89ca 100644
--- a/src/widgets.vala
+++ b/src/widgets.vala
@@ -80,7 +80,11 @@ private class TitleRenderer : Gtk.CellRendererText {
         ICON_SIZE = 18;
     }
 
-    public override void render (Cairo.Context cr, Gtk.Widget widget, Gdk.Rectangle background_area, 
Gdk.Rectangle cell_area, Gtk.CellRendererState flags) {
+    public override void render (Cairo.Context cr,
+                                 Gtk.Widget widget,
+                                 Gdk.Rectangle background_area,
+                                 Gdk.Rectangle cell_area,
+                                 Gtk.CellRendererState flags) {
         base.render (cr, widget, cell_area, cell_area, flags);
 
         if (title_icon != null) {
@@ -139,7 +143,11 @@ private class DigitalClockRenderer : Gtk.CellRendererPixbuf {
     public DigitalClockRenderer () {
     }
 
-    public override void render (Cairo.Context cr, Gtk.Widget widget, Gdk.Rectangle background_area, 
Gdk.Rectangle cell_area, Gtk.CellRendererState flags) {
+    public override void render (Cairo.Context cr,
+                                 Gtk.Widget widget,
+                                 Gdk.Rectangle background_area,
+                                 Gdk.Rectangle cell_area,
+                                 Gtk.CellRendererState flags) {
         var context = widget.get_style_context ();
 
         context.save ();
@@ -248,7 +256,10 @@ public interface ContentItem : GLib.Object {
     public abstract string title_icon { get; set; default = null; }
     public abstract bool selectable { get; set; default = true; }
 
-    public abstract void get_thumb_properties (out string text, out string subtext, out Gdk.Pixbuf? pixbuf, 
out string css_class);
+    public abstract void get_thumb_properties (out string text,
+                                               out string subtext,
+                                               out Gdk.Pixbuf? pixbuf,
+                                               out string css_class);
 }
 
 private class IconView : Gtk.IconView {
@@ -296,7 +307,9 @@ private class IconView : Gtk.IconView {
         set_margin (12);
 
         var tile_width = DigitalClockRenderer.TILE_SIZE + 2 * DigitalClockRenderer.TILE_MARGIN;
-        var tile_height = DigitalClockRenderer.TILE_SIZE + DigitalClockRenderer.TILE_MARGIN + 
DigitalClockRenderer.TILE_MARGIN_BOTTOM;
+        var tile_height = DigitalClockRenderer.TILE_SIZE +
+                          DigitalClockRenderer.TILE_MARGIN +
+                          DigitalClockRenderer.TILE_MARGIN_BOTTOM;
 
         thumb_renderer = new DigitalClockRenderer ();
         thumb_renderer.set_alignment (0.5f, 0.5f);
diff --git a/src/world.vala b/src/world.vala
index 1ebca32..9c7ba27 100644
--- a/src/world.vala
+++ b/src/world.vala
@@ -140,7 +140,10 @@ public class Item : Object, ContentItem {
                                                    enabled_providers: GWeather.Provider.NONE);
     }
 
-    public void get_thumb_properties (out string text, out string subtext, out Gdk.Pixbuf? pixbuf, out 
string css_class) {
+    public void get_thumb_properties (out string text,
+                                      out string subtext,
+                                      out Gdk.Pixbuf? pixbuf,
+                                      out string css_class) {
         text = time_label;
         subtext = day_label;
         if (is_daytime) {
@@ -204,7 +207,8 @@ private class LocationDialog : Gtk.Dialog {
                 t = l.get_timezone ();
 
                 if (t == null) {
-                    GLib.warning ("Timezone not defined for %s. This is a bug in libgweather database", 
l.get_city_name ());
+                    GLib.warning ("Timezone not defined for %s. This is a bug in libgweather database",
+                                  l.get_city_name ());
                 }
             }
         }


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