]> git.0d.be Git - empathy.git/blob - libempathy-gtk/gossip-about-dialog.c
7b5990c5007dc5398b2864e3c5cb146161e2e91e
[empathy.git] / libempathy-gtk / gossip-about-dialog.c
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2006-2007 Imendio AB
4  * Copyright (C) 2007 Collabora Ltd.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public
17  * License along with this program; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  * 
21  * Authors: Martyn Russell <martyn@imendio.com>
22  *          Xavier Claessens <xclaesse@gmail.com>
23  */
24
25 #include "config.h"
26
27 #include <glib/gi18n.h>
28 #include <gtk/gtkaboutdialog.h>
29 #include <gtk/gtksizegroup.h>
30 #include <glade/glade.h>
31
32 #include "gossip-about-dialog.h"
33 #include "gossip-ui-utils.h"
34
35 #define WEB_SITE "http://telepathy.freedesktop.org/wiki/Empathy"
36
37 static void about_dialog_activate_link_cb (GtkAboutDialog  *about,
38                                            const gchar     *link,
39                                            gpointer         data);
40
41 static const char *authors[] = {
42         "Mikael Hallendal",
43         "Richard Hult",
44         "Martyn Russell",
45         "Geert-Jan Van den Bogaerde",
46         "Kevin Dougherty",
47         "Eitan Isaacson",
48         "Xavier Claessens",
49         NULL
50 };
51
52 static const char *documenters[] = {
53         NULL
54 };
55
56 static const char *artists[] = {
57         NULL
58 };
59
60 static const char *license[] = {
61         N_("Empathy is free software; you can redistribute it and/or modify "
62            "it under the terms of the GNU General Public License as published by "
63            "the Free Software Foundation; either version 2 of the License, or "
64            "(at your option) any later version."),
65         N_("Empathy is distributed in the hope that it will be useful, "
66            "but WITHOUT ANY WARRANTY; without even the implied warranty of "
67            "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the "
68            "GNU General Public License for more details."),
69         N_("You should have received a copy of the GNU General Public License "
70            "along with Empathy; if not, write to the Free Software Foundation, Inc., "
71            "51 Franklin Street, Fifth Floor, Boston, MA 02110-130159 USA")
72 };
73
74 static void
75 about_dialog_activate_link_cb (GtkAboutDialog *about,
76                                const gchar    *link,
77                                gpointer        data)
78 {
79         gossip_url_show (link);
80 }
81
82 void
83 gossip_about_dialog_new (GtkWindow *parent)
84 {
85         gchar *license_trans;
86
87         gtk_about_dialog_set_url_hook (about_dialog_activate_link_cb, NULL, NULL);
88
89         license_trans = g_strconcat (_(license[0]), "\n\n",
90                                      _(license[1]), "\n\n",
91                                      _(license[2]), "\n\n",
92                                      NULL);
93
94         gtk_show_about_dialog (parent,
95                                "artists", artists,
96                                "authors", authors,
97                                "comments", _("An Instant Messaging client for GNOME"),
98                                "license", license_trans,
99                                "wrap-license", TRUE,
100                                "copyright", "Imendio AB 2002-2007\nCollabora Ltd 2007",
101                                "documenters", documenters,
102                                "logo-icon-name", "empathy",
103                                "translator-credits", _("translator-credits"),
104                                "version", PACKAGE_VERSION,
105                                "website", WEB_SITE,
106                                NULL);
107
108         g_free (license_trans);
109 }
110
111