[gthumb] file store: added some debug functions
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] file store: added some debug functions
- Date: Sat, 17 Sep 2016 16:48:28 +0000 (UTC)
commit 8fa42e89ff731abf46c9fbe0d46e3ed77591acf8
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Sep 17 18:37:49 2016 +0200
file store: added some debug functions
gthumb/gth-file-store.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/gthumb/gth-file-store.c b/gthumb/gth-file-store.c
index b84c94f..50beb2a 100644
--- a/gthumb/gth-file-store.c
+++ b/gthumb/gth-file-store.c
@@ -197,6 +197,30 @@ _gth_file_store_free_rows (GthFileStore *file_store)
}
+#ifdef DEBUG_FILE_STORE
+
+static void
+_print_rows (GthFileRow **rows, int n, char *info)
+{
+ int i;
+
+ g_print ("%s\n", info);
+ for (i = 0; i < n; i++) {
+ GthFileRow *row = rows[i];
+ g_print ("(%d) [%d] %s\n", i, row->pos, g_file_get_uri (row->file_data->file));
+ }
+}
+
+
+static void
+_gth_file_store_print (GthFileStore *file_store, char *info)
+{
+ _print_rows (file_store->priv->rows, file_store->priv->num_rows, info);
+}
+
+#endif
+
+
static void
gth_file_store_finalize (GObject *object)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]