aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-icon-list.c
diff options
context:
space:
mode:
authorIain Holmes <iain@helixcode.com>2000-10-02 08:42:10 +0800
committerIain Holmes <iain@src.gnome.org>2000-10-02 08:42:10 +0800
commit3026d9fc5c8839886649d67bd6313b027a1f08a1 (patch)
treed7b259cd88ea0d90630548b5fd6aa1a24c1e57ae /composer/e-icon-list.c
parent2e03d9ba66e36940b3f3f4181271508965bf9ad2 (diff)
downloadgsoc2013-evolution-3026d9fc5c8839886649d67bd6313b027a1f08a1.tar
gsoc2013-evolution-3026d9fc5c8839886649d67bd6313b027a1f08a1.tar.gz
gsoc2013-evolution-3026d9fc5c8839886649d67bd6313b027a1f08a1.tar.bz2
gsoc2013-evolution-3026d9fc5c8839886649d67bd6313b027a1f08a1.tar.lz
gsoc2013-evolution-3026d9fc5c8839886649d67bd6313b027a1f08a1.tar.xz
gsoc2013-evolution-3026d9fc5c8839886649d67bd6313b027a1f08a1.tar.zst
gsoc2013-evolution-3026d9fc5c8839886649d67bd6313b027a1f08a1.zip
If the description of an attachment is a blank string, revert to
2000-10-02 Iain Holmes <iain@helixcode.com> * e-msg-composer-attachment-bar.c: If the description of an attachment is a blank string, revert to displaying the filename. 2000-10-01 Iain Holmes <iain@helixcode.com> * e-icon-list.c: If you try to add an icon from a file that doesn't exist put a "Broken icon" image. * bad-icon.xpm: Broken icon image. svn path=/trunk/; revision=5652
Diffstat (limited to 'composer/e-icon-list.c')
-rw-r--r--composer/e-icon-list.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/composer/e-icon-list.c b/composer/e-icon-list.c
index 114675eddd..3cdba20506 100644
--- a/composer/e-icon-list.c
+++ b/composer/e-icon-list.c
@@ -47,6 +47,7 @@
#include <libgnomeui/gnome-canvas-pixbuf.h>
#include <libgnomeui/gnome-canvas-rect-ellipse.h>
+#include "bad-icon.xpm"
/* Aliases to minimize screen use in my laptop */
#define EIL(x) E_ICON_LIST(x)
@@ -981,7 +982,6 @@ icon_new_from_pixbuf (EIconList *eil, GdkPixbuf *im,
else
icon->icon_filename = NULL;
- g_print ("%d,%d\n", gdk_pixbuf_get_width (im), gdk_pixbuf_get_height (im));
icon->image = GNOME_CANVAS_PIXBUF (gnome_canvas_item_new (
group,
gnome_canvas_pixbuf_get_type (),
@@ -1036,9 +1036,14 @@ icon_new (Eil *eil, const char *icon_filename, const char *text)
GdkPixbuf *im;
Icon *retval;
- if (icon_filename)
+ if (icon_filename) {
im = gdk_pixbuf_new_from_file (icon_filename);
- else
+
+ /* Bad icon image
+ Fixme. Need a better graphic. */
+ if (im == NULL)
+ im = gdk_pixbuf_new_from_xpm_data ((const char**) bad_icon_xpm);
+ } else
im = NULL;
retval = icon_new_from_pixbuf (eil, im, icon_filename, text);