[evolution/gnome-3-32] I#378 - Inconsistent Icons for Tasks with Attendees in To-Do bar
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-32] I#378 - Inconsistent Icons for Tasks with Attendees in To-Do bar
- Date: Fri, 29 Mar 2019 09:09:34 +0000 (UTC)
commit 4a1f87187b71c40b7b604e62f60f6e857c944aff
Author: Milan Crha <mcrha redhat com>
Date: Fri Mar 29 10:07:05 2019 +0100
I#378 - Inconsistent Icons for Tasks with Attendees in To-Do bar
Closes https://gitlab.gnome.org/GNOME/evolution/issues/378
src/calendar/gui/e-to-do-pane.c | 33 ++++++++++++++++++++++++++++++---
1 file changed, 30 insertions(+), 3 deletions(-)
---
diff --git a/src/calendar/gui/e-to-do-pane.c b/src/calendar/gui/e-to-do-pane.c
index fdf55c9e68..a9730a8ee8 100644
--- a/src/calendar/gui/e-to-do-pane.c
+++ b/src/calendar/gui/e-to-do-pane.c
@@ -28,6 +28,7 @@
#include "e-cal-data-model-subscriber.h"
#include "e-cal-dialogs.h"
#include "e-cal-ops.h"
+#include "itip-utils.h"
#include "misc.h"
#include "e-to-do-pane.h"
@@ -902,10 +903,36 @@ etdp_add_component (EToDoPane *to_do_pane,
g_slist_free_full (new_root_paths, (GDestroyNotify) gtk_tree_path_free);
- if (e_cal_component_has_attendees (comp)) {
- if (is_task)
+ if (is_task && e_cal_component_has_recurrences (comp)) {
+ icon_name = "stock_task-recurring";
+ } else if (e_cal_component_has_attendees (comp)) {
+ if (is_task) {
+ ESourceRegistry *registry;
+
icon_name = "stock_task-assigned";
- else
+ registry = e_source_registry_watcher_get_registry (to_do_pane->priv->watcher);
+
+ if (itip_organizer_is_user (registry, comp, client)) {
+ icon_name = "stock_task-assigned-to";
+ } else {
+ GSList *attendees = NULL, *link;
+
+ e_cal_component_get_attendee_list (comp, &attendees);
+ for (link = attendees; link; link = g_slist_next (link)) {
+ ECalComponentAttendee *ca = link->data;
+ const gchar *text;
+
+ text = itip_strip_mailto (ca->value);
+ if (itip_address_is_user (registry, text)) {
+ if (ca->delto != NULL)
+ icon_name = "stock_task-assigned-to";
+ break;
+ }
+ }
+
+ e_cal_component_free_attendee_list (attendees);
+ }
+ } else
icon_name = "stock_people";
} else {
if (is_task)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]