aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog13
-rw-r--r--calendar/gui/e-day-view.c35
-rw-r--r--calendar/gui/e-week-view.c28
3 files changed, 41 insertions, 35 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 3f80e4274e..aed95fc8be 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,16 @@
+2008-11-11 Suman Manjunath <msuman@novell.com>
+
+ ** Fix for bug #490503
+
+ * gui/e-day-view.c (set_text_as_bold),
+ (e_day_view_update_event_label),
+ (e_day_view_update_long_event_label):
+ * gui/e-week-view.c (set_text_as_bold),
+ (e_week_view_reshape_event_span):
+ Summary of unaccepted meetings in calendar views now appear as bolded.
+ If the meeting was sent to a mailing-list - the summary will always
+ appear as normal.
+
2008-11-10 Suman Manjunath <msuman@novell.com>
** Fix for bug #443190 (bugzilla.novell.com)
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 0b27c94569..2943b6dcd5 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -1775,41 +1775,38 @@ e_day_view_remove_event_cb (EDayView *day_view,
return TRUE;
}
-#if 0
-/* Checks if the users participation status is Needs action and shows the summary as bold text*/
+/* Checks if the users participation status is NEEDS-ACTION and shows the summary as bold text */
static void
set_text_as_bold (EDayViewEvent *event)
{
ECalComponent *comp;
- char *address;
- GSList *attendees, *l;
+ GSList *attendees = NULL, *l;
+ gchar *address;
ECalComponentAttendee *at = NULL;
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
address = itip_get_comp_attendee (comp, event->comp_data->client);
e_cal_component_get_attendee_list (comp, &attendees);
-
for (l = attendees; l; l = l->next) {
ECalComponentAttendee *attendee = l->data;
- if (g_str_equal (itip_strip_mailto (attendee->value), address)) {
+ if ((g_str_equal (itip_strip_mailto (attendee->value), address))
+ || (attendee->sentby && g_str_equal (itip_strip_mailto (attendee->sentby), address))) {
at = attendee;
break;
}
}
-
- /* The attendee has not yet accepted the meeting, display the summary as bolded .
- If the attendee is not present, it might have come through a mailing list*/
- if (!at || (at->status == ICAL_PARTSTAT_NEEDSACTION)) {
- gnome_canvas_item_set (event->canvas_item, "bold", TRUE, NULL);
- }
-
e_cal_component_free_attendee_list (attendees);
- g_object_unref (comp);
g_free (address);
+ g_object_unref (comp);
+
+ /* The attendee has not yet accepted the meeting, display the summary as bolded.
+ If the attendee is not present, it might have come through a mailing list.
+ In that case, we never show the meeting as bold even if it is unaccepted. */
+ if (at && (at->status == ICAL_PARTSTAT_NEEDSACTION))
+ gnome_canvas_item_set (event->canvas_item, "bold", TRUE, NULL);
}
-#endif
/* This updates the text shown for an event. If the event start or end do not
lie on a row boundary, the time is displayed before the summary. */
@@ -1859,9 +1856,9 @@ e_day_view_update_event_label (EDayView *day_view,
"text", text,
NULL);
-/* if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)
+ if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)
&& e_cal_util_component_has_attendee (event->comp_data->icalcomp))
- set_text_as_bold (event); */
+ set_text_as_bold (event);
if (free_text)
g_free (text);
@@ -1891,9 +1888,9 @@ e_day_view_update_long_event_label (EDayView *day_view,
if (free_text)
g_free ((gchar*)summary);
-/* if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)
+ if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)
&& e_cal_util_component_has_attendee (event->comp_data->icalcomp))
- set_text_as_bold (event); */
+ set_text_as_bold (event);
}
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index bd308ac35c..87bb60095f 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -1877,41 +1877,38 @@ e_week_view_recalc_display_start_day (EWeekView *week_view)
return FALSE;
}
-#if 0
-/* Checks if the users participation status is Needs action and shows the summary as bold text*/
+/* Checks if the users participation status is NEEDS-ACTION and shows the summary as bold text */
static void
set_text_as_bold (EWeekViewEvent *event, EWeekViewEventSpan *span)
{
ECalComponent *comp;
- char *address;
- GSList *attendees, *l;
+ GSList *attendees = NULL, *l;
+ gchar *address;
ECalComponentAttendee *at = NULL;
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
address = itip_get_comp_attendee (comp, event->comp_data->client);
e_cal_component_get_attendee_list (comp, &attendees);
-
for (l = attendees; l; l = l->next) {
ECalComponentAttendee *attendee = l->data;
- if (g_str_equal (itip_strip_mailto (attendee->value), address)) {
+ if ((g_str_equal (itip_strip_mailto (attendee->value), address))
+ || (attendee->sentby && g_str_equal (itip_strip_mailto (attendee->sentby), address))) {
at = attendee;
break;
}
}
+ e_cal_component_free_attendee_list (attendees);
+ g_free (address);
+ g_object_unref (comp);
/* The attendee has not yet accepted the meeting, display the summary as bolded.
- If the attendee is not present, it might have come through a mailing list*/
- if (!at || (at->status == ICAL_PARTSTAT_NEEDSACTION)) {
+ If the attendee is not present, it might have come through a mailing list.
+ In that case, we never show the meeting as bold even if it is unaccepted. */
+ if (at && (at->status == ICAL_PARTSTAT_NEEDSACTION))
gnome_canvas_item_set (span->text_item, "bold", TRUE, NULL);
- }
-
- e_cal_component_free_attendee_list (attendees);
- g_object_unref (comp);
- g_free (address);
}
-#endif
/* This calls a given function for each event instance that matches the given
uid. Note that it is safe for the callback to remove the event (since we
@@ -2816,11 +2813,10 @@ e_week_view_reshape_event_span (EWeekView *week_view,
if (free_text)
g_free ((gchar*)summary);
-/* Uncomment once the pango fix is in
if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)
&& e_cal_util_component_has_attendee (event->comp_data->icalcomp)) {
set_text_as_bold (event, span);
- } */
+ }
g_object_set_data (G_OBJECT (span->text_item), "event-num", GINT_TO_POINTER (event_num));
g_signal_connect (span->text_item, "event",
G_CALLBACK (e_week_view_on_text_item_event),