brasero r1182 - in trunk: . src



Author: philippr
Date: Wed Aug 27 08:02:51 2008
New Revision: 1182
URL: http://svn.gnome.org/viewvc/brasero?rev=1182&view=rev

Log:
	In data-vfs use the URI string passed as a callback for some operations

	* src/brasero-data-project.c
	(brasero_data_project_add_loading_node):
	* src/brasero-data-vfs.c (brasero_data_vfs_check_uri_result),
	(brasero_data_vfs_loading_node_result),
	(brasero_data_vfs_loading_node):


Modified:
   trunk/ChangeLog
   trunk/src/brasero-data-project.c
   trunk/src/brasero-data-vfs.c

Modified: trunk/src/brasero-data-project.c
==============================================================================
--- trunk/src/brasero-data-project.c	(original)
+++ trunk/src/brasero-data-project.c	Wed Aug 27 08:02:51 2008
@@ -1944,7 +1944,9 @@
 	/* make sure that name doesn't exist */
 	node = brasero_file_node_check_name_existence (parent, name);
 	if (node) {
-		if (brasero_data_project_file_signal (self, NAME_COLLISION_SIGNAL, BRASERO_FILE_NODE_NAME (node))) {
+		if (brasero_data_project_file_signal (self,
+						      NAME_COLLISION_SIGNAL,
+						      BRASERO_FILE_NODE_NAME (node))) {
 			g_free (name);
 			return NULL;
 		}

Modified: trunk/src/brasero-data-vfs.c
==============================================================================
--- trunk/src/brasero-data-vfs.c	(original)
+++ trunk/src/brasero-data-vfs.c	Wed Aug 27 08:02:51 2008
@@ -184,7 +184,12 @@
 
 	/* Only signal errors if the node was specifically added by the user
 	 * that is if it is loading. So check the loading GHashTable to know 
-	 * that. Otherwise this URI comes from directory exploration. */
+	 * that. Otherwise this URI comes from directory exploration.
+	 * The problem is the URI returned by brasero-io could be different
+	 * from the one set in the loading hash if there are parent symlinks.
+	 * That's one of the readon why we passed the orignal URI as a
+	 * registered string in the callback. Of course that's not true when
+	 * we're loading directory contents. */
 
 	if (error) {
 		if (error->domain == G_IO_ERROR && error->code == G_IO_ERROR_NOT_FOUND) {
@@ -612,8 +617,9 @@
 	BraseroDataVFSPrivate *priv = BRASERO_DATA_VFS_PRIVATE (self);
 
 	nodes = g_hash_table_lookup (priv->loading, registered);
+
 	/* check the status of the operation */
-	if (!brasero_data_vfs_check_uri_result (self, uri, error, info)) {
+	if (!brasero_data_vfs_check_uri_result (self, registered, error, info)) {
 		/* we need to remove the loading node that is waiting */
 		for (iter = nodes; iter; iter = iter->next) {
 			BraseroFileNode *node;
@@ -658,12 +664,18 @@
 		 * reloading. */
 
 		if (!node->is_loading) {
-			brasero_data_project_node_reloaded (BRASERO_DATA_PROJECT (self), node, uri, info);
+			brasero_data_project_node_reloaded (BRASERO_DATA_PROJECT (self),
+							    node,
+							    uri,
+							    info);
 			continue;
 		}
 
 		/* update node */
-		brasero_data_project_node_loaded (BRASERO_DATA_PROJECT (self), node, uri, info);
+		brasero_data_project_node_loaded (BRASERO_DATA_PROJECT (self),
+						  node,
+						  uri,
+						  info);
 
 		/* See what type of file it is. If that's a directory then 
 		 * explore it right away */
@@ -725,7 +737,7 @@
 	GSList *nodes;
 
 	/* NOTE: this function receives URIs only from utf8 origins (not from
-	 * gnome-vfs for example) so we can assume that this is safe */
+	 * GIO for example) so we can assume that this is safe */
 
 	priv = BRASERO_DATA_VFS_PRIVATE (self);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]