[libgda] Misc corrections
- From: Vivien Malerba <vivien src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libgda] Misc corrections
- Date: Tue, 6 Oct 2009 18:45:47 +0000 (UTC)
commit afe336b1c7df526d25fe36178df302dfa0ada02c
Author: Vivien Malerba <malerba gnome-db org>
Date: Tue Oct 6 20:30:12 2009 +0200
Misc corrections
libgda/gda-data-model-iter.c | 5 +----
libgda/gda-holder.c | 14 +++++++-------
2 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/libgda/gda-data-model-iter.c b/libgda/gda-data-model-iter.c
index 5d59ba0..c340b30 100644
--- a/libgda/gda-data-model-iter.c
+++ b/libgda/gda-data-model-iter.c
@@ -844,11 +844,8 @@ gda_data_model_iter_invalidate_contents (GdaDataModelIter *iter)
g_return_if_fail (iter->priv);
iter->priv->keep_param_changes = TRUE;
- list = GDA_SET (iter)->holders;
- while (list) {
+ for (list = GDA_SET (iter)->holders; list; list = list->next)
gda_holder_force_invalid (GDA_HOLDER (list->data));
- list = g_slist_next (list);
- }
iter->priv->keep_param_changes = FALSE;
}
diff --git a/libgda/gda-holder.c b/libgda/gda-holder.c
index a56ae6d..6a82b03 100644
--- a/libgda/gda-holder.c
+++ b/libgda/gda-holder.c
@@ -1649,17 +1649,17 @@ full_bind_changed_cb (GdaHolder *alias_of, GdaHolder *holder)
{
if (alias_of == holder->priv->simple_bind) {
const GValue *cvalue;
- GError *error = NULL;
+ GError *lerror = NULL;
cvalue = gda_holder_get_value (alias_of);
- if (! gda_holder_set_value (holder, cvalue, &error)) {
- g_warning (_("Could not change GdaHolder to match value change in bound GdaHolder: %s"),
- error && error->message ? error->message : _("No detail"));
- if (error)
- g_error_free (error);
+ if (! gda_holder_set_value (holder, cvalue, &lerror)) {
+ if (lerror && ((lerror->domain != GDA_HOLDER_ERROR) || (lerror->code != GDA_HOLDER_VALUE_NULL_ERROR)))
+ g_warning (_("Could not change GdaHolder to match value change in bound GdaHolder: %s"),
+ lerror && lerror->message ? lerror->message : _("No detail"));
+ g_clear_error (&lerror);
}
}
else
- g_signal_emit (holder, gda_holder_signals[CHANGED], 0);
+ g_signal_emit (holder, gda_holder_signals [CHANGED], 0);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]