From 876e40f9057b0ef9948e58b7c2253c53d0388f10 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 12 Feb 2007 18:11:51 +0000 Subject: ** Fixes bug #350253 2007-02-12 Matthew Barnes ** Fixes bug #350253 * Add new evolution icons: art/16x16/evolution.png art/22x22/evolution.png art/24x24/evolution.png art/32x32/evolution.png art/scalable/evolution.svg * Remove obsolete icons: art/about-box.png art/bcg.png art/evolution.png art/monkey-16.png * art/Makefile.am: Ship our own named icons. * mail/em-format-html-print.h: Rename show_rupert field to show_icon. * mail/em-format-html-print.c (efh_format_headers): Lookup the evolution icon by name. svn path=/trunk/; revision=33211 --- art/16x16/evolution.png | Bin 0 -> 769 bytes art/22x22/evolution.png | Bin 0 -> 1132 bytes art/24x24/evolution.png | Bin 0 -> 1139 bytes art/32x32/evolution.png | Bin 0 -> 2109 bytes art/48x48/.cvsignore | 2 - art/48x48/Makefile.am | 3 - art/ChangeLog | 19 ++ art/Makefile.am | 43 +++- art/about-box.png | Bin 54200 -> 0 bytes art/bcg.png | Bin 526 -> 0 bytes art/evolution.png | Bin 5182 -> 0 bytes art/monkey-16.png | Bin 977 -> 0 bytes art/scalable/evolution.svg | 615 ++++++++++++++++++++++++++++++++++++++++++++ mail/ChangeLog | 10 + mail/em-format-html-print.c | 2 +- mail/em-format-html.c | 27 +- mail/em-format-html.h | 4 +- 17 files changed, 693 insertions(+), 32 deletions(-) create mode 100644 art/16x16/evolution.png create mode 100644 art/22x22/evolution.png create mode 100644 art/24x24/evolution.png create mode 100644 art/32x32/evolution.png delete mode 100644 art/48x48/.cvsignore delete mode 100644 art/48x48/Makefile.am delete mode 100644 art/about-box.png delete mode 100644 art/bcg.png delete mode 100644 art/evolution.png delete mode 100644 art/monkey-16.png create mode 100644 art/scalable/evolution.svg diff --git a/art/16x16/evolution.png b/art/16x16/evolution.png new file mode 100644 index 0000000000..0d1ad3496e Binary files /dev/null and b/art/16x16/evolution.png differ diff --git a/art/22x22/evolution.png b/art/22x22/evolution.png new file mode 100644 index 0000000000..d069ad9c6f Binary files /dev/null and b/art/22x22/evolution.png differ diff --git a/art/24x24/evolution.png b/art/24x24/evolution.png new file mode 100644 index 0000000000..92c2605f91 Binary files /dev/null and b/art/24x24/evolution.png differ diff --git a/art/32x32/evolution.png b/art/32x32/evolution.png new file mode 100644 index 0000000000..a24c73d629 Binary files /dev/null and b/art/32x32/evolution.png differ diff --git a/art/48x48/.cvsignore b/art/48x48/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/art/48x48/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/art/48x48/Makefile.am b/art/48x48/Makefile.am deleted file mode 100644 index be681b0c2e..0000000000 --- a/art/48x48/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -images48_DATA = - -EXTRA_DIST = $(images48_DATA) diff --git a/art/ChangeLog b/art/ChangeLog index f56c7de0c1..ce1456c518 100644 --- a/art/ChangeLog +++ b/art/ChangeLog @@ -1,3 +1,22 @@ +2007-02-12 Matthew Barnes + + ** Fixes bug #350253 + + * Add new evolution icons: + 16x16/evolution.png + 22x22/evolution.png + 24x24/evolution.png + 32x32/evolution.png + scalable/evolution.svg + + * Remove obsolete icons: + about-box.png + bcg.png + evolution.png + monkey-16.png + + * Makefile.am: Ship our own named icons. + 2006-09-19 Matthew Barnes Fixes bug #356811 diff --git a/art/Makefile.am b/art/Makefile.am index 08d8048520..575a559c79 100644 --- a/art/Makefile.am +++ b/art/Makefile.am @@ -1,8 +1,22 @@ +icon16dir = $(datadir)/icons/hicolor/16x16/apps +icon16_DATA = 16x16/evolution.png + +icon22dir = $(datadir)/icons/hicolor/22x22/apps +icon22_DATA = 22x22/evolution.png + +icon24dir = $(datadir)/icons/hicolor/24x24/apps +icon24_DATA = 24x24/evolution.png + +icon32dir = $(datadir)/icons/hicolor/32x32/apps +icon32_DATA = 32x32/evolution.png + +svgicondir = $(datadir)/icons/hicolor/scalable/apps +svgicon_DATA = scalable/evolution.svg + +gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor + images_DATA = \ - about-box.png \ - bcg.png \ evolution-contacts-mini.png \ - monkey-16.png \ offline.png \ online.png \ world_map-960.png \ @@ -10,15 +24,14 @@ images_DATA = \ plus.png \ minus.png -install-data-local: - $(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps - $(INSTALL_DATA) $(srcdir)/evolution.png $(DESTDIR)$(datadir)/pixmaps/evolution-$(BASE_VERSION).png -if DEFAULT_BINARY - cd $(DESTDIR)$(datadir)/pixmaps && rm -f evolution.png && $(LN_S) evolution-$(BASE_VERSION).png evolution.png -endif - -uninstall-local: - rm -f $(DESTDIR)$(datadir)/pixmaps/evolution-$(BASE_VERSION).png +install-data-hook: + @-if test -z "$(DESTDIR)"; then \ + echo "Updating Gtk icon cache."; \ + $(gtk_update_icon_cache); \ + else \ + echo "*** Icon cache not updated. After install, run this:"; \ + echo "*** $(gtk_update_icon_cache)"; \ + fi EXTRA_DIST = \ ChangeLog \ @@ -27,6 +40,10 @@ EXTRA_DIST = \ broken-image-16.xpm \ broken-image-24.xpm \ empty.xpm \ - evolution.png \ jump.xpm \ + $(icon16_DATA) \ + $(icon22_DATA) \ + $(icon24_DATA) \ + $(icon32_DATA) \ + $(svgicon_DATA) \ $(images_DATA) diff --git a/art/about-box.png b/art/about-box.png deleted file mode 100644 index c3613fb4bb..0000000000 Binary files a/art/about-box.png and /dev/null differ diff --git a/art/bcg.png b/art/bcg.png deleted file mode 100644 index ec03f8ab6e..0000000000 Binary files a/art/bcg.png and /dev/null differ diff --git a/art/evolution.png b/art/evolution.png deleted file mode 100644 index 412dcfbbc0..0000000000 Binary files a/art/evolution.png and /dev/null differ diff --git a/art/monkey-16.png b/art/monkey-16.png deleted file mode 100644 index 02fb7b6eb5..0000000000 Binary files a/art/monkey-16.png and /dev/null differ diff --git a/art/scalable/evolution.svg b/art/scalable/evolution.svg new file mode 100644 index 0000000000..d44c9b319a --- /dev/null +++ b/art/scalable/evolution.svg @@ -0,0 +1,615 @@ + + + + + + image/svg+xml + + Evolution 2.2 Logo + + + Jakub Steiner + + + + + Andreas Nilsson + + + + http://jimmac.musichall.cz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mail/ChangeLog b/mail/ChangeLog index 8322bec8be..97aa1328aa 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,13 @@ +2007-02-12 Matthew Barnes + + ** Fixes bug #350253 + + * em-format-html-print.h: + Rename show_rupert field to show_icon. + + * em-format-html-print.c (efh_format_headers): + Lookup the evolution icon by name. + 2007-02-12 Kjartan Maraas * em-folder-browser.c: (emfb_search_search_activated): diff --git a/mail/em-format-html-print.c b/mail/em-format-html-print.c index a527ded879..bc94f8aae5 100644 --- a/mail/em-format-html-print.c +++ b/mail/em-format-html-print.c @@ -56,7 +56,7 @@ efhp_init(GObject *o) efhp->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_container_add((GtkContainer *)efhp->window, html); gtk_widget_realize(html); - efhp->formathtml.show_rupert = FALSE; + efhp->formathtml.show_icon = FALSE; } static void diff --git a/mail/em-format-html.c b/mail/em-format-html.c index dc55d03134..603ec21044 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -32,6 +32,7 @@ #include #include +#include #ifdef G_OS_WIN32 /* Work around 'DATADIR' and 'interface' lossage in */ #define DATADIR crap_DATADIR @@ -156,7 +157,7 @@ efh_init(GObject *o) efh->content_colour = 0xffffff; efh->text_html_flags = CAMEL_MIME_FILTER_TOHTML_CONVERT_NL | CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES | CAMEL_MIME_FILTER_TOHTML_MARK_CITATION; - efh->show_rupert = TRUE; + efh->show_icon = TRUE; } static void @@ -1747,7 +1748,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) const char *charset; CamelContentType *ct; struct _camel_header_raw *header; - int rupert = FALSE; + gboolean have_icon = FALSE; ct = camel_mime_part_get_content_type((CamelMimePart *)part); charset = camel_content_type_param (ct, "charset"); @@ -1788,7 +1789,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) efh_format_header (emf, stream, part, &xmailer, h->flags, charset); if (strstr(header->value, "Evolution")) - rupert = TRUE; + have_icon = TRUE; } else if (!g_ascii_strcasecmp (header->name, h->name)) { efh_format_header(emf, stream, part, header, h->flags, charset); } @@ -1801,19 +1802,23 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) if (!efh->simple_headers) { camel_stream_printf(stream, ""); - if (rupert && efh->show_rupert) { + if (have_icon && efh->show_icon) { + GtkIconInfo *icon_info; char *classid; - CamelMimePart *iconpart; - char *pngfile; + CamelMimePart *iconpart = NULL; classid = g_strdup_printf("icon:///em-format-html/%s/icon/header", emf->part_id->str); camel_stream_printf(stream, "", classid); - pngfile = g_build_filename (EVOLUTION_ICONSDIR, - "monkey-16.png", - NULL); - iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", pngfile); - g_free (pngfile); + icon_info = gtk_icon_theme_lookup_icon ( + gtk_icon_theme_get_default (), + "evolution", 16, GTK_ICON_LOOKUP_NO_SVG); + if (icon_info != NULL) { + iconpart = em_format_html_file_part ( + (EMFormatHTML *) emf, "image/png", + gtk_icon_info_get_filename (icon_info)); + gtk_icon_info_free (icon_info); + } if (iconpart) { em_format_add_puri(emf, sizeof(EMFormatPURI), classid, iconpart, efh_write_image); diff --git a/mail/em-format-html.h b/mail/em-format-html.h index 383313b3bf..1f589755b9 100644 --- a/mail/em-format-html.h +++ b/mail/em-format-html.h @@ -162,7 +162,7 @@ struct _EMFormatHTMLPObject { * @mark_citations:1: * @simple_headers:1: * @hide_headers:1: - * @show_rupert:1: + * @show_icon:1: * * Most of these fields are private or read-only. * @@ -192,7 +192,7 @@ struct _EMFormatHTML { unsigned int mark_citations:1; unsigned int simple_headers:1; /* simple header format, no box/table */ unsigned int hide_headers:1; /* no headers at all */ - unsigned int show_rupert:1; /* whether we print rupert or not */ + unsigned int show_icon:1; /* show an icon when the sender used Evo */ guint32 header_wrap_flags; }; -- cgit v1.2.3