diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2004-05-20 03:54:50 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-05-20 03:54:50 +0800 |
commit | 4e1b5582d894ddbdefdae5c729788bc57f60886b (patch) | |
tree | d619fc973564fe2b3c0e3ae890b70979b44c1f01 | |
parent | 25d4d6ae5b37ce855ce0baabe36fde4ff9f442d1 (diff) | |
download | gsoc2013-evolution-4e1b5582d894ddbdefdae5c729788bc57f60886b.tar.gz gsoc2013-evolution-4e1b5582d894ddbdefdae5c729788bc57f60886b.tar.zst gsoc2013-evolution-4e1b5582d894ddbdefdae5c729788bc57f60886b.zip |
Changed to load an empty pixbuf manually rather than relying on the pixbuf
2004-05-19 Jeffrey Stedfast <fejj@novell.com>
* message-list.c (message_list_init_images): Changed to load an
empty pixbuf manually rather than relying on the pixbuf returned
for "" from e_icon_factory_get_icon() since it has changed to
return a broken image icon.
svn path=/trunk/; revision=25985
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/message-list.c | 49 |
2 files changed, 34 insertions, 22 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index f8466b126c..76ef7598a0 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2004-05-19 Jeffrey Stedfast <fejj@novell.com> + + * message-list.c (message_list_init_images): Changed to load an + empty pixbuf manually rather than relying on the pixbuf returned + for "" from e_icon_factory_get_icon() since it has changed to + return a broken image icon. + 2004-05-19 JP Rosevear <jpr@novell.com> * Makefile.am: don't dist the error .h file diff --git a/mail/message-list.c b/mail/message-list.c index f488c8bf1a..1b0e657a38 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -70,6 +70,8 @@ #include "em-utils.h" #include <e-util/e-icon-factory.h> +#include "art/empty.xpm" + /*#define TIMEIT */ #ifdef TIMEIT @@ -194,25 +196,24 @@ static guint message_list_signals [LAST_SIGNAL] = {0, }; static struct { char *icon_name; GdkPixbuf *pixbuf; -} states_pixmaps [] = { - { "stock_mail-unread", NULL }, - { "stock_mail-open", NULL }, - { "stock_mail-replied", NULL }, - { "stock_mail-unread-multiple", NULL }, - { "stock_mail-open-multiple", NULL }, - { "", NULL }, - { "stock_attach", NULL }, - { "stock_mail-priority-high", NULL }, - { "stock_score-lowest", NULL }, - { "stock_score-lower", NULL }, - { "stock_score-low", NULL }, - { "stock_score-normal", NULL }, - { "stock_score-high", NULL }, - { "stock_score-higher", NULL }, - { "stock_score-highest", NULL }, - { "stock_mail-flag-for-followup", NULL }, - { "stock_mail-flag-for-followup-done", NULL }, - { NULL, NULL } +} states_pixmaps[] = { + { "stock_mail-unread", NULL }, + { "stock_mail-open", NULL }, + { "stock_mail-replied", NULL }, + { "stock_mail-unread-multiple", NULL }, + { "stock_mail-open-multiple", NULL }, + { NULL, NULL }, + { "stock_attach", NULL }, + { "stock_mail-priority-high", NULL }, + { "stock_score-lowest", NULL }, + { "stock_score-lower", NULL }, + { "stock_score-low", NULL }, + { "stock_score-normal", NULL }, + { "stock_score-high", NULL }, + { "stock_score-higher", NULL }, + { "stock_score-highest", NULL }, + { "stock_mail-flag-for-followup", NULL }, + { "stock_mail-flag-for-followup-done", NULL }, }; /* FIXME: junk prefs */ @@ -1259,11 +1260,15 @@ message_list_init_images (void) /* * Only load once, and share */ - if (states_pixmaps [0].pixbuf) + if (states_pixmaps[0].pixbuf) return; - for (i = 0; states_pixmaps[i].icon_name; i++) - states_pixmaps[i].pixbuf = e_icon_factory_get_icon (states_pixmaps[i].icon_name, E_ICON_SIZE_MENU); + for (i = 0; i < G_N_ELEMENTS (states_pixmaps); i++) { + if (states_pixmaps[i].icon_name) + states_pixmaps[i].pixbuf = e_icon_factory_get_icon (states_pixmaps[i].icon_name, E_ICON_SIZE_MENU); + else + states_pixmaps[i].pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) empty_xpm); + } } static char * |