[monkey-bubble: 745/753] migrate towards GtkAboutDialog
- From: Sven Herzberg <herzi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [monkey-bubble: 745/753] migrate towards GtkAboutDialog
- Date: Wed, 14 Jul 2010 22:58:19 +0000 (UTC)
commit 69e7c7c3bb60dfb9559d65f8bfe9eb1c1db756b0
Author: Sven Herzberg <herzi gnome-de org>
Date: Wed Jul 14 21:25:25 2010 +0200
migrate towards GtkAboutDialog
* src/ui/main.c: properly set the application and program names
* src/ui/ui-main.c: use GtkAboutDialog instead of GnomeAbout
src/ui/main.c | 3 ++
src/ui/ui-main.c | 59 ++++++++++++++++++++++++++++-------------------------
2 files changed, 34 insertions(+), 28 deletions(-)
---
diff --git a/src/ui/main.c b/src/ui/main.c
index 321e237..93b40b5 100644
--- a/src/ui/main.c
+++ b/src/ui/main.c
@@ -96,6 +96,9 @@ int main(int argc, char **argv)
}
g_option_context_free (context);
+ g_set_prgname ("monkey-bubble");
+ g_set_application_name (_("Monkey Bubble"));
+
#ifdef GNOME
if(gnome_score_init(PACKAGE)) {
g_message("You'll have to play without highscore support");
diff --git a/src/ui/ui-main.c b/src/ui/ui-main.c
index f634114..ab7a5b8 100644
--- a/src/ui/ui-main.c
+++ b/src/ui/ui-main.c
@@ -36,7 +36,6 @@
#ifdef GNOME
#include <libgnomeui/libgnomeui.h>
-#include <libgnomeui/gnome-about.h>
#include <libgnome/gnome-score.h>
#include <libgnome/gnome-sound.h>
#include <libgnome/gnome-help.h>
@@ -756,33 +755,37 @@ static void
about (GtkAction* action,
UiMain * ui_main)
{
-
- const gchar* authors[] = {
- "Laurent Belmonte <laurent belmonte aliacom fr>",
- "Sven Herzberg <herzi gnome-de org>",
- "Thomas Cataldo <thomas cataldo aliacom fr>",
- NULL
- };
- const gchar* documenters [] = {
- "Thomas Cataldo <thomas cataldo aliacom fr>",
- NULL
- };
- const gchar* translator_credits = _("translator_credits");
- GdkPixbuf *logo = gdk_pixbuf_new_from_file(DATADIR"/monkey-bubble/gfx/monkey.png",NULL);
-
- gtk_widget_show (
- gnome_about_new (
- PACKAGE,
- VERSION,
- "Copyright (C) 2003 - Laurent Belmonte <laurent belmonte aliacom fr>",
- _("Monkey Bubble is an Arcade Game for the GNOME Desktop Environment. Simply remove all Bubbles by the creation of unicolor triplets."),
- authors,
- documenters,
- strcmp (translator_credits, "translator_credits") != 0 ? translator_credits : NULL,
- logo)
- );
-
- g_object_unref( logo);
+ const gchar* authors[] =
+ {
+ "Laurent Belmonte",
+ "Sven Herzberg",
+ "Thomas Cataldo",
+ NULL
+ };
+ const gchar* documenters [] =
+ {
+ "Thomas Cataldo",
+ NULL
+ };
+ GdkPixbuf *logo = gdk_pixbuf_new_from_file(DATADIR"/monkey-bubble/gfx/monkey.png",NULL);
+ GtkWidget* dialog = gtk_about_dialog_new ();
+
+ gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (dialog), authors);
+ gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (dialog),
+ _("Monkey Bubble is an Arcade Game for the GNOME Desktop Environment. "
+ "Simply remove all Bubbles by the creation of unicolor triplets."));
+ gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (dialog),
+ "Copyright (C) 2003 Laurent Belmonte\n"
+ "Copyright (C) 2010 Sven Herzberg");
+ gtk_about_dialog_set_documenters (GTK_ABOUT_DIALOG (dialog), documenters);
+ gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (dialog), logo);
+ gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (dialog), _("translator_credits"));
+ gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (dialog), VERSION);
+ g_object_unref (logo);
+
+ gtk_dialog_run (GTK_DIALOG (dialog));
+
+ gtk_widget_destroy (dialog);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]