[libgda] Correctly print the number of rows in gda_data_model_dump()
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Correctly print the number of rows in gda_data_model_dump()
- Date: Tue, 26 Oct 2010 18:59:53 +0000 (UTC)
commit 70f2376fef89813dd51c13962989abeb0ab67c28
Author: Vivien Malerba <malerba gnome-db org>
Date: Tue Oct 26 20:59:00 2010 +0200
Correctly print the number of rows in gda_data_model_dump()
libgda/gda-data-model.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libgda/gda-data-model.c b/libgda/gda-data-model.c
index 16911ba..b0bb221 100644
--- a/libgda/gda-data-model.c
+++ b/libgda/gda-data-model.c
@@ -2415,7 +2415,10 @@ real_gda_data_model_dump_as_string (GdaDataModel *model, gboolean dump_attribute
g_strfreev (cols_str [i]);
g_free (cols_str);
}
- g_string_append_printf (string, ngettext("(%d row)\n", "(%d rows)\n", n_rows), n_rows);
+ if (n_rows < 0)
+ g_string_append_printf (string, _("(error getting data)\n"));
+ else
+ g_string_append_printf (string, ngettext("(%d row)\n", "(%d rows)\n", n_rows), n_rows);
out:
if (ramodel)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]