diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2007-02-13 02:22:19 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-02-13 02:22:19 +0800 |
commit | 93f47d2d2331fbcdbe9510de43f0440d4c2a8fed (patch) | |
tree | 4d94198daa7cce4dd0828091d71357758758eb9d /shell | |
parent | 876e40f9057b0ef9948e58b7c2253c53d0388f10 (diff) | |
download | gsoc2013-evolution-93f47d2d2331fbcdbe9510de43f0440d4c2a8fed.tar.gz gsoc2013-evolution-93f47d2d2331fbcdbe9510de43f0440d4c2a8fed.tar.zst gsoc2013-evolution-93f47d2d2331fbcdbe9510de43f0440d4c2a8fed.zip |
** Fixes bug #360946
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
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 9 | ||||
-rw-r--r-- | shell/e-shell-window-commands.c | 88 | ||||
-rw-r--r-- | shell/main.c | 8 |
3 files changed, 42 insertions, 63 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 01769364f3..1f83d707f1 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -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 diff --git a/shell/e-shell-window-commands.c b/shell/e-shell-window-commands.c index 140e858c5a..e85fa6e9c4 100644 --- a/shell/e-shell-window-commands.c +++ b/shell/e-shell-window-commands.c @@ -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) -{ - GtkWidget *about_box = NULL; - GdkPixbuf *pixbuf = NULL; - char copyright[1024]; - char *filename = NULL; - - /* 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); - - return GTK_WIDGET (about_box); -} - static void -command_about_box (BonoboUIComponent *uih, - EShellWindow *window, - const char *path) +command_about (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; - } + gchar *translator_credits; - 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); + /* The translator-credits string is for translators to list + * per-language credits for translation, displayed in the + * about dialog. */ + translator_credits = _("translator-credits"); + if (strcmp (translator_credits, "translator-credits") == 0) + translator_credits = NULL; + + 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 }; diff --git a/shell/main.c b/shell/main.c index d7a6c21abd..b0c393b778 100644 --- a/shell/main.c +++ b/shell/main.c @@ -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); |