aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-12-03 20:28:57 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-12-03 20:28:57 +0800
commit792772dc246fe7d2119f946a2ea95a70256fb147 (patch)
treeedf35d2afc3982b67b72da945e06109ab0298200 /calendar
parent4bec962f7b5cd2a65bed33de3e8f56f3b2b4bad7 (diff)
downloadgsoc2013-evolution-792772dc246fe7d2119f946a2ea95a70256fb147.tar.gz
gsoc2013-evolution-792772dc246fe7d2119f946a2ea95a70256fb147.tar.zst
gsoc2013-evolution-792772dc246fe7d2119f946a2ea95a70256fb147.zip
** Part of fix for bug #352287
2008-12-03 Milan Crha <mcrha@redhat.com> ** Part of fix for bug #352287 * calendar/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). * plugins/calendar-weather/Makefile.am: Compile and link with libgweather. * plugins/calendar-weather/calendar-weather.c: (e_plugin_lib_enable), (selection_changed), (find_location_func), (find_location), (treeview_clicked), (create_source_selector), (build_location_path), (location_clicked), (e_calendar_weather_location): Use libgweather for weather calendar. Note: Requires eds revision at least 9793. svn path=/trunk/; revision=36827
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);