[libgda/gtk3] Misc . corrections
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda/gtk3] Misc . corrections
- Date: Wed, 9 Feb 2011 20:35:47 +0000 (UTC)
commit f2ccdec8ab8351312472266b6760167dd7608ceb
Author: Vivien Malerba <malerba gnome-db org>
Date: Mon Jan 31 19:29:58 2011 +0100
Misc . corrections
libgda/gda-data-model-import.c | 2 ++
libgda/gda-data-select.c | 22 ++++++++++++++++++----
tools/gda-sql.c | 2 +-
3 files changed, 21 insertions(+), 5 deletions(-)
---
diff --git a/libgda/gda-data-model-import.c b/libgda/gda-data-model-import.c
index 1c9553c..a9bdebe 100644
--- a/libgda/gda-data-model-import.c
+++ b/libgda/gda-data-model-import.c
@@ -786,6 +786,8 @@ gda_data_model_import_get_property (GObject *object,
* <listitem><para>Other formats: no option</para></listitem>
* </itemizedlist>
*
+ * Note: after the creation, please use gda_data_model_import_get_errors() to check any error.
+ *
* Returns: (transfer full): a pointer to the newly created #GdaDataModel.
*/
GdaDataModel *
diff --git a/libgda/gda-data-select.c b/libgda/gda-data-select.c
index aa7c293..dc5d513 100644
--- a/libgda/gda-data-select.c
+++ b/libgda/gda-data-select.c
@@ -1949,7 +1949,8 @@ gda_data_select_iter_prev (GdaDataModel *model, GdaDataModelIter *iter)
if (imodel->priv->sh->usage_flags & GDA_DATA_MODEL_ACCESS_RANDOM)
return gda_data_model_iter_move_prev_default (model, iter);
- g_return_val_if_fail (CLASS (model)->fetch_prev, FALSE);
+ if (! CLASS (model)->fetch_prev)
+ return FALSE;
g_return_val_if_fail (iter, FALSE);
g_return_val_if_fail (imodel->priv->iter == iter, FALSE);
@@ -2031,9 +2032,22 @@ gda_data_select_iter_at_row (GdaDataModel *model, GdaDataModelIter *iter, gint r
}
else {
/* implementation of fetch_at() is optional */
- TO_IMPLEMENT; /* iter back or forward the right number of times */
- g_object_set (G_OBJECT (iter), "current-row", row, NULL);
- return FALSE;
+ if (imodel->priv->sh->iter_row < row) {
+ for (; gda_data_model_iter_get_row (iter) < row; ) {
+ if (! gda_data_model_iter_move_next (iter))
+ return FALSE;
+ }
+ return gda_data_model_iter_get_row (iter) == row ? TRUE : FALSE;
+ }
+ else if (imodel->priv->sh->iter_row > row) {
+ for (; gda_data_model_iter_get_row (iter) > row; ) {
+ if (! gda_data_model_iter_move_prev (iter))
+ return FALSE;
+ }
+ return gda_data_model_iter_get_row (iter) == row ? TRUE : FALSE;
+ }
+ else
+ return TRUE;
}
}
}
diff --git a/tools/gda-sql.c b/tools/gda-sql.c
index 1d78fc1..a25772b 100644
--- a/tools/gda-sql.c
+++ b/tools/gda-sql.c
@@ -94,7 +94,7 @@ static GOptionEntry entries[] = {
{ "http-token", 't', 0, G_OPTION_ARG_STRING, &auth_token, "Authentication token (required to authenticate clients)", "token phrase" },
#endif
{ "data-files-list", 0, 0, G_OPTION_ARG_NONE, &list_data_files, "List files used to hold information related to each connection", NULL },
- { "data-files-purge", 0, 0, G_OPTION_ARG_STRING, &purge_data_files, "Remove some files used to hold information related to each connection", "criteria"},
+ { "data-files-purge", 0, 0, G_OPTION_ARG_STRING, &purge_data_files, "Remove some files used to hold information related to each connection. Criteria has to be in 'all', 'non-dsn', or 'non-exist-dsn'", "criteria"},
{ NULL, 0, 0, 0, NULL, NULL, NULL }
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]