summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-directory.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2011-03-25 14:39:07 +0100
committerAlexander Larsson <alexl@redhat.com>2011-03-25 14:39:07 +0100
commit695efe7cb3f9a96e7c870c36d30e2759d800d2d5 (patch)
tree7faae410bf6fc88fcd9338bacb84280ed2ad27bd /libnautilus-private/nautilus-directory.c
parent1d48f02ea1bf274d8fb0d70b61bed337bbda06c2 (diff)
downloadnautilus-695efe7cb3f9a96e7c870c36d30e2759d800d2d5.tar.gz
Better debugging for NautilusDirectory leaks
Diffstat (limited to 'libnautilus-private/nautilus-directory.c')
-rw-r--r--libnautilus-private/nautilus-directory.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libnautilus-private/nautilus-directory.c b/libnautilus-private/nautilus-directory.c
index 9142a8c03..af7f40117 100644
--- a/libnautilus-private/nautilus-directory.c
+++ b/libnautilus-private/nautilus-directory.c
@@ -331,6 +331,16 @@ add_preferences_callbacks (void)
NULL);
}
+static void
+print_key_directory (gpointer key, gpointer value, gpointer callback_data)
+{
+ char *uri;
+
+ uri = g_file_get_uri (G_FILE (key));
+ g_print ("--> %s\n", uri);
+ g_free (uri);
+}
+
/**
* nautilus_directory_get_by_uri:
* @uri: URI of directory to get.
@@ -348,7 +358,7 @@ nautilus_directory_get_internal (GFile *location, gboolean create)
/* Create the hash table first time through. */
if (directories == NULL) {
directories = eel_g_hash_table_new_free_at_exit
- (g_file_hash, (GCompareFunc)g_file_equal, NULL,
+ (g_file_hash, (GCompareFunc)g_file_equal, print_key_directory,
"nautilus-directory.c: directories");
add_preferences_callbacks ();