2007-02-12  Matthew Barnes  <mbarnes@redhat.com>

	** Fixes bug #360946

	shell/e-shell-window-commands.c (command_about): Migrate to
	GtkAboutDialog, use "evolution" for the icon name, add a website link.

	shell/main.c (main): Set default window icon name to "evolution".


svn path=/trunk/; revision=33212
This commit is contained in:
Matthew Barnes
2007-02-12 18:22:19 +00:00
committed by Matthew Barnes
parent 876e40f905
commit 93f47d2d23
3 changed files with 41 additions and 62 deletions

View File

@ -1,3 +1,12 @@
2007-02-12 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #360946
e-shell-window-commands.c (command_about): Migrate to GtkAboutDialog,
use "evolution" for the icon name, add a website link.
main.c (main): Set default window icon name to "evolution".
2007-02-12 Srinivasa Ragavan <sragavan@novell.com>
** Rewrite of print settings schema from Matthew Barnes

View File

@ -24,14 +24,13 @@
#include <string.h>
#include <gtk/gtk.h>
#include <glib/gprintf.h>
#include <libgnome/gnome-exec.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-url.h>
#include <libgnomeui/gnome-about.h>
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
#include <libgnomevfs/gnome-vfs-mime-utils.h>
#include <libgnomevfs/gnome-vfs-utils.h>
@ -53,6 +52,12 @@
#include "e-shell-importer.h"
#define EVOLUTION_COPYRIGHT \
"Copyright \xC2\xA9 1999 - 2006 Novell, Inc. and Others"
#define EVOLUTION_WEBSITE \
"http://www.gnome.org/projects/evolution/"
/* Utility functions. */
static void
@ -547,62 +552,33 @@ static const char *documentors[] = {
NULL
};
static GtkWidget *
about_box_new (void)
static void
command_about (BonoboUIComponent *uih,
EShellWindow *window,
const char *path)
{
GtkWidget *about_box = NULL;
GdkPixbuf *pixbuf = NULL;
char copyright[1024];
char *filename = NULL;
gchar *translator_credits;
/* The translator-credits string is for translators to list
* per language credits for translation, displayed in the
* about box*/
char *translator_credits = _("translator-credits");
g_sprintf (copyright, "Copyright \xC2\xA9 1999 - 2006 Novell, Inc. and Others");
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,
strcmp (translator_credits, "translator-credits") ? translator_credits : NULL,
pixbuf);
if (pixbuf != NULL)
g_object_unref (pixbuf);
* per-language credits for translation, displayed in the
* about dialog. */
translator_credits = _("translator-credits");
if (strcmp (translator_credits, "translator-credits") == 0)
translator_credits = NULL;
return GTK_WIDGET (about_box);
}
static void
command_about_box (BonoboUIComponent *uih,
EShellWindow *window,
const char *path)
{
static GtkWidget *about_box_window = NULL;
if (about_box_window != NULL) {
gdk_window_raise (about_box_window->window);
return;
}
about_box_window = about_box_new ();
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_widget_show (about_box_window);
gtk_show_about_dialog (
GTK_WINDOW (window),
"name", "Evolution",
"version", VERSION,
"copyright", EVOLUTION_COPYRIGHT,
"comments", _("Groupware Suite"),
"website", EVOLUTION_WEBSITE,
"website-label", _("Evolution Website"),
"authors", authors,
"documenters", documentors,
"translator-credits", translator_credits,
"logo-icon-name", "evolution",
NULL);
}
#if 0
@ -762,7 +738,7 @@ static BonoboUIVerb tools_verbs[] = {
static BonoboUIVerb help_verbs [] = {
BONOBO_UI_VERB ("QuickReference", (BonoboUIVerbFn) command_quick_reference),
BONOBO_UI_VERB ("HelpSubmitBug", (BonoboUIVerbFn) command_submit_bug),
BONOBO_UI_VERB ("HelpAbout", (BonoboUIVerbFn) command_about_box),
BONOBO_UI_VERB ("HelpAbout", (BonoboUIVerbFn) command_about),
BONOBO_UI_VERB_END
};

View File

@ -504,7 +504,6 @@ main (int argc, char **argv)
GSList *uri_list;
GnomeProgram *program;
GOptionContext *context;
GList *icon_list;
char *filename;
/* Make ElectricFence work. */
@ -568,12 +567,7 @@ main (int argc, char **argv)
e_icon_factory_init ();
e_passwords_init();
icon_list = e_icon_factory_get_icon_list ("stock_mail");
if (icon_list) {
gtk_window_set_default_icon_list (icon_list);
g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
g_list_free (icon_list);
}
gtk_window_set_default_icon_name ("evolution");
if (setup_only)
exit (0);