[gnome-calendar] Add some details to the about dialog
- From: Erick PÃrez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] Add some details to the about dialog
- Date: Fri, 13 Jul 2012 13:59:52 +0000 (UTC)
commit 5f58dc0692c2cd72ff8a7885d6fdc9168ac31f5f
Author: William Jon McCann <jmccann redhat com>
Date: Fri Jul 13 09:38:19 2012 -0400
Add some details to the about dialog
src/gcal-application.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-application.c b/src/gcal-application.c
index 1fb1424..3e2987b 100644
--- a/src/gcal-application.c
+++ b/src/gcal-application.c
@@ -250,10 +250,38 @@ gcal_application_show_about (GSimpleAction *simple,
gpointer user_data)
{
GcalApplication *app = GCAL_APPLICATION (user_data);
+ char *copyright;
+ GDateTime *date;
+ int created_year = 2012;
+ const gchar *authors[] = {
+ "Erick PÃrez Castellanos <erickpc gnome org>",
+ NULL
+ };
+
+ date = g_date_time_new_now_local ();
+
+ if (g_date_time_get_year (date) == created_year)
+ {
+ copyright = g_strdup_printf (_("Copyright \xC2\xA9 %Id "
+ "The Calendar authors"),
+ created_year);
+ }
+ else
+ {
+ copyright = g_strdup_printf (_("Copyright \xC2\xA9 %Id\xE2\x80\x93%Id "
+ "The Calendar authors"),
+ created_year, g_date_time_get_year (date));
+ }
gtk_show_about_dialog (GTK_WINDOW (app->priv->window),
"program-name", "Calendar",
+ "version", VERSION,
+ "copyright", copyright,
+ "authors", authors,
+ "logo-icon-name", "x-office-calendar",
NULL);
+ g_free (copyright);
+ g_date_time_unref (date);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]