[Xfce4-commits] <tumbler:jannis/specialized> Add debug dump function to print stuff when the registry has changed.
Jannis Pohlmann
noreply at xfce.org
Wed Nov 11 01:52:05 CET 2009
Updating branch refs/heads/jannis/specialized
to 5431fa7da0b51b33c4b82eaf02b59455ae318420 (commit)
from 7aa64ca08d6a6515477963975f6cb8d5c47b07e4 (commit)
commit 5431fa7da0b51b33c4b82eaf02b59455ae318420
Author: Jannis Pohlmann <jannis at xfce.org>
Date: Wed Nov 11 01:50:03 2009 +0100
Add debug dump function to print stuff when the registry has changed.
tumblerd/tumbler-registry.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/tumblerd/tumbler-registry.c b/tumblerd/tumbler-registry.c
index fac3ef1..9450e6a 100644
--- a/tumblerd/tumbler-registry.c
+++ b/tumblerd/tumbler-registry.c
@@ -112,6 +112,7 @@ tumbler_registry_finalize (GObject *object)
+#ifdef DEBUG
static void
dump_registry (TumblerRegistry *registry)
{
@@ -121,7 +122,7 @@ dump_registry (TumblerRegistry *registry)
GList **thumbnailers;
GList *lp;
- g_print ("\nRegistry:\n");
+ g_print ("Registry:\n");
g_print (" Preferred Thumbnailers:\n");
g_hash_table_iter_init (&iter, registry->preferred_thumbnailers);
@@ -130,7 +131,6 @@ dump_registry (TumblerRegistry *registry)
g_print (" %s: %s\n", hash_key,
tumbler_specialized_thumbnailer_get_name (TUMBLER_SPECIALIZED_THUMBNAILER (thumbnailer)));
}
- g_print ("\n");
g_print (" Registry Thumbnailers:\n");
g_hash_table_iter_init (&iter, registry->thumbnailers);
@@ -140,7 +140,7 @@ dump_registry (TumblerRegistry *registry)
{
if (TUMBLER_IS_SPECIALIZED_THUMBNAILER (lp->data))
{
- g_print (" %s: %s\n",
+ g_print (" %s: %s\n",
hash_key, tumbler_specialized_thumbnailer_get_name (lp->data));
}
}
@@ -148,6 +148,7 @@ dump_registry (TumblerRegistry *registry)
g_print ("\n");
}
+#endif
@@ -377,7 +378,9 @@ tumbler_registry_add (TumblerRegistry *registry,
g_strfreev (hash_keys);
+#ifdef DEBUG
dump_registry (registry);
+#endif
g_mutex_unlock (registry->mutex);
}
@@ -665,7 +668,9 @@ tumbler_registry_set_preferred (TumblerRegistry *registry,
g_strdup (hash_key), g_object_ref (thumbnailer));
}
+#ifdef DEBUG
dump_registry (registry);
+#endif
g_mutex_unlock (registry->mutex);
}
More information about the Xfce4-commits
mailing list