diff options
author | Milan Crha <mcrha@redhat.com> | 2011-09-26 17:08:46 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-09-26 18:56:07 +0800 |
commit | 8a0ae7db0077177d3e34c9ae00dcd54f2f882bd1 (patch) | |
tree | a25a21fc06208ccce9c3162be203c8d79df24aa3 /calendar/gui/dialogs/comp-editor.c | |
parent | 981d3d17680fd8592c8593732b2640f17ad6d572 (diff) | |
download | gsoc2013-evolution-8a0ae7db0077177d3e34c9ae00dcd54f2f882bd1.tar gsoc2013-evolution-8a0ae7db0077177d3e34c9ae00dcd54f2f882bd1.tar.gz gsoc2013-evolution-8a0ae7db0077177d3e34c9ae00dcd54f2f882bd1.tar.bz2 gsoc2013-evolution-8a0ae7db0077177d3e34c9ae00dcd54f2f882bd1.tar.lz gsoc2013-evolution-8a0ae7db0077177d3e34c9ae00dcd54f2f882bd1.tar.xz gsoc2013-evolution-8a0ae7db0077177d3e34c9ae00dcd54f2f882bd1.tar.zst gsoc2013-evolution-8a0ae7db0077177d3e34c9ae00dcd54f2f882bd1.zip |
Bug #657170 - Disallow creating assigned tasks when not supported
Diffstat (limited to 'calendar/gui/dialogs/comp-editor.c')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index fc062a0de9..5efab7920c 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -960,6 +960,18 @@ action_save_cb (GtkAction *action, return; } + if ((comp_editor_get_flags (editor) & COMP_EDITOR_IS_ASSIGNED) != 0 + && e_cal_component_get_vtype (priv->comp) == E_CAL_COMPONENT_TODO + && e_client_check_capability (E_CLIENT (priv->cal_client), CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT)) { + e_alert_submit ( + E_ALERT_SINK (editor), + "calendar:prompt-no-task-assignment-editor", + e_source_peek_name ( + e_client_get_source (E_CLIENT (priv->cal_client))), + NULL); + return; + } + commit_all_fields (editor); if (e_cal_component_has_recurrences (priv->comp)) { if (!recur_component_dialog ( @@ -2209,6 +2221,18 @@ prompt_and_save_changes (CompEditor *editor, return FALSE; } + if ((comp_editor_get_flags (editor) & COMP_EDITOR_IS_ASSIGNED) != 0 + && e_cal_component_get_vtype (priv->comp) == E_CAL_COMPONENT_TODO + && e_client_check_capability (E_CLIENT (priv->cal_client), CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT)) { + e_alert_submit ( + E_ALERT_SINK (editor), + "calendar:prompt-no-task-assignment-editor", + e_source_peek_name ( + e_client_get_source (E_CLIENT (priv->cal_client))), + NULL); + return FALSE; + } + comp = comp_editor_get_current_comp (editor, &correct); e_cal_component_get_summary (comp, &text); g_object_unref (comp); |