aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2007-11-26 18:16:52 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-11-26 18:16:52 +0800
commite1cbf635f8c681643294d74eceba71ad8aa5a046 (patch)
treeab5285a7e8f0b139e3ecab4f20d6f2efc48bb0ff /calendar/gui/dialogs
parentced5862cb604ccaad1ff82090b972b875e36724b (diff)
downloadgsoc2013-evolution-e1cbf635f8c681643294d74eceba71ad8aa5a046.tar
gsoc2013-evolution-e1cbf635f8c681643294d74eceba71ad8aa5a046.tar.gz
gsoc2013-evolution-e1cbf635f8c681643294d74eceba71ad8aa5a046.tar.bz2
gsoc2013-evolution-e1cbf635f8c681643294d74eceba71ad8aa5a046.tar.lz
gsoc2013-evolution-e1cbf635f8c681643294d74eceba71ad8aa5a046.tar.xz
gsoc2013-evolution-e1cbf635f8c681643294d74eceba71ad8aa5a046.tar.zst
gsoc2013-evolution-e1cbf635f8c681643294d74eceba71ad8aa5a046.zip
** Fix for bug #380644
2007-11-26 Milan Crha <mcrha@redhat.com> ** Fix for bug #380644 * gui/dialogs/task-page.h: (task_page_add_attendee): * gui/dialogs/task-page.c: (task_page_add_attendee): * gui/dialogs/event-page.h: (event_page_add_attendee): * gui/dialogs/event-page.c: (event_page_add_attendee): New function to add attendee to store and name selector. * gui/dialogs/task-page.c: (remove_attendee): Remove attendee also from name selector (keep consistent). * gui/dialogs/task-editor.c: (task_editor_edit_comp): Use task_page_add_attendee to add known attendees. * gui/dialogs/event-editor.c: (event_editor_edit_comp): Use event_page_add_attendee to add known attendees. * gui/e-meeting-store.c: (e_meeting_store_remove_all_attendees), (e_meeting_store_remove_attendee): Code cleanup by Matthew Barnes. svn path=/trunk/; revision=34582
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/event-editor.c5
-rw-r--r--calendar/gui/dialogs/event-page.c20
-rw-r--r--calendar/gui/dialogs/event-page.h3
-rw-r--r--calendar/gui/dialogs/task-editor.c4
-rw-r--r--calendar/gui/dialogs/task-page.c22
-rw-r--r--calendar/gui/dialogs/task-page.h1
6 files changed, 48 insertions, 7 deletions
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index e5081f8a34..97c5358b9d 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -720,10 +720,9 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
if (!comp_editor_get_user_org (editor) || e_meeting_attendee_is_set_delto (ia))
e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
+ event_page_add_attendee (priv->event_page, ia);
- e_meeting_store_add_attendee (priv->model, ia);
-
- g_object_unref(ia);
+ g_object_unref (ia);
}
/* If we aren't the organizer we can still change our own status */
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 7e5e2b8dda..5105773b8b 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -3378,3 +3378,23 @@ event_page_get_name_selector (EventPage *epage)
return e_meeting_list_view_get_name_selector (priv->list_view);
}
+
+/**
+ * event_page_add_attendee
+ * Add attendee to meeting store and name selector.
+ * @param epage EventPage.
+ * @param attendee Attendee to be added.
+ **/
+void
+event_page_add_attendee (EventPage *epage, EMeetingAttendee *attendee)
+{
+ EventPagePrivate *priv;
+
+ g_return_if_fail (epage != NULL);
+ g_return_if_fail (IS_EVENT_PAGE (epage));
+
+ priv = epage->priv;
+
+ 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);
+}
diff --git a/calendar/gui/dialogs/event-page.h b/calendar/gui/dialogs/event-page.h
index c2a5f59569..0d711379c6 100644
--- a/calendar/gui/dialogs/event-page.h
+++ b/calendar/gui/dialogs/event-page.h
@@ -79,8 +79,7 @@ void event_page_set_view_status (EventPage *epage, gboolean state);
void event_page_set_view_type (EventPage *epage, gboolean state);
void event_page_set_view_rvsp (EventPage *epage, gboolean state);
ENameSelector *event_page_get_name_selector (EventPage *epage);
-
-
+void event_page_add_attendee (EventPage *epage, EMeetingAttendee *attendee);
G_END_DECLS
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 8c9ee465e6..bf79e6433c 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -522,9 +522,9 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
/* If we aren't the organizer or the attendee is just delegating, don't allow editing */
if (!comp_editor_get_user_org (editor) || e_meeting_attendee_is_set_delto (ia))
e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
- e_meeting_store_add_attendee (priv->model, ia);
+ task_page_add_attendee (priv->task_page, ia);
- g_object_unref(ia);
+ g_object_unref (ia);
}
/* If we aren't the organizer we can still change our own status */
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 8226b750ae..f0864edd5e 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -1120,6 +1120,8 @@ remove_attendee (TaskPage *page, EMeetingAttendee *ia)
if (e_meeting_attendee_get_delto (ia) != NULL)
ib = e_meeting_store_find_attendee (priv->model, e_meeting_attendee_get_delto (ia), NULL);
+
+ e_meeting_list_view_remove_attendee_from_name_selector (priv->list_view, ia);
e_meeting_store_remove_attendee (priv->model, ia);
ia = ib;
@@ -2256,3 +2258,23 @@ task_page_create_source_combo_box (void)
gtk_widget_show (combo_box);
return combo_box;
}
+
+/**
+ * task_page_add_attendee
+ * Add attendee to meeting store and name selector.
+ * @param tpage TaskPage.
+ * @param attendee Attendee to be added.
+ **/
+void
+task_page_add_attendee (TaskPage *tpage, EMeetingAttendee *attendee)
+{
+ TaskPagePrivate *priv;
+
+ g_return_if_fail (tpage != NULL);
+ g_return_if_fail (IS_TASK_PAGE (tpage));
+
+ priv = tpage->priv;
+
+ 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);
+}
diff --git a/calendar/gui/dialogs/task-page.h b/calendar/gui/dialogs/task-page.h
index 67301371e4..37041a033e 100644
--- a/calendar/gui/dialogs/task-page.h
+++ b/calendar/gui/dialogs/task-page.h
@@ -71,6 +71,7 @@ void task_page_set_classification (TaskPage *page, ECalComponentClassification c
void task_page_set_show_timezone (TaskPage *page, gboolean state);
void task_page_set_show_categories (TaskPage *page, gboolean state);
void task_page_set_info_string (TaskPage *tpage, const gchar *icon, const gchar *msg);
+void task_page_add_attendee (TaskPage *tpage, EMeetingAttendee *attendee);
G_END_DECLS