Re: [evolution-patches] GNOME about box



I dunno... I think this dialog looks pretty fugly :-(

Jeff

On Thu, 2004-05-06 at 15:21 -0400, William Jon McCann wrote:
Rodney Dawes wrote:
> It's not necessary really. It just means we need an extra file around to
> compile for a static area. Everything will get relinked anyway when you
> change it. It doesn't matter which of the two files it is in, in the
> end. It just seems extraneous to keep two extra files for a single
> function, just so we can keep the static array of strings out of the
> file where it actually gets used anyway.

Ok.  Updated patch attached.

Jon
Plain text document attachment (e-about-box.patch)
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1428
diff -p -u -r1.1428 ChangeLog
--- ChangeLog	5 May 2004 15:36:37 -0000	1.1428
+++ ChangeLog	6 May 2004 19:20:07 -0000
@@ -1,3 +1,10 @@
+2004-05-06  William Jon McCann  <mccann jhu edu>
+
+	* Makefile.am (evolution_SOURCES): Remove e-shell-about-box.
+
+	* e-shell-window-commands.c (command_about_box, about_box_new): 
+	Use GNOME about box.
+
 2004-05-05  Dan Winship  <danw ximian com>
 
 	* e-sidebar.c (layout_buttons): Change the algorithm so that if
Index: e-shell-window-commands.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-window-commands.c,v
retrieving revision 1.14
diff -p -u -r1.14 e-shell-window-commands.c
--- e-shell-window-commands.c	30 Apr 2004 19:05:34 -0000	1.14
+++ e-shell-window-commands.c	6 May 2004 19:20:07 -0000
@@ -35,6 +35,8 @@
 #include "e-util/e-dialog-utils.h"
 #include "e-util/e-passwords.h"
 
+#include <glib/gprintf.h>
+
 #include <libgnome/gnome-exec.h>
 #include <libgnome/gnome-url.h>
 #include <libgnome/gnome-i18n.h>
@@ -128,15 +130,199 @@ command_submit_bug (BonoboUIComponent *u
                 e_notice (NULL, GTK_MESSAGE_ERROR, _("Bug buddy could not be run."));
 }
 
-static int
-about_box_event_callback (GtkWidget *widget,
-			  GdkEvent *event,
-			  GtkWidget **widget_pointer)
+static GtkWidget *
+about_box_new (void)
 {
-	gtk_widget_destroy (GTK_WIDGET (*widget_pointer));
-	*widget_pointer = NULL;
+	GtkWidget *about_box = NULL;
+	GdkPixbuf *pixbuf = NULL;
+	gchar copyright[1024];
+
+	/* must be in utf8, the weird breaking of escaped strings
+	   is so the hex escape strings dont swallow too many chars */
+	static const char *authors[] = {
+		"Darin Adler",
+		"Arturo Espinosa Aldama",
+		"H\xC3\xA9" "ctor Garc\xC3\xAD" "a \xC3\x81" "lvarez",
+		"Jes\xC3\xBA" "s Bravo \xC3\x81" "lvarez",
+		"Seth Alves",
+		"Marius Andreiana",
+		"Sean Atkinson",
+		"Szabolcs BAN",
+		"Timur Bakeyev",
+		"Martin Baulig",
+		"Frank Belew",
+		"Dan Berger",
+		"Jacob Berkman",
+		"Matt Bissiri",
+		"Jonathan Blandford",
+		"Richard Boulton",
+		"Robert Brady",
+		"Kevin Breit",
+		"Martha Burke",
+		"Dave Camp",
+		"Ian Campbell",
+		"Anders Carlsson",
+		"Damon Chaplin",
+		"Abel Cheung",
+		"Zbigniew Chyla",
+		"Clifford R. Conover",
+		"Sam Creasey",
+		"Frederic Crozat",
+		"Wayne Davis",
+		"Rodney Dawes",
+		"Jos Dehaes",
+		"Fatih Demir",
+		"Arik Devens",
+		"Anna Marie Dirks",
+		"Bob Doan",
+		"Radek Doul\xC3\xADk",
+		"Edd Dumbill",
+		"Larry Ewing",
+		"Gilbert Fang",
+		"Francisco Javier F. Serrador",
+		"Nuno Ferreira",
+		"Valek Filippov",
+		"Nat Friedman",
+		"Sean Gao",
+		"Jeff Garzik",
+		"Nike Gerdts",
+		"Grzegorz Goawski",
+		"Jody Goldberg",
+		"Pablo Gonzalo del Campo",
+		"Mark Gordon",
+		"Kenny Graunke",
+		"Alex Graveley",
+		"Bertrand Guiheneuf",
+		"Jean-Noel Guiheneuf",
+		"Mikael Hallendal",
+		"Raja R Harinath",
+		"Heath Harrelson",
+		"Taylor Hayward",
+		"Jon K Hellan",
+		"Martin Hicks",
+		"Iain Holmes",
+		"Max Horn",
+		"Greg Hudson",
+		"Richard Hult",
+		"Andreas Hyden",
+		"Miguel de Icaza",
+		"Hans Petter Jansson",
+		"Jack Jia",
+		"Wang Jian",
+		"Sanshao Jiang",
+		"Benjamin Kahn",
+		"Yanko Kaneti",
+		"Lauris Kaplinski",
+		"Jeremy Katz",
+		"Mike Kestner",
+		"Christian Kreibich",
+		"Nicholas J Kreucher",
+		"Ronald Kuetemeier",
+		"Tuomas Kuosmanen",
+		"Mathieu Lacage",
+		"Christopher J. Lahey",
+		"Eneko Lacunza",
+		"Miles Lane",
+		"Jason Leach",
+		"Elliot Lee",
+		"Ji Lee",
+		"Timothy Lee",
+		"T\xC3\xB5" "ivo Leedj\xC3\xA4" "rv",
+		"Richard Li",
+		"Matthew Loper",
+		"Duarte Loreto",
+		"Harry Lu",
+		"Michael MacDonald",
+		"Duncan Mak",
+		"Kjartan Maraas",
+		"Garardo Marin",
+		"Matt Martin",
+		"Carlos Perell\xC3\xB3" " Mar\xC3\xAD" "n",
+		"Dietmar Maurer",
+		"William Jon McCann",
+		"Mike McEwan",
+		"Alastair McKinstry",
+		"Michael Meeks",
+		"Federico Mena",
+		"Christophe Merlet",
+		"Michael M. Morrison",
+		"Rodrigo Moya",
+		"Steve Murphy",
+		"Yukihiro Nakai",
+		"Martin Norb\xC3\xA4" "ck",
+		"Tomas Ogren",
+		"Ismael Olea",
+		"Eskil Heyn Olsen",
+		"Sergey Panov",
+		"Gediminas Paulauskas",
+		"Jesse Pavel",
+		"Havoc Pennington",
+		"Ettore Perazzoli",
+		"Petta Pietikainen",
+		"Herbert V. Riedel",
+		"Ariel Rios",
+		"JP Rosevear",
+		"Cody Russell",
+		"Changwoo Ryu",
+		"Pablo Saratxaga",
+		"Carsten Schaar",
+		"Joe Shaw",
+		"Timo Sirainen",
+		"Craig Small",
+		"Maciej Stachowiak",
+		"Jeffrey Stedfast",
+		"Jakub Steiner",
+		"Russell Steinthal",
+		"Vadim Strizhevsky",
+		"Yuri Syrota",
+		"Jason Tackaberry",
+		"Peter Teichman",
+		"Chris Toshok",
+		"Tom Tromey",
+		"Jon Trowbridge",
+		"Andrew T. Veliath",
+		"Gustavo Maciel Dias Vieira",
+		"Luis Villa",
+		"Stanislav Visnovsky",
+		"Aaron Weber",
+		"Dave West",
+		"Peter Williams",
+		"Matt Wilson",
+		"Matthew Wilson",
+		"Dan Winship",
+		"Jeremy Wise",
+		"Leon Zhang",
+		"Philip Zhao",
+		"Jukka Zitting",
+		"Michael Zucchi"
+	};
+
+	static const gchar *documentors[] = { NULL };
+	static const gchar *translator_credits = NULL;
+
+
+	g_sprintf (copyright, "Copyright \xC2\xA9 1999 - 2004 Novell, Inc.");
+	gchar *filename = NULL;
+                                                                                
+	filename = g_build_filename (EVOLUTION_DATADIR, "pixmaps",
+				     "evolution-1.5.png", NULL);
+	if (filename != NULL) {
+		pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
+		g_free (filename);
+	}
+                                                                                
+	about_box = gnome_about_new ("Evolution",
+				     VERSION,
+				     copyright,
+				     _("Groupware Suite"),
+				     authors, documentors,
+				     translator_credits,
+				     pixbuf);
+	
+        if (pixbuf != NULL)
+                g_object_unref (pixbuf);
 
-	return TRUE;
+	return GTK_WIDGET (about_box);
 }
 
 static void
@@ -145,30 +331,19 @@ command_about_box (BonoboUIComponent *ui
 		   const char *path)
 {
 	static GtkWidget *about_box_window = NULL;
-	GtkWidget *about_box;
 
 	if (about_box_window != NULL) {
 		gdk_window_raise (about_box_window->window);
 		return;
 	}
 
-	about_box = e_shell_about_box_new ();
-	gtk_widget_show (about_box);
+	about_box_window = about_box_new ();
 
-	about_box_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-	gtk_window_set_type_hint (GTK_WINDOW (about_box_window), GDK_WINDOW_TYPE_HINT_DIALOG);
-	
-	gtk_window_set_resizable (GTK_WINDOW (about_box_window), FALSE);
-	g_signal_connect (about_box_window, "key_press_event",
-			  G_CALLBACK (about_box_event_callback), &about_box_window);
-	g_signal_connect (about_box_window, "button_press_event",
-			  G_CALLBACK (about_box_event_callback), &about_box_window);
-	g_signal_connect (about_box_window, "delete_event",
-			  G_CALLBACK (about_box_event_callback), &about_box_window);
+	g_signal_connect (G_OBJECT (about_box_window), "destroy",
+			  G_CALLBACK (gtk_widget_destroyed), &about_box_window);
 
 	gtk_window_set_transient_for (GTK_WINDOW (about_box_window), GTK_WINDOW (window));
-	gtk_window_set_title (GTK_WINDOW (about_box_window), _("About Ximian Evolution"));
-	gtk_container_add (GTK_CONTAINER (about_box_window), about_box);
+
 	gtk_widget_show (about_box_window);
 }
 
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution/shell/Makefile.am,v
retrieving revision 1.194
diff -p -u -r1.194 Makefile.am
--- Makefile.am	19 Apr 2004 15:17:54 -0000	1.194
+++ Makefile.am	6 May 2004 19:20:07 -0000
@@ -136,8 +136,6 @@ evolution_SOURCES =				\
 	e-corba-config-page.h			\
 	e-history.c				\
 	e-history.h				\
-	e-shell-about-box.c			\
-	e-shell-about-box.h			\
 	e-shell-constants.h			\
 	e-shell-folder-title-bar.c		\
 	e-shell-folder-title-bar.h		\
-- 
Jeffrey Stedfast
Evolution Hacker - Novell, Inc.
fejj ximian com  - www.novell.com


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