diff options
author | Hiroyuki Ikezoe <poincare@ikezoe.net> | 2007-08-27 08:04:51 +0800 |
---|---|---|
committer | Hiroyuki Ikezoe <hiikezoe@src.gnome.org> | 2007-08-27 08:04:51 +0800 |
commit | 3b4ea2c95eaccf15717826b9c3384484cb7107f1 (patch) | |
tree | 0260664c76364082b9f3096e9b87ee7d1748c60c /calendar | |
parent | 7fcfa2bdbe657bceb8bdc1190c3f4c65bb0a4a85 (diff) | |
download | gsoc2013-evolution-3b4ea2c95eaccf15717826b9c3384484cb7107f1.tar.gz gsoc2013-evolution-3b4ea2c95eaccf15717826b9c3384484cb7107f1.tar.zst gsoc2013-evolution-3b4ea2c95eaccf15717826b9c3384484cb7107f1.zip |
** Fix for the same issue of week view of bug #330628
2007-08-27 Hiroyuki Ikezoe <poincare@ikezoe.net>
** Fix for the same issue of week view of bug #330628
* gui/e-week-view.h: Add meeting_icon.
* gui/e-week-view.c: (e_week_view_realize): Load meeting_icon.
* gui/e-week-view.c: (e_week_view_unrealize): Dispose meeting_icon.
* gui/e-week-view-event-item.c: (e_week_view_event_item_draw_icons):
Show meeting icon.
svn path=/trunk/; revision=34106
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 10 | ||||
-rw-r--r-- | calendar/gui/e-week-view-event-item.c | 32 | ||||
-rw-r--r-- | calendar/gui/e-week-view.c | 3 | ||||
-rw-r--r-- | calendar/gui/e-week-view.h | 1 |
4 files changed, 46 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 2cd6f8cb62..364db8c252 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,13 @@ +2007-08-27 Hiroyuki Ikezoe <poincare@ikezoe.net> + + ** Fix for the same issue of week view of bug #330628 + + * gui/e-week-view.h: Add meeting_icon. + * gui/e-week-view.c: (e_week_view_realize): Load meeting_icon. + * gui/e-week-view.c: (e_week_view_unrealize): Dispose meeting_icon. + * gui/e-week-view-event-item.c: (e_week_view_event_item_draw_icons): + Show meeting icon. + 2007-08-24 Srinivasa Ragavan <sragavan@novell.com> ** Fix for bug #468440 diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index 80625dbd3c..a512fad491 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -595,6 +595,7 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem, gint num_icons = 0, icon_x_inc; gboolean draw_reminder_icon = FALSE, draw_recurrence_icon = FALSE; gboolean draw_timezone_icon = FALSE, draw_attach_icon = FALSE; + gboolean draw_meeting_icon = FALSE; GSList *categories_list, *elem; week_view = E_WEEK_VIEW (GTK_WIDGET (GNOME_CANVAS_ITEM (wveitem)->canvas)->parent); @@ -621,6 +622,11 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem, num_icons++; } + if (e_cal_component_has_organizer (comp)) { + draw_meeting_icon = TRUE; + num_icons++; + } + if (event->different_timezone) { draw_timezone_icon = TRUE; num_icons++; @@ -690,6 +696,18 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem, icon_x += icon_x_inc; } + if (draw_meeting_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) { + gdk_gc_set_clip_mask (gc, NULL); + gdk_draw_pixbuf (drawable, gc, + week_view->meeting_icon, + 0, 0, icon_x, icon_y, + E_WEEK_VIEW_ICON_WIDTH, + E_WEEK_VIEW_ICON_HEIGHT, + GDK_RGB_DITHER_NORMAL, + 0, 0); + icon_x += icon_x_inc; + } + /* draw categories icons */ for (elem = categories_list; elem; elem = elem->next) { char *category; @@ -1294,6 +1312,7 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem, gint num_icons = 0, icon_x_inc; gboolean draw_reminder_icon = FALSE, draw_recurrence_icon = FALSE; gboolean draw_timezone_icon = FALSE, draw_attach_icon = FALSE; + gboolean draw_meeting_icon = FALSE; GSList *categories_list, *elem; cairo_t *cr; @@ -1321,6 +1340,11 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem, draw_attach_icon = TRUE; num_icons++; } + + if (e_cal_component_has_organizer (comp)) { + draw_meeting_icon = TRUE; + num_icons++; + } if (event->different_timezone) { draw_timezone_icon = TRUE; @@ -1377,6 +1401,14 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem, icon_x += icon_x_inc; } + if (draw_meeting_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) { + cairo_save (cr); + gdk_cairo_set_source_pixbuf (cr, week_view->meeting_icon, icon_x, icon_y); + cairo_paint (cr); + cairo_restore (cr); + icon_x += icon_x_inc; + } + /* draw categories icons */ for (elem = categories_list; elem; elem = elem->next) { char *category; diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 78d60c5280..c5645959e3 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -691,6 +691,7 @@ e_week_view_realize (GtkWidget *widget) week_view->recurrence_icon = e_icon_factory_get_icon ("stock_refresh", E_ICON_SIZE_MENU); week_view->timezone_icon = e_icon_factory_get_icon ("stock_timezone", E_ICON_SIZE_MENU); week_view->attach_icon = e_icon_factory_get_icon ("stock_attach", E_ICON_SIZE_MENU); + week_view->meeting_icon = e_icon_factory_get_icon ("stock_people", E_ICON_SIZE_MENU); } static void @@ -731,6 +732,8 @@ e_week_view_unrealize (GtkWidget *widget) week_view->timezone_icon = NULL; g_object_unref (week_view->attach_icon); week_view->attach_icon = NULL; + g_object_unref (week_view->meeting_icon); + week_view->meeting_icon = NULL; if (GTK_WIDGET_CLASS (e_week_view_parent_class)->unrealize) (*GTK_WIDGET_CLASS (e_week_view_parent_class)->unrealize)(widget); diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h index e16729516d..c397f1a789 100644 --- a/calendar/gui/e-week-view.h +++ b/calendar/gui/e-week-view.h @@ -284,6 +284,7 @@ struct _EWeekView GdkPixbuf *recurrence_icon; GdkPixbuf *attach_icon; GdkPixbuf *timezone_icon; + GdkPixbuf *meeting_icon; /* Colors for drawing. */ GdkColor colors[E_WEEK_VIEW_COLOR_LAST]; |