aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view-main-item.c
diff options
context:
space:
mode:
author7 <jpr@ximian.com>2002-07-18 01:23:49 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-07-18 01:23:49 +0800
commit1ea6884e825cb2e30787f6f6d0c7911647473945 (patch)
tree7b31a4699adb7dae215d1eb03bef4e89f6d235c3 /calendar/gui/e-day-view-main-item.c
parent6dee50394a99a1d1e2e95309764bfedbcd95275d (diff)
downloadgsoc2013-evolution-1ea6884e825cb2e30787f6f6d0c7911647473945.tar.gz
gsoc2013-evolution-1ea6884e825cb2e30787f6f6d0c7911647473945.tar.zst
gsoc2013-evolution-1ea6884e825cb2e30787f6f6d0c7911647473945.zip
use util function to see if the user is the organizer
2002-07-17 <jpr@ximian.com> * gui/calendar-model.c (calendar_model_value_at): use util function to see if the user is the organizer * gui/dialogs/cancel-comp.c (cancel_component_dialog): add deleting proto to indicate whether cancelling or deleting is the primary operation * gui/dialogs/cancel-comp.h: update proto * gui/dialogs/comp-editor.c (delete_cmd): offer to cancel * gui/dialogs/task-editor.c (cancel_task_cmd): call cancel_component_dialog with new param * gui/dialogs/event-editor.c (cancel_meeting_cmd): ditto * gui/e-week-view.c (e_week_view_on_editing_stopped): only update request if user is organizer (e_week_view_show_popup_menu): disable the meeting and meeting organizer mask if appropriate (e_week_view_delete_event_internal): offer to cancel the meeting (e_week_view_on_cut): ditto (selection_received): send request if its a meeting * gui/e-day-view.h: add meeting icon/mask * gui/e-day-view.c (e_day_view_on_event_right_click): disable the meeting and meeting organizer mask if appropriate (e_day_view_delete_event_internal): offer to cancel meeting (e_day_view_on_cut): ditto (e_day_view_finish_long_event_resize): only update request if user is organizer (e_day_view_reshape_long_event): add meeting icon to count (e_day_view_reshape_day_event): ditto (e_day_view_on_top_canvas_drag_data_received): only update request if user is organizer (e_day_view_on_main_canvas_drag_data_received): ditto (selection_received): offer to send meeting info * gui/e-day-view-main-item.c (e_day_view_main_item_draw_day_event): draw meeting icon if appropriate (using dummy icon atm) svn path=/trunk/; revision=17491
Diffstat (limited to 'calendar/gui/e-day-view-main-item.c')
-rw-r--r--calendar/gui/e-day-view-main-item.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index f28e0c6a2b..201f0cbc52 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -478,7 +478,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
CalComponent *comp;
gint num_icons, icon_x, icon_y, icon_x_inc, icon_y_inc;
gint max_icon_w, max_icon_h;
- gboolean draw_reminder_icon, draw_recurrence_icon, draw_timezone_icon;
+ gboolean draw_reminder_icon, draw_recurrence_icon, draw_timezone_icon, draw_meeting_icon;
GSList *categories_list, *elem;
CalComponentTransparency transparency;
@@ -580,6 +580,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
draw_reminder_icon = FALSE;
draw_recurrence_icon = FALSE;
draw_timezone_icon = FALSE;
+ draw_meeting_icon = FALSE;
icon_x = item_x + E_DAY_VIEW_BAR_WIDTH + E_DAY_VIEW_ICON_X_PAD;
icon_y = item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT
+ E_DAY_VIEW_ICON_Y_PAD;
@@ -602,6 +603,10 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
num_icons++;
}
+ if (cal_component_has_organizer (comp)) {
+ draw_meeting_icon = TRUE;
+ num_icons++;
+ }
cal_component_get_categories_list (comp, &categories_list);
for (elem = categories_list; elem; elem = elem->next) {
@@ -684,6 +689,26 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
icon_y += icon_y_inc;
}
+
+ if (draw_meeting_icon) {
+ max_icon_w = item_x + item_w - icon_x
+ - E_DAY_VIEW_EVENT_BORDER_WIDTH;
+ max_icon_h = item_y + item_h - icon_y
+ - E_DAY_VIEW_EVENT_BORDER_HEIGHT;
+
+ gdk_gc_set_clip_origin (gc, icon_x, icon_y);
+ gdk_gc_set_clip_mask (gc, day_view->meeting_mask);
+ gdk_draw_pixmap (drawable, gc,
+ day_view->meeting_icon,
+ 0, 0, icon_x, icon_y,
+ MIN (E_DAY_VIEW_ICON_WIDTH,
+ max_icon_w),
+ MIN (E_DAY_VIEW_ICON_HEIGHT,
+ max_icon_h));
+ icon_x += icon_x_inc;
+ icon_y += icon_y_inc;
+ }
+
/* draw categories icons */
for (elem = categories_list; elem; elem = elem->next) {
char *category;