[gnome-todo/wip/sadiq/fixes] application: Simplify setting copyright year



commit bdd160fbb3fa9111f56b90e07651d454091fadfa
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Wed Sep 5 20:52:10 2018 +0530

    application: Simplify setting copyright year
    
    Don't guess the current year from user's date. This could break
    if the system time is wrong (eg: CMOS battery broken).
    Also, legally one can't indefinitely extend the copyright.

 src/gtd-application.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)
---
diff --git a/src/gtd-application.c b/src/gtd-application.c
index 62530ce..6470b3a 100644
--- a/src/gtd-application.c
+++ b/src/gtd-application.c
@@ -117,10 +117,7 @@ gtd_application_show_about (GSimpleAction *simple,
                             GVariant      *parameter,
                             gpointer       user_data)
 {
-  g_autofree gchar *copyright = NULL;
-  g_autoptr (GDateTime) date = NULL;
   GtdApplication *self;
-  gint created_year = 2015;
 
   static const gchar *authors[] = {
     "Emmanuele Bassi <ebassi gnome org>",
@@ -139,23 +136,11 @@ gtd_application_show_about (GSimpleAction *simple,
   };
 
   self = GTD_APPLICATION (user_data);
-  date = g_date_time_new_now_local ();
-
-  if (g_date_time_get_year (date) <= created_year)
-    {
-      copyright = g_strdup_printf (_("Copyright \xC2\xA9 %1$d "
-                                     "The To Do authors"), created_year);
-    }
-  else
-    {
-      copyright = g_strdup_printf (_("Copyright \xC2\xA9 %1$d\xE2\x80\x93%2$d "
-                                     "The To Do authors"), created_year, g_date_time_get_year (date));
-    }
 
   gtk_show_about_dialog (GTK_WINDOW (self->window),
                          "program-name", _("To Do"),
                          "version", VERSION,
-                         "copyright", copyright,
+                         "copyright", _("Copyright \xC2\xA9 2015–2018 The To Do authors"),
                          "license-type", GTK_LICENSE_GPL_3_0,
                          "authors", authors,
                          "artists", artists,


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