diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2005-06-08 23:41:12 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2005-06-08 23:41:12 +0800 |
commit | 5a150fae3cc3aa122db2d4ee5f040604e09ed8c6 (patch) | |
tree | b647d44f4d69e384125d7612277c50318cebee42 /calendar/gui/dialogs/event-editor.c | |
parent | bf7287dedcb5a5dc17d45339fdea81e3acec648a (diff) | |
download | gsoc2013-evolution-5a150fae3cc3aa122db2d4ee5f040604e09ed8c6.tar gsoc2013-evolution-5a150fae3cc3aa122db2d4ee5f040604e09ed8c6.tar.gz gsoc2013-evolution-5a150fae3cc3aa122db2d4ee5f040604e09ed8c6.tar.bz2 gsoc2013-evolution-5a150fae3cc3aa122db2d4ee5f040604e09ed8c6.tar.lz gsoc2013-evolution-5a150fae3cc3aa122db2d4ee5f040604e09ed8c6.tar.xz gsoc2013-evolution-5a150fae3cc3aa122db2d4ee5f040604e09ed8c6.tar.zst gsoc2013-evolution-5a150fae3cc3aa122db2d4ee5f040604e09ed8c6.zip |
Disable the meeting editor if the user is not an organizer wherever
necessary
svn path=/trunk/; revision=29474
Diffstat (limited to 'calendar/gui/dialogs/event-editor.c')
-rw-r--r-- | calendar/gui/dialogs/event-editor.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index 223d4c4866..72b4d8246b 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -215,11 +215,16 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp) priv = ee->priv; priv->updating = TRUE; - - if (COMP_EDITOR_CLASS (event_editor_parent_class)->edit_comp) - COMP_EDITOR_CLASS (event_editor_parent_class)->edit_comp (editor, comp); + client = comp_editor_get_e_cal (COMP_EDITOR (editor)); + if (priv->is_meeting && itip_organizer_is_user (comp, client)) { + COMP_EDITOR_PAGE (priv->event_page)->flags |= COMP_EDITOR_PAGE_USER_ORG; + COMP_EDITOR_PAGE (priv->recur_page)->flags |= COMP_EDITOR_PAGE_USER_ORG; + } + + if (COMP_EDITOR_CLASS (event_editor_parent_class)->edit_comp) + COMP_EDITOR_CLASS (event_editor_parent_class)->edit_comp (editor, comp); /* Get meeting related stuff */ e_cal_component_get_organizer (comp, &organizer); @@ -294,6 +299,9 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp) e_cal_component_free_attendee_list (attendees); comp_editor_set_needs_send (COMP_EDITOR (ee), priv->meeting_shown && itip_organizer_is_user (comp, client)); + if (e_cal_component_has_organizer (comp) && (COMP_EDITOR_PAGE (priv->event_page)->flags & + COMP_EDITOR_PAGE_MEETING)) + comp_editor_sensitize_attachment_bar (editor, itip_organizer_is_user (comp, client)); priv->updating = FALSE; } @@ -420,7 +428,8 @@ show_meeting (EventEditor *ee) } 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_existing_org (COMP_EDITOR (ee)) && !comp_editor_get_user_org (COMP_EDITOR (ee))) + comp_editor_remove_page (COMP_EDITOR (ee), COMP_EDITOR_PAGE (priv->sched_page)); } void |