[brasero] Make sure empty imported directories are not displayed as "loading" after they are loaded
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Subject: [brasero] Make sure empty imported directories are not displayed as "loading" after they are loaded
- Date: Sun, 26 Jul 2009 12:20:24 +0000 (UTC)
commit 0ef604b598a9cc340d4eb65b7e2ac1c7783f9b42
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Fri Jul 24 13:26:07 2009 +0200
Make sure empty imported directories are not displayed as "loading" after they are loaded
libbrasero-burn/brasero-data-project.c | 35 +++++++++++++++++++++----------
libbrasero-burn/brasero-data-session.c | 2 +-
libbrasero-burn/brasero-data-vfs.c | 1 -
3 files changed, 25 insertions(+), 13 deletions(-)
---
diff --git a/libbrasero-burn/brasero-data-project.c b/libbrasero-burn/brasero-data-project.c
index efb6e7b..f1a3536 100644
--- a/libbrasero-burn/brasero-data-project.c
+++ b/libbrasero-burn/brasero-data-project.c
@@ -2245,15 +2245,6 @@ brasero_data_project_add_hidden_node (BraseroDataProject *self,
return brasero_data_project_add_loading_node_real (self, uri, name, TRUE, parent);
}
-/**
- * This function is only used by brasero-data-vfs.c to add the contents of a
- * directory. That's why if a node with the same name is already grafted we
- * can't add it. It means that the node is probable excluded.
- * NOTE: all the files added through this function are not grafted since they
- * are added due to the exploration of their parent. If they collide with
- * anything it can only be with a grafed node.
- */
-
void
brasero_data_project_directory_node_loaded (BraseroDataProject *self,
BraseroFileNode *parent)
@@ -2262,6 +2253,22 @@ brasero_data_project_directory_node_loaded (BraseroDataProject *self,
priv = BRASERO_DATA_PROJECT_PRIVATE (self);
+ if (parent->is_exploring) {
+ BraseroDataProjectClass *klass;
+
+ klass = BRASERO_DATA_PROJECT_GET_CLASS (self);
+
+ parent->is_exploring = FALSE;
+ /* This is to make sure the directory row is
+ * updated in case it is empty. Otherwise, it
+ * would carry on to be displayed as loading
+ * if it were empty.
+ * Don't use brasero_data_project_node_changed
+ * as we don't reorder the rows. */
+ if (klass->node_changed)
+ klass->node_changed (self, parent);
+ }
+
/* Mostly useful at project load time. */
if (priv->loading) {
if (parent->is_grafted || parent->is_tmp_parent) {
@@ -2274,8 +2281,14 @@ brasero_data_project_directory_node_loaded (BraseroDataProject *self,
}
}
-/* This function is only used in brasero-data-vfs.c to add new nodes
- * discovered through exploration */
+/**
+ * This function is only used by brasero-data-vfs.c to add the contents of a
+ * directory. That's why if a node with the same name is already grafted we
+ * can't add it. It means that the node is probable excluded.
+ * NOTE: all the files added through this function are not grafted since they
+ * are added due to the exploration of their parent. If they collide with
+ * anything it can only be with a grafed node.
+ */
BraseroFileNode *
brasero_data_project_add_node_from_info (BraseroDataProject *self,
diff --git a/libbrasero-burn/brasero-data-session.c b/libbrasero-burn/brasero-data-session.c
index 99f3863..4b2732c 100644
--- a/libbrasero-burn/brasero-data-session.c
+++ b/libbrasero-burn/brasero-data-session.c
@@ -248,7 +248,7 @@ brasero_data_session_load_dir_destroy (GObject *object,
parent = brasero_data_project_reference_get (BRASERO_DATA_PROJECT (object), reference);
if (parent)
- parent->is_exploring = FALSE;
+ brasero_data_project_directory_node_loaded (BRASERO_DATA_PROJECT (object), parent);
brasero_data_project_reference_free (BRASERO_DATA_PROJECT (object), reference);
}
diff --git a/libbrasero-burn/brasero-data-vfs.c b/libbrasero-burn/brasero-data-vfs.c
index e526887..fae3caf 100644
--- a/libbrasero-burn/brasero-data-vfs.c
+++ b/libbrasero-burn/brasero-data-vfs.c
@@ -274,7 +274,6 @@ brasero_data_vfs_directory_load_end (GObject *object,
if (!parent)
continue;
- parent->is_exploring = FALSE;
brasero_data_project_directory_node_loaded (BRASERO_DATA_PROJECT (self), parent);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]