aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-02-01 03:03:12 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-02-01 03:03:12 +0800
commitfee5916b60c605ff5086d8fdc2a85c5ea21351f6 (patch)
tree4feaede1cf070448a32bd0ab846908e47747ceb7 /calendar/gui/dialogs
parentcd5ff486fb02451645f8b4b39608edca2da5e4a2 (diff)
downloadgsoc2013-evolution-fee5916b60c605ff5086d8fdc2a85c5ea21351f6.tar.gz
gsoc2013-evolution-fee5916b60c605ff5086d8fdc2a85c5ea21351f6.tar.zst
gsoc2013-evolution-fee5916b60c605ff5086d8fdc2a85c5ea21351f6.zip
Merge revisions 37108:37199 from trunk.
svn path=/branches/kill-bonobo/; revision=37200
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/e-send-options-utils.c2
-rw-r--r--calendar/gui/dialogs/event-editor.c2
-rw-r--r--calendar/gui/dialogs/event-page.c57
-rw-r--r--calendar/gui/dialogs/event-page.h1
-rw-r--r--calendar/gui/dialogs/task-page.c5
5 files changed, 47 insertions, 20 deletions
diff --git a/calendar/gui/dialogs/e-send-options-utils.c b/calendar/gui/dialogs/e-send-options-utils.c
index fde53ca336..52f73aed02 100644
--- a/calendar/gui/dialogs/e-send-options-utils.c
+++ b/calendar/gui/dialogs/e-send-options-utils.c
@@ -192,7 +192,7 @@ e_sendoptions_utils_fill_component (ESendOptionsDialog *sod, ECalComponent *comp
icaltimezone *zone = calendar_config_get_icaltimezone ();
temp = icaltime_from_timet_with_zone (gopts->delay_until, FALSE, zone);
- str = icaltime_as_ical_string (temp);
+ str = icaltime_as_ical_string_r (temp);
prop = icalproperty_new_x (str);
g_free (str);
icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-DELAY");
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 620600369e..e2ca71c5cb 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -568,6 +568,8 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
}
if (!(delegate && e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY))) {
+ event_page_remove_all_attendees (priv->event_page);
+
for (l = attendees; l != NULL; l = l->next) {
ECalComponentAttendee *ca = l->data;
EMeetingAttendee *ia;
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 53707432d9..2faed38a39 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -1820,27 +1820,28 @@ attendee_added_cb (EMeetingListView *emlv,
client = comp_editor_get_client (editor);
flags = comp_editor_get_flags (editor);
- if (flags & COMP_EDITOR_DELEGATE) {
- if (existing_attendee (ia, priv->comp))
- e_meeting_store_remove_attendee (priv->model, ia);
- else {
- if (!e_cal_get_static_capability (client,
- CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY)) {
- const char *delegator_id = e_meeting_attendee_get_delfrom (ia);
- EMeetingAttendee *delegator;
+ if (!(flags & COMP_EDITOR_DELEGATE))
+ return;
+
+ if (existing_attendee (ia, priv->comp)) {
+ e_meeting_store_remove_attendee (priv->model, ia);
+ } else {
+ if (!e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY)) {
+ const char *delegator_id = e_meeting_attendee_get_delfrom (ia);
+ EMeetingAttendee *delegator;
- delegator = e_meeting_store_find_attendee (priv->model, delegator_id, NULL);
- e_meeting_attendee_set_delto (delegator,
- g_strdup (e_meeting_attendee_get_address (ia)));
+ delegator = e_meeting_store_find_attendee (priv->model, delegator_id, NULL);
- e_meeting_attendee_set_delfrom (ia, g_strdup_printf ("MAILTO:%s", delegator_id));
- gtk_widget_set_sensitive (priv->invite, FALSE);
- gtk_widget_set_sensitive (priv->add, FALSE);
- gtk_widget_set_sensitive (priv->edit, FALSE);
- }
- }
-}
+ g_return_if_fail (delegator != NULL);
+ e_meeting_attendee_set_delto (delegator, g_strdup (e_meeting_attendee_get_address (ia)));
+
+ e_meeting_attendee_set_delfrom (ia, g_strdup (delegator_id));
+ gtk_widget_set_sensitive (priv->invite, FALSE);
+ gtk_widget_set_sensitive (priv->add, FALSE);
+ gtk_widget_set_sensitive (priv->edit, FALSE);
+ }
+ }
}
/* Callbacks for list view*/
@@ -3250,3 +3251,23 @@ event_page_add_attendee (EventPage *epage, EMeetingAttendee *attendee)
e_meeting_store_add_attendee (priv->model, attendee);
e_meeting_list_view_add_attendee_to_name_selector (E_MEETING_LIST_VIEW (priv->list_view), attendee);
}
+
+/**
+ * event_page_remove_all_attendees
+ * Removes all attendees from the meeting store and name selector.
+ * @param epage EventPage.
+ **/
+void
+event_page_remove_all_attendees (EventPage *epage)
+{
+ EventPagePrivate *priv;
+
+ g_return_if_fail (epage != NULL);
+ g_return_if_fail (IS_EVENT_PAGE (epage));
+
+ priv = epage->priv;
+
+ e_meeting_store_remove_all_attendees (priv->model);
+ e_meeting_list_view_remove_all_attendees_from_name_selector (E_MEETING_LIST_VIEW (priv->list_view));
+}
+
diff --git a/calendar/gui/dialogs/event-page.h b/calendar/gui/dialogs/event-page.h
index 7c868f1d3d..63c0bd2306 100644
--- a/calendar/gui/dialogs/event-page.h
+++ b/calendar/gui/dialogs/event-page.h
@@ -108,6 +108,7 @@ void event_page_set_view_rvsp (EventPage *epage,
ENameSelector * event_page_get_name_selector (EventPage *epage);
void event_page_add_attendee (EventPage *epage,
EMeetingAttendee *attendee);
+void event_page_remove_all_attendees (EventPage *epage);
G_END_DECLS
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 7d674d20a0..b81119c5cf 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -1155,8 +1155,11 @@ attendee_added_cb (EMeetingListView *emlv,
EMeetingAttendee *delegator;
delegator = e_meeting_store_find_attendee (priv->model, delegator_id, NULL);
+
+ g_return_if_fail (delegator != NULL);
+
e_meeting_attendee_set_delto (delegator,
- g_strdup (e_meeting_attendee_get_address (ia)));
+ g_strdup (e_meeting_attendee_get_address (ia)));
gtk_widget_set_sensitive (priv->invite, FALSE);
gtk_widget_set_sensitive (priv->add, FALSE);