[alleyoop] Replaced GnomeAbout with GtkAboutDialog



commit 344bd496c7d29f3eacd0720de1d72405935fc142
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Sat Dec 17 14:54:13 2011 -0500

    Replaced GnomeAbout with GtkAboutDialog
    
    2011-12-17  Jeffrey Stedfast  <fejj gnome org>
    
    	* src/alleyoop.c: Replaced the GnomeAbout dialog with a
    	GtkAboutDialog.

 ChangeLog      |    3 +++
 src/alleyoop.c |   30 ++++++++++++++++++++++--------
 2 files changed, 25 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2c65acc..a101886 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-12-17  Jeffrey Stedfast  <fejj gnome org>
 
+	* src/alleyoop.c: Replaced the GnomeAbout dialog with a
+	GtkAboutDialog.
+
 	* src/vggeneralprefs.c: Replace GnomeFileEntry with
 	GtkFileChooserButton.
 
diff --git a/src/alleyoop.c b/src/alleyoop.c
index a3a714e..21f2436 100644
--- a/src/alleyoop.c
+++ b/src/alleyoop.c
@@ -34,7 +34,6 @@
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <gconf/gconf-client.h>
-#include <libgnomeui/gnome-about.h>
 #include <libgnomeui/gnome-app-helper.h>
 
 #include "vgdefaultview.h"
@@ -530,14 +529,22 @@ about_destroy (GObject *obj, GObject *deadbeef)
 	grind->about = NULL;
 }
 
+static void
+about_response_cb (GtkDialog *about, int response_id, gpointer user_data)
+{
+	if (response_id == GTK_RESPONSE_CANCEL)
+		gtk_widget_destroy ((GtkWidget *) about);
+}
+
+static const char copyright[] = "Copyright 2003-2011 Jeffrey Stedfast <fejj gnome org>";
+
+static const char comments[] = N_("Alleyoop is a Valgrind front-end for the GNOME environment.");
+
 static const char *authors[] = {
-	"Jeffrey Stedfast <fejj novell com>",
+	"Jeffrey Stedfast <fejj gnome org>",
 	NULL
 };
 
-/* This string should be replaced with the name of the translator */
-static const char translation[] = N_("Jeffrey Stedfast");
-
 static void
 help_about_cb (GtkWidget *widget, gpointer user_data)
 {
@@ -545,11 +552,18 @@ help_about_cb (GtkWidget *widget, gpointer user_data)
 	
 	grind = (Alleyoop *) user_data;
 	if (grind->about == NULL) {
-		grind->about = gnome_about_new ("Alleyoop", VERSION, "Copyright 2003-2009 Jeffrey Stedfast <fejj novell com>",
-						_("Alleyoop is a Valgrind front-end for the GNOME environment."),
-						(const char **) authors, NULL, _(translation), NULL);
+		grind->about = gtk_about_dialog_new ();
+		gtk_about_dialog_set_program_name ((GtkAboutDialog *) grind->about, "Alleyoop");
+		gtk_about_dialog_set_version ((GtkAboutDialog *) grind->about, VERSION);
+		gtk_about_dialog_set_copyright ((GtkAboutDialog *) grind->about, copyright);
+		gtk_about_dialog_set_comments ((GtkAboutDialog *) grind->about, _(comments));
+		//gtk_about_dialog_set_license_type ((GtkAboutDialog *) grind->about, GTK_LICENSE_GPL_2_0);
+		gtk_about_dialog_set_website ((GtkAboutDialog *) grind->about, "http://alleyoop.sourceforge.net";);
+		gtk_about_dialog_set_authors ((GtkAboutDialog *) grind->about, (const char **) authors);
+		gtk_about_dialog_set_translator_credits ((GtkAboutDialog *) grind->about, _("translator-credits"));
 		
 		g_object_weak_ref ((GObject *) grind->about, (GWeakNotify) about_destroy, grind);
+		g_signal_connect (grind->about, "response", G_CALLBACK (about_response_cb), grind);
 		
 		gtk_widget_show (grind->about);
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]