From 732c21a0a85b742dd5741b6b1f9823892a62509e Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Wed, 15 Aug 2001 15:30:45 +0000 Subject: only fill the component and save it if something has changed 2001-08-15 JP Rosevear * gui/dialogs/comp-editor.c (save_comp): only fill the component and save it if something has changed (save_comp_with_send): only try to send if something has changed and the editor needs a send svn path=/trunk/; revision=12052 --- calendar/ChangeLog | 7 +++++++ calendar/gui/dialogs/comp-editor.c | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index fd94438051..99b3d7e9b7 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2001-08-15 JP Rosevear + + * gui/dialogs/comp-editor.c (save_comp): only fill the component + and save it if something has changed + (save_comp_with_send): only try to send if something has changed + and the editor needs a send + 2001-08-15 Federico Mena Quintero * gui/dialogs/cal-prefs-dialog.glade: OK, re-added the default diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 447d5b4fa0..2cbf403cd3 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -721,6 +721,9 @@ save_comp (CompEditor *editor) GList *l; priv = editor->priv; + + if (!priv->changed) + return; for (l = priv->pages; l != NULL; l = l->next) comp_editor_page_fill_component (l->data, priv->comp); @@ -740,12 +743,15 @@ static void save_comp_with_send (CompEditor *editor) { CompEditorPrivate *priv; - + gboolean send; + priv = editor->priv; + send = priv->changed && priv->needs_send; + save_comp (editor); - if (priv->needs_send && send_component_dialog (priv->comp)) + if (send && send_component_dialog (priv->comp)) comp_editor_send_comp (editor, CAL_COMPONENT_METHOD_REQUEST); } -- cgit v1.2.3