summaryrefslogtreecommitdiff
path: root/gtk/gtkpathbar.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2011-11-28 12:03:02 -0600
committerFederico Mena Quintero <federico@gnome.org>2011-11-29 14:17:04 -0600
commit7fb00c919e4f415019ed2a2f5713a868e9968d04 (patch)
treed6f13de71567db4d0509586648cacf19346b63a5 /gtk/gtkpathbar.c
parent6ce48345ce50f95d684d60a46b449ce79c199281 (diff)
downloadgtk+-7fb00c919e4f415019ed2a2f5713a868e9968d04.tar.gz
[path-bar] Add some comments to explain the async recursion on an I/O callback
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Diffstat (limited to 'gtk/gtkpathbar.c')
-rw-r--r--gtk/gtkpathbar.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index 35dc8bf249..d1afca68f3 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -1824,17 +1824,23 @@ gtk_path_bar_get_info_callback (GCancellable *cancellable,
if (BUTTON_IS_FAKE_ROOT (button_data))
file_info->fake_root = file_info->new_buttons;
+ /* We have assigned the info for the innermost button, i.e. the deepest directory.
+ * Now, go on to fetch the info for this directory's parent.
+ */
+
file_info->file = file_info->parent_file;
file_info->first_directory = FALSE;
if (!file_info->file)
{
+ /* No parent? Okay, we are done. */
gtk_path_bar_set_file_finish (file_info, TRUE);
return;
}
file_info->parent_file = g_file_get_parent (file_info->file);
+ /* Recurse asynchronously */
file_info->path_bar->get_info_cancellable =
_gtk_file_system_get_info (file_info->path_bar->file_system,
file_info->file,