diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2004-01-08 21:40:02 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2004-01-08 21:40:02 +0800 |
commit | 6c03fe5e109b688790dd5bbf313b27ccb83c991c (patch) | |
tree | 400086a5d6fd34cc6ba18edaffef50d415819402 /calendar | |
parent | e57648855e9dc8d8ca727a50eca72895750e6c46 (diff) | |
download | gsoc2013-evolution-6c03fe5e109b688790dd5bbf313b27ccb83c991c.tar.gz gsoc2013-evolution-6c03fe5e109b688790dd5bbf313b27ccb83c991c.tar.zst gsoc2013-evolution-6c03fe5e109b688790dd5bbf313b27ccb83c991c.zip |
moved the line that sets priv->updating to FALSE up some lines, to avoid
2004-01-08 Rodrigo Moya <rodrigo@ximian.com>
* gui/dialogs/comp-editor.c (save_comp): moved the line that sets
priv->updating to FALSE up some lines, to avoid getting callbacks
with an incorrect value on it.
(obj_modified_cb): check the UIDs of the objects we get passed to
see if the one being edited is amongst them.
svn path=/trunk/; revision=24108
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 2 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 25 |
2 files changed, 22 insertions, 5 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index dd55494189..60d8be4597 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -11,7 +11,7 @@ * gui/e-cal-view.h: delete the ECalViewMoveDirection type declaration which was added by mistake yesterday. - * Changelog: add a missed entry for calender-commands.c. + * ChangeLog: add a missed entry for calender-commands.c. 2004-01-07 Rodrigo Moya <rodrigo@ximian.com> diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index ef907aa162..e29c6c1ce6 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -393,8 +393,10 @@ save_comp (CompEditor *editor) result = e_cal_create_object (priv->client, e_cal_component_get_icalcomponent (priv->comp), NULL, &error); } else { result = e_cal_modify_object (priv->client, e_cal_component_get_icalcomponent (priv->comp), priv->mod, &error); - } - + } + + priv->updating = FALSE; + if (!result) { GtkWidget *dlg; char *msg; @@ -428,8 +430,6 @@ save_comp (CompEditor *editor) priv->changed = FALSE; } - priv->updating = FALSE; - return TRUE; } @@ -1525,10 +1525,27 @@ obj_modified_cb (ECal *client, GList *objects, gpointer data) { CompEditor *editor = COMP_EDITOR (data); CompEditorPrivate *priv; + GList *l; + gboolean found = FALSE; ECalComponent *comp = NULL; priv = editor->priv; + /* see if the component being edited is one that has changed */ + for (l = objects; l != NULL; l = l->next) { + const char *our_uid, *uid; + + e_cal_component_get_uid (priv->comp, &our_uid); + uid = icalcomponent_get_uid (l->data); + if (uid && our_uid && strcmp (uid, our_uid) == 0) { + found = TRUE; + break; + } + } + + if (!found) + return; + /* We queried based on a specific UID so we definitely changed */ if (priv->updating) return; |