From: Dirk-Jan C. Binnema Date: Thu, 10 May 2007 06:08:40 +0000 (+0000) Subject: * make our hacked icons the right size, and less blurry X-Git-Tag: git_migration_finished~3651 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=502114f20e2cb87fd966a222b8f91a56c758d85b * make our hacked icons the right size, and less blurry pmo-trunk-r1816 --- diff --git a/src/gnome/modest-icon-names.h b/src/gnome/modest-icon-names.h index 798885c..cd6e090 100644 --- a/src/gnome/modest-icon-names.h +++ b/src/gnome/modest-icon-names.h @@ -48,12 +48,20 @@ #define MODEST_HEADER_ICON_DELETED PIXMAP_PREFIX "qgn_list_messagin_mail_deleted.png" #define MODEST_HEADER_ICON_ATTACH PIXMAP_PREFIX "qgn_list_gene_attacpap.png" -#define MODEST_HEADER_ICON_ATTACH_HIGH_PRIORITY PIXMAP_PREFIX "qgn_list_gene_high_attacpap.png" -#define MODEST_HEADER_ICON_ATTACH_LOW_PRIORITY PIXMAP_PREFIX "qgn_list_gene_low_attacpap.png" -#define MODEST_HEADER_ICON_ATTACH_NORM_PRIORITY PIXMAP_PREFIX "qgn_list_gene_norm_attacpap.png" -#define MODEST_HEADER_ICON_HIGH_PRIORITY PIXMAP_PREFIX "qgn_list_messaging_high_noatt.png" -#define MODEST_HEADER_ICON_LOW_PRIORITY PIXMAP_PREFIX "qgn_list_messaging_low_noatt.png" +/* + * until we have the custom cell renderer, we use the hacked icons below; + * don't remove!!! + */ +#define MODEST_HEADER_ICON_ATTACH_HIGH_PRIORITY PIXMAP_PREFIX"modest_high_attachment.png" +#define MODEST_HEADER_ICON_ATTACH_LOW_PRIORITY PIXMAP_PREFIX"modest_low_attachment.png" +#define MODEST_HEADER_ICON_ATTACH_NORM_PRIORITY PIXMAP_PREFIX"modest_normal_attachment.png" +#define MODEST_HEADER_ICON_HIGH_PRIORITY PIXMAP_PREFIX"modest_high_no_attachment.png" +#define MODEST_HEADER_ICON_LOW_PRIORITY PIXMAP_PREFIX"modest_low_no_attachment.png" +#define MODEST_HEADER_ICON_NORM_PRIORITY PIXMAP_PREFIX"modest_normal_no_attachment.png" +/* + * + */ #define MODEST_FOLDER_ICON_OPEN PIXMAP_PREFIX "qgn_list_gene_fldr_opn.png" #define MODEST_FOLDER_ICON_CLOSED PIXMAP_PREFIX "qgn_list_gene_fldr_cls.png" diff --git a/src/gnome/pixmaps/modest_high_attachment.png b/src/gnome/pixmaps/modest_high_attachment.png new file mode 100644 index 0000000..8b1ee83 Binary files /dev/null and b/src/gnome/pixmaps/modest_high_attachment.png differ diff --git a/src/gnome/pixmaps/modest_high_no_attachment.png b/src/gnome/pixmaps/modest_high_no_attachment.png new file mode 100644 index 0000000..d4ac953 Binary files /dev/null and b/src/gnome/pixmaps/modest_high_no_attachment.png differ diff --git a/src/gnome/pixmaps/modest_low_attachment.png b/src/gnome/pixmaps/modest_low_attachment.png new file mode 100644 index 0000000..6a710f6 Binary files /dev/null and b/src/gnome/pixmaps/modest_low_attachment.png differ diff --git a/src/gnome/pixmaps/modest_low_no_attachment.png b/src/gnome/pixmaps/modest_low_no_attachment.png new file mode 100644 index 0000000..077b941 Binary files /dev/null and b/src/gnome/pixmaps/modest_low_no_attachment.png differ diff --git a/src/gnome/pixmaps/modest_normal_attachment.png b/src/gnome/pixmaps/modest_normal_attachment.png new file mode 100644 index 0000000..8ec5590 Binary files /dev/null and b/src/gnome/pixmaps/modest_normal_attachment.png differ diff --git a/src/gnome/pixmaps/modest_normal_no_attachment.png b/src/gnome/pixmaps/modest_normal_no_attachment.png new file mode 100644 index 0000000..046096d Binary files /dev/null and b/src/gnome/pixmaps/modest_normal_no_attachment.png differ diff --git a/src/maemo/modest-icon-names.h b/src/maemo/modest-icon-names.h index 77300a5..fc05791 100644 --- a/src/maemo/modest-icon-names.h +++ b/src/maemo/modest-icon-names.h @@ -49,11 +49,12 @@ * until we have the custom cell renderer, we use the hacked icons below; * don't remove!!! */ -#define MODEST_HEADER_ICON_ATTACH_HIGH_PRIORITY PIXMAP_PREFIX"qgn_list_gene_high_attacpap.png" -#define MODEST_HEADER_ICON_ATTACH_LOW_PRIORITY PIXMAP_PREFIX"qgn_list_gene_low_attacpap.png" -#define MODEST_HEADER_ICON_ATTACH_NORM_PRIORITY PIXMAP_PREFIX"qgn_list_gene_norm_attacpap.png" -#define MODEST_HEADER_ICON_HIGH_PRIORITY PIXMAP_PREFIX"qgn_list_messaging_high_noatt.png" -#define MODEST_HEADER_ICON_LOW_PRIORITY PIXMAP_PREFIX"qgn_list_messaging_low_noatt.png" +#define MODEST_HEADER_ICON_ATTACH_HIGH_PRIORITY PIXMAP_PREFIX"modest_high_attachment.png" +#define MODEST_HEADER_ICON_ATTACH_LOW_PRIORITY PIXMAP_PREFIX"modest_low_attachment.png" +#define MODEST_HEADER_ICON_ATTACH_NORM_PRIORITY PIXMAP_PREFIX"modest_normal_attachment.png" +#define MODEST_HEADER_ICON_HIGH_PRIORITY PIXMAP_PREFIX"modest_high_no_attachment.png" +#define MODEST_HEADER_ICON_LOW_PRIORITY PIXMAP_PREFIX"modest_low_no_attachment.png" +#define MODEST_HEADER_ICON_NORM_PRIORITY PIXMAP_PREFIX"modest_normal_no_attachment.png" /* * */ diff --git a/src/maemo/modest-platform.c b/src/maemo/modest-platform.c index ee77522..6a7b7d7 100644 --- a/src/maemo/modest-platform.c +++ b/src/maemo/modest-platform.c @@ -345,7 +345,7 @@ modest_platform_get_icon (const gchar *name) GtkIconTheme *current_theme = NULL; g_return_val_if_fail (name, NULL); - + if (g_str_has_suffix (name, ".png")) { /*FIXME: hack*/ pixbuf = gdk_pixbuf_new_from_file (name, &err); if (!pixbuf) { diff --git a/src/maemo/pixmaps/modest_high_attachment.png b/src/maemo/pixmaps/modest_high_attachment.png new file mode 100644 index 0000000..8b1ee83 Binary files /dev/null and b/src/maemo/pixmaps/modest_high_attachment.png differ diff --git a/src/maemo/pixmaps/modest_high_no_attachment.png b/src/maemo/pixmaps/modest_high_no_attachment.png new file mode 100644 index 0000000..d4ac953 Binary files /dev/null and b/src/maemo/pixmaps/modest_high_no_attachment.png differ diff --git a/src/maemo/pixmaps/modest_low_attachment.png b/src/maemo/pixmaps/modest_low_attachment.png new file mode 100644 index 0000000..6a710f6 Binary files /dev/null and b/src/maemo/pixmaps/modest_low_attachment.png differ diff --git a/src/maemo/pixmaps/modest_low_no_attachment.png b/src/maemo/pixmaps/modest_low_no_attachment.png new file mode 100644 index 0000000..077b941 Binary files /dev/null and b/src/maemo/pixmaps/modest_low_no_attachment.png differ diff --git a/src/maemo/pixmaps/modest_normal_attachment.png b/src/maemo/pixmaps/modest_normal_attachment.png new file mode 100644 index 0000000..8ec5590 Binary files /dev/null and b/src/maemo/pixmaps/modest_normal_attachment.png differ diff --git a/src/maemo/pixmaps/modest_normal_no_attachment.png b/src/maemo/pixmaps/modest_normal_no_attachment.png new file mode 100644 index 0000000..046096d Binary files /dev/null and b/src/maemo/pixmaps/modest_normal_no_attachment.png differ diff --git a/src/maemo/pixmaps/qgn_list_gene_high_attacpap.png b/src/maemo/pixmaps/qgn_list_gene_high_attacpap.png deleted file mode 100644 index 3d5bf2b..0000000 Binary files a/src/maemo/pixmaps/qgn_list_gene_high_attacpap.png and /dev/null differ diff --git a/src/maemo/pixmaps/qgn_list_gene_low_attacpap.png b/src/maemo/pixmaps/qgn_list_gene_low_attacpap.png deleted file mode 100644 index 3a11a4c..0000000 Binary files a/src/maemo/pixmaps/qgn_list_gene_low_attacpap.png and /dev/null differ diff --git a/src/maemo/pixmaps/qgn_list_gene_norm_attacpap.png b/src/maemo/pixmaps/qgn_list_gene_norm_attacpap.png deleted file mode 100644 index da8a1b1..0000000 Binary files a/src/maemo/pixmaps/qgn_list_gene_norm_attacpap.png and /dev/null differ diff --git a/src/maemo/pixmaps/qgn_list_messaging_high_noatt.png b/src/maemo/pixmaps/qgn_list_messaging_high_noatt.png deleted file mode 100644 index ce69c82..0000000 Binary files a/src/maemo/pixmaps/qgn_list_messaging_high_noatt.png and /dev/null differ diff --git a/src/maemo/pixmaps/qgn_list_messaging_low_noatt.png b/src/maemo/pixmaps/qgn_list_messaging_low_noatt.png deleted file mode 100644 index 4542228..0000000 Binary files a/src/maemo/pixmaps/qgn_list_messaging_low_noatt.png and /dev/null differ diff --git a/src/widgets/modest-header-view-render.c b/src/widgets/modest-header-view-render.c index b7ff42f..80158e0 100644 --- a/src/widgets/modest-header-view-render.c +++ b/src/widgets/modest-header-view-render.c @@ -74,6 +74,8 @@ get_pixbuf_for_compact_flag (TnyHeaderFlags flags) static GdkPixbuf *low_attachments_pixbuf = NULL; static GdkPixbuf *high_pixbuf = NULL; static GdkPixbuf *low_pixbuf = NULL; + static GdkPixbuf *normal_pixbuf = NULL; + TnyHeaderPriorityFlags prior; prior = flags & TNY_HEADER_FLAG_PRIORITY; @@ -105,9 +107,12 @@ get_pixbuf_for_compact_flag (TnyHeaderFlags flags) if (G_UNLIKELY(!normal_attachments_pixbuf)) normal_attachments_pixbuf = modest_platform_get_icon (MODEST_HEADER_ICON_ATTACH_NORM_PRIORITY); return normal_attachments_pixbuf; - } + } else { + if (G_UNLIKELY(!normal_pixbuf)) + normal_pixbuf = modest_platform_get_icon (MODEST_HEADER_ICON_NORM_PRIORITY); + return normal_pixbuf; + } } - return NULL; }