aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/e-day-view-top-item.c26
2 files changed, 20 insertions, 13 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 412ce0c4bb..854f8649bd 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2008-12-03 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #352287
+
+ * gui/e-day-view-top-item.c: (e_day_view_top_item_draw_long_event):
+ Draw top icons in full detail/color depth (for weather, for example).
+
2008-12-02 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #348299
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index 4523fa6978..2f9bbf00fb 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -33,6 +33,7 @@
#include "e-util/e-categories-config.h"
#include <libecal/e-cal-time-util.h>
#include <libedataserver/e-data-server-util.h>
+#include <libedataserver/e-categories.h>
#include "e-calendar-view.h"
#include "e-day-view-top-item.h"
@@ -687,29 +688,28 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
e_cal_component_get_categories_list (comp, &categories_list);
for (elem = categories_list; elem; elem = elem->next) {
char *category;
- GdkPixmap *pixmap = NULL;
- GdkBitmap *mask = NULL;
+ const char *file;
+ GdkPixbuf *pixbuf;
category = (char *) elem->data;
- e_categories_config_get_icon_for (category, &pixmap, &mask);
- if (pixmap == NULL)
+ file = e_categories_get_icon_file_for (category);
+ if (!file)
+ continue;
+
+ pixbuf = gdk_pixbuf_new_from_file (file, NULL);
+ if (pixbuf == NULL)
continue;
if (icon_x <= max_icon_x) {
gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- if (mask != NULL)
- gdk_gc_set_clip_mask (gc, mask);
- gdk_draw_drawable (drawable, gc,
- pixmap,
+ gdk_draw_pixbuf (drawable, gc,
+ pixbuf,
0, 0, icon_x, icon_y,
E_DAY_VIEW_ICON_WIDTH,
- E_DAY_VIEW_ICON_HEIGHT);
+ E_DAY_VIEW_ICON_HEIGHT,
+ GDK_RGB_DITHER_NORMAL, 0, 0);
icon_x -= icon_x_inc;
}
-
- g_object_unref (pixmap);
- if (mask != NULL)
- g_object_unref (mask);
}
e_cal_component_free_categories_list (categories_list);