diff options
author | Milan Crha <mcrha@redhat.com> | 2009-04-25 02:53:03 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-04-28 20:03:33 +0800 |
commit | d36734fb447805f8aff516b512b032207d5c17c3 (patch) | |
tree | 34371321cd16d6104ecc4e105367aeb195fb70e4 | |
parent | 8ea80f62e5a7058095d52bef6df909702666f995 (diff) | |
download | gsoc2013-evolution-d36734fb447805f8aff516b512b032207d5c17c3.tar gsoc2013-evolution-d36734fb447805f8aff516b512b032207d5c17c3.tar.gz gsoc2013-evolution-d36734fb447805f8aff516b512b032207d5c17c3.tar.bz2 gsoc2013-evolution-d36734fb447805f8aff516b512b032207d5c17c3.tar.lz gsoc2013-evolution-d36734fb447805f8aff516b512b032207d5c17c3.tar.xz gsoc2013-evolution-d36734fb447805f8aff516b512b032207d5c17c3.tar.zst gsoc2013-evolution-d36734fb447805f8aff516b512b032207d5c17c3.zip |
Calendar - do not close editor after error
** Fix for bug #573704
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 20 |
2 files changed, 20 insertions, 7 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 0885b506ae..3e574be3ca 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,12 @@ 2009-04-24 Milan Crha <mcrha@redhat.com> + ** Fix for bug #573704 + + * gui/dialogs/comp-editor.c: (action_save_cb), (real_send_comp): + Do not close editor after error. + +2009-04-24 Milan Crha <mcrha@redhat.com> + ** Part of fix for bug #571272 * gui/e-cal-model.c: (search_by_id_and_client): Possible leak fix. diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 4db6c66b12..5d1f7a25d6 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -890,9 +890,11 @@ action_save_cb (GtkAction *action, g_clear_error (&error); } - } + } else + correct = FALSE; - close_dialog (editor); + if (correct) + close_dialog (editor); } static void @@ -2505,14 +2507,13 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str set_attendees_for_delegation (send_comp, address, method); } - if (!e_cal_component_has_attachments (priv->comp) - || e_cal_get_static_capability (priv->client, CAL_STATIC_CAPABILITY_CREATE_MESSAGES)) { + if (!e_cal_component_has_attachments (priv->comp) + || e_cal_get_static_capability (priv->client, CAL_STATIC_CAPABILITY_CREATE_MESSAGES)) { if (itip_send_comp (method, send_comp, priv->client, NULL, NULL, users, strip_alarms)) { g_object_unref (send_comp); return TRUE; } - } else { /* Clone the component with attachments set to CID:... */ int num_attachments, i; @@ -2530,9 +2531,14 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str mime_attach_list = comp_editor_get_mime_attach_list (editor); if (itip_send_comp (method, send_comp, priv->client, NULL, mime_attach_list, users, strip_alarms)) { - save_comp (editor); + gboolean saved = save_comp (editor); + g_object_unref (send_comp); - return TRUE; + + if (!saved) + comp_editor_set_changed (editor, TRUE); + + return saved; } } |