From 6233ffcdc44f613aed1314ed2c8ac605115b5fa4 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Wed, 22 Jun 2005 14:32:36 +0000 Subject: Commiting the fix for free busy and sensitizing the attachment bar properly. svn path=/trunk/; revision=29566 --- calendar/gui/dialogs/comp-editor.c | 3 --- calendar/gui/dialogs/event-editor.c | 27 +++++++++++++++------------ calendar/gui/dialogs/event-page.c | 5 ++--- 3 files changed, 17 insertions(+), 18 deletions(-) (limited to 'calendar/gui/dialogs') diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index e7bc7efa9c..3f4b33b5b0 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -1817,9 +1817,6 @@ real_edit_comp (CompEditor *editor, ECalComponent *comp) e_cal_get_local_attachment_store (priv->client)); cal_attachment_bar_set_comp_uid (priv->attachment_bar, g_strdup (uid)); - if (!itip_organizer_is_user (comp, priv->client)) - comp_editor_sensitize_attachment_bar (editor, FALSE); - fill_widgets (editor); priv->changed =FALSE; diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index 01ec3936f1..6566f7198c 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -130,6 +130,7 @@ event_editor_construct (EventEditor *ee, ECal *client) { EventEditorPrivate *priv; gboolean read_only = FALSE; + guint32 flags = comp_editor_get_flags (COMP_EDITOR (ee)); priv = ee->priv; @@ -151,19 +152,23 @@ event_editor_construct (EventEditor *ee, ECal *client) if (!e_cal_is_read_only (client, &read_only, NULL)) read_only = TRUE; - comp_editor_sensitize_attachment_bar (COMP_EDITOR (ee), !read_only); + comp_editor_sensitize_attachment_bar (COMP_EDITOR (ee), !read_only && + (flags & COMP_EDITOR_USER_ORG)); if (priv->is_meeting) { + if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS)) event_page_show_options (priv->event_page); comp_editor_set_group_item (COMP_EDITOR (ee), TRUE); - priv->sched_page = schedule_page_new (priv->model); - g_object_ref (priv->sched_page); - gtk_object_sink (GTK_OBJECT (priv->sched_page)); - comp_editor_append_page (COMP_EDITOR (ee), - COMP_EDITOR_PAGE (priv->sched_page), - _("Scheduling")); + if ((flags & COMP_EDITOR_USER_ORG) || (flags & COMP_EDITOR_DELEGATE)) { + priv->sched_page = schedule_page_new (priv->model); + g_object_ref (priv->sched_page); + gtk_object_sink (GTK_OBJECT (priv->sched_page)); + comp_editor_append_page (COMP_EDITOR (ee), + COMP_EDITOR_PAGE (priv->sched_page), + _("Scheduling")); + } priv->meet_page = meeting_page_new (priv->model, client); g_object_ref (priv->meet_page); @@ -231,7 +236,7 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp) e_meeting_store_remove_all_attendees (priv->model); /* Set up the attendees */ - if (attendees == NULL && !(comp_editor_get_flags (COMP_EDITOR (editor)) & COMP_EDITOR_DELEGATE)) { + if (attendees == NULL && !delegate) { if (priv->meet_page) comp_editor_remove_page (editor, COMP_EDITOR_PAGE (priv->meet_page)); if (priv->sched_page) @@ -414,7 +419,6 @@ show_meeting (EventEditor *ee) priv = ee->priv; - event_page_set_meeting (priv->event_page, TRUE); if (!priv->meeting_shown) { comp_editor_append_page (COMP_EDITOR (ee), @@ -428,9 +432,8 @@ show_meeting (EventEditor *ee) comp_editor_set_changed (COMP_EDITOR (ee), FALSE); comp_editor_set_needs_send (COMP_EDITOR (ee), priv->meeting_shown); } - if (comp_editor_get_flags (COMP_EDITOR (ee)) & COMP_EDITOR_DELEGATE) - comp_editor_show_page (COMP_EDITOR (ee), COMP_EDITOR_PAGE (priv->meet_page)); - + if (comp_editor_get_flags (COMP_EDITOR (ee)) & COMP_EDITOR_DELEGATE) + comp_editor_show_page (COMP_EDITOR (ee), COMP_EDITOR_PAGE (priv->meet_page)); } void diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 5c934f338f..3406e52351 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -680,7 +680,6 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) ECalComponentClassification cl; ECalComponentTransparency transparency; ECalComponentDateTime start_date, end_date; - icalcomponent *icalcomp = NULL; const char *location, *uid = NULL; const char *categories; ESource *source; @@ -802,8 +801,8 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) e_source_option_menu_select (E_SOURCE_OPTION_MENU (priv->source_selector), source); e_cal_component_get_uid (comp, &uid); - if (!(COMP_EDITOR_PAGE (epage)->flags & COMP_EDITOR_PAGE_DELEGATE) && e_cal_get_object (COMP_EDITOR_PAGE (epage)->client, uid, NULL, &icalcomp, NULL)) { - icalcomponent_free (icalcomp); + if (!(COMP_EDITOR_PAGE (epage)->flags & COMP_EDITOR_PAGE_DELEGATE) + && !(COMP_EDITOR_PAGE (epage)->flags && COMP_EDITOR_PAGE_NEW_ITEM)) { event_page_hide_options (epage); } -- cgit