[gnome-control-center] common: Fix codying-style in cc_util_get_smart_date()



commit 5ebf3d8ddf454bdb6e62b10bf586fb471a63b626
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Feb 26 16:07:55 2016 +0000

    common: Fix codying-style in cc_util_get_smart_date()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761245

 panels/common/cc-util.c |   37 +++++++++++++++++++++----------------
 1 files changed, 21 insertions(+), 16 deletions(-)
---
diff --git a/panels/common/cc-util.c b/panels/common/cc-util.c
index 141856a..2153a0b 100644
--- a/panels/common/cc-util.c
+++ b/panels/common/cc-util.c
@@ -120,22 +120,27 @@ cc_util_get_smart_date (GDateTime *date)
                                        0, 0, 0);
 
         span = g_date_time_difference (today, date);
-        if (span <= 0) {
-                label = g_strdup (_("Today"));
-        }
-        else if (span <= G_TIME_SPAN_DAY) {
-                label = g_strdup (_("Yesterday"));
-        }
-        else {
-                if (g_date_time_get_year (date) == g_date_time_get_year (today)) {
-                        /* Translators: This is a date format string in the style of "Feb 24". */
-                        label = g_date_time_format (date, _("%b %e"));
-                }
-                else {
-                        /* Translators: This is a date format string in the style of "Feb 24, 2013". */
-                        label = g_date_time_format (date, _("%b %e, %Y"));
-                }
-        }
+        if (span <= 0)
+          {
+            label = g_strdup (_("Today"));
+          }
+        else if (span <= G_TIME_SPAN_DAY)
+          {
+            label = g_strdup (_("Yesterday"));
+          }
+        else
+          {
+            if (g_date_time_get_year (date) == g_date_time_get_year (today))
+              {
+                /* Translators: This is a date format string in the style of "Feb 24". */
+                label = g_date_time_format (date, _("%b %e"));
+              }
+            else
+              {
+                /* Translators: This is a date format string in the style of "Feb 24, 2013". */
+                label = g_date_time_format (date, _("%b %e, %Y"));
+              }
+          }
 
         g_date_time_unref (local);
         g_date_time_unref (today);


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