diff options
-rw-r--r-- | libempathy-gtk/Makefile.am | 1 | ||||
-rw-r--r-- | libempathy-gtk/empathy-main-window.c | 4 | ||||
-rw-r--r-- | libempathy-gtk/gossip-about-dialog.c | 111 | ||||
-rw-r--r-- | libempathy-gtk/gossip-about-dialog.h | 34 | ||||
-rw-r--r-- | src/empathy-main.c | 2 |
5 files changed, 151 insertions, 1 deletions
diff --git a/libempathy-gtk/Makefile.am b/libempathy-gtk/Makefile.am index 1810fc4cf..057b80ef1 100644 --- a/libempathy-gtk/Makefile.am +++ b/libempathy-gtk/Makefile.am @@ -29,6 +29,7 @@ libempathy_gtk_la_SOURCES = \ gossip-geometry.c gossip-geometry.h \ gossip-status-presets.c gossip-status-presets.h \ gossip-presence-chooser.c gossip-presence-chooser.h \ + gossip-about-dialog.c gossip-about-dialog.h \ gossip-ui-utils.c gossip-ui-utils.h libempathy_gtk_la_LIBADD = \ diff --git a/libempathy-gtk/empathy-main-window.c b/libempathy-gtk/empathy-main-window.c index b53f66663..ecb836275 100644 --- a/libempathy-gtk/empathy-main-window.c +++ b/libempathy-gtk/empathy-main-window.c @@ -41,6 +41,8 @@ #include "gossip-geometry.h" #include "gossip-preferences.h" #include "gossip-accounts-dialog.h" +#include "gossip-about-dialog.h" + #define DEBUG_DOMAIN "MainWindow" @@ -517,7 +519,7 @@ static void main_window_help_about_cb (GtkWidget *widget, EmpathyMainWindow *window) { - //gossip_about_dialog_new (GTK_WINDOW (window->window)); + gossip_about_dialog_new (GTK_WINDOW (window->window)); } static void diff --git a/libempathy-gtk/gossip-about-dialog.c b/libempathy-gtk/gossip-about-dialog.c new file mode 100644 index 000000000..7b5990c50 --- /dev/null +++ b/libempathy-gtk/gossip-about-dialog.c @@ -0,0 +1,111 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Copyright (C) 2006-2007 Imendio AB + * Copyright (C) 2007 Collabora Ltd. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: Martyn Russell <martyn@imendio.com> + * Xavier Claessens <xclaesse@gmail.com> + */ + +#include "config.h" + +#include <glib/gi18n.h> +#include <gtk/gtkaboutdialog.h> +#include <gtk/gtksizegroup.h> +#include <glade/glade.h> + +#include "gossip-about-dialog.h" +#include "gossip-ui-utils.h" + +#define WEB_SITE "http://telepathy.freedesktop.org/wiki/Empathy" + +static void about_dialog_activate_link_cb (GtkAboutDialog *about, + const gchar *link, + gpointer data); + +static const char *authors[] = { + "Mikael Hallendal", + "Richard Hult", + "Martyn Russell", + "Geert-Jan Van den Bogaerde", + "Kevin Dougherty", + "Eitan Isaacson", + "Xavier Claessens", + NULL +}; + +static const char *documenters[] = { + NULL +}; + +static const char *artists[] = { + NULL +}; + +static const char *license[] = { + N_("Empathy is free software; you can redistribute it and/or modify " + "it under the terms of the GNU General Public License as published by " + "the Free Software Foundation; either version 2 of the License, or " + "(at your option) any later version."), + N_("Empathy is distributed in the hope that it will be useful, " + "but WITHOUT ANY WARRANTY; without even the implied warranty of " + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " + "GNU General Public License for more details."), + N_("You should have received a copy of the GNU General Public License " + "along with Empathy; if not, write to the Free Software Foundation, Inc., " + "51 Franklin Street, Fifth Floor, Boston, MA 02110-130159 USA") +}; + +static void +about_dialog_activate_link_cb (GtkAboutDialog *about, + const gchar *link, + gpointer data) +{ + gossip_url_show (link); +} + +void +gossip_about_dialog_new (GtkWindow *parent) +{ + gchar *license_trans; + + gtk_about_dialog_set_url_hook (about_dialog_activate_link_cb, NULL, NULL); + + license_trans = g_strconcat (_(license[0]), "\n\n", + _(license[1]), "\n\n", + _(license[2]), "\n\n", + NULL); + + gtk_show_about_dialog (parent, + "artists", artists, + "authors", authors, + "comments", _("An Instant Messaging client for GNOME"), + "license", license_trans, + "wrap-license", TRUE, + "copyright", "Imendio AB 2002-2007\nCollabora Ltd 2007", + "documenters", documenters, + "logo-icon-name", "empathy", + "translator-credits", _("translator-credits"), + "version", PACKAGE_VERSION, + "website", WEB_SITE, + NULL); + + g_free (license_trans); +} + + diff --git a/libempathy-gtk/gossip-about-dialog.h b/libempathy-gtk/gossip-about-dialog.h new file mode 100644 index 000000000..0e5b9d4fb --- /dev/null +++ b/libempathy-gtk/gossip-about-dialog.h @@ -0,0 +1,34 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Copyright (C) 2006-2007 Imendio AB + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: Martyn Russell <martyn@imendio.com> + */ + +#ifndef __GOSSIP_ABOUT_DIALOG_H__ +#define __GOSSIP_ABOUT_DIALOG_H__ + +#include <gtk/gtkwindow.h> + +G_BEGIN_DECLS + +void gossip_about_dialog_new (GtkWindow *parent); + +G_END_DECLS + +#endif /* __GOSSIP_ABOUT_DIALOG_H__ */ diff --git a/src/empathy-main.c b/src/empathy-main.c index d693ba6b5..8dcc52c4b 100644 --- a/src/empathy-main.c +++ b/src/empathy-main.c @@ -133,6 +133,8 @@ main (int argc, char *argv[]) gtk_init (&argc, &argv); + g_set_application_name (PACKAGE_NAME); + /* Setting up channel filter */ filter = empathy_filter_new (); g_signal_connect (filter, "new-channel", |