aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog12
-rw-r--r--composer/bad-icon.xpm53
-rw-r--r--composer/e-icon-list.c11
-rw-r--r--composer/e-msg-composer-attachment-bar.c2
4 files changed, 74 insertions, 4 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 05331c897c..db5b90d3cb 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,15 @@
+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.
+
2000-10-01 Iain Holmes <iain@helixcode.com>
* e-msg-composer-attachment-bar.[ch] (update): If the attachment is
diff --git a/composer/bad-icon.xpm b/composer/bad-icon.xpm
new file mode 100644
index 0000000000..0a9cac23cd
--- /dev/null
+++ b/composer/bad-icon.xpm
@@ -0,0 +1,53 @@
+/* XPM */
+static char * bad_icon_xpm[] = {
+"48 48 2 1",
+" g None",
+". g #000000",
+"................................................",
+". .",
+". .",
+". .",
+". .",
+". .",
+". .",
+". .",
+". .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". .. .",
+". .. .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". . . .",
+". .",
+". .",
+". .",
+". .",
+". .",
+". .",
+"................................................"};
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);
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c
index 9dd4cf6a49..3743c310af 100644
--- a/composer/e-msg-composer-attachment-bar.c
+++ b/composer/e-msg-composer-attachment-bar.c
@@ -290,7 +290,7 @@ update (EMsgComposerAttachmentBar *bar)
}
desc = camel_mime_part_get_description (attachment->body);
- if (!desc)
+ if (!desc || *desc == '\0')
desc = camel_mime_part_get_filename (attachment->body);
if (!desc)
desc = "attachment";