[gnome-hello] Improve About dialog
- From: Javier Jardón <jjardon src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-hello] Improve About dialog
- Date: Wed, 10 Feb 2010 19:12:36 +0000 (UTC)
commit d1d302046d6f7c0722ac2ecacc67bbcfaadc2001
Author: Javier Jardón <jjardon gnome org>
Date: Wed Feb 10 08:08:37 2010 +0100
Improve About dialog
Gtk+ version bumped to 2.12 so we can use "program-name" property
configure.ac | 2 +-
src/hello.c | 3 +++
src/menus.c | 45 ++++++++++++++++++++++++++++++++++++++++-----
3 files changed, 44 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3dd1132..830b7d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ GNOME_MAINTAINER_MODE_DEFINES
# Check for required packages
# ***************************
-LIBGTK_REQUIRED=2.6.0
+LIBGTK_REQUIRED=2.12.0
SCROLLKEEPER_REQUIRED=0.3.14
PKG_CHECK_MODULES([GNOME_HELLO],
diff --git a/src/hello.c b/src/hello.c
index 6175e08..e0231cc 100644
--- a/src/hello.c
+++ b/src/hello.c
@@ -99,6 +99,9 @@ main (int argc, char **argv)
return 1;
}
+ /* Set the human-readable name for the application */
+ g_set_application_name (_("GNOME Hello"));
+
/* Set default window icon */
gtk_window_set_default_icon_name ("gnome-hello-logo");
diff --git a/src/menus.c b/src/menus.c
index 610b702..4777fd0 100644
--- a/src/menus.c
+++ b/src/menus.c
@@ -175,20 +175,55 @@ contents_action_callback (GtkAction* action, gpointer data)
static void
about_action_callback (GtkAction* action, gpointer data)
{
- GtkWindow* app = GTK_WINDOW (data);
+ GtkWindow *app = GTK_WINDOW (data);
+ gchar *license_translated;
+
const gchar *authors[] = {
"Havoc Pennington <hp pobox com>",
NULL
};
+ const gchar *copyright = _("Copyright © 1999 Havoc Pennington\n"
+ "Copyright © 1999 - 2010 GNOME Hello Contributors");
+
+ const gchar *documentation_credits[] = {
+ "Milo Casagrande <milo ubuntu com>",
+ NULL
+ };
+
+ const gchar *license[] = {
+ N_("Thi 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."),
+ N_("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."),
+ N_("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., "
+ "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA")
+ };
+ license_translated = g_strjoin ("\n\n",
+ _(license[0]),
+ _(license[1]),
+ _(license[2]),
+ NULL);
+
gtk_show_about_dialog (app,
- "name", _("GNOME Hello"),
- "version", VERSION,
- "copyright", "\xc2\xa9 1999 Havoc Pennington",
"authors", authors,
- "translator-credits", _("translator-credits"),
+ "comments", _("Sample application using GNOME technologies"),
+ "copyright", _(copyright),
+ "documenters", documentation_credits,
+ "license", license_translated,
"logo-icon-name", "gnome-hello-logo",
+ "title", _("About GNOME Hello"),
+ "translator-credits", _("translator-credits"),
+ "version", PACKAGE_VERSION,
+ "wrap-license", TRUE,
NULL);
+
+ g_free (license_translated);
}
GtkUIManager *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]