brasero r1490 - in trunk: . src



Author: philippr
Date: Fri Nov  7 17:30:11 2008
New Revision: 1490
URL: http://svn.gnome.org/viewvc/brasero?rev=1490&view=rev

Log:
	Try to workaround a warning generated by gail because of a strange behavior (bug?)

	* src/brasero-data-tree-model.c
	(brasero_data_tree_model_iter_has_child),
	(brasero_data_tree_model_node_added):
	* src/brasero-file-node.h:

Modified:
   trunk/ChangeLog
   trunk/src/brasero-data-tree-model.c
   trunk/src/brasero-file-node.h

Modified: trunk/src/brasero-data-tree-model.c
==============================================================================
--- trunk/src/brasero-data-tree-model.c	(original)
+++ trunk/src/brasero-data-tree-model.c	Fri Nov  7 17:30:11 2008
@@ -214,6 +214,14 @@
 	}
 
 	node = iter->user_data;
+
+	/* This is a workaround for a warning in gailtreeview.c line 2946 where
+	 * gail uses the GtkTreePath and not a copy which if the node inserted
+	 * declares to have children and is not expanded leads to the path being
+	 * upped and therefore wrong. */
+	if (node->is_inserting)
+		return FALSE;
+
 	if (node->is_file)
 		return FALSE;
 
@@ -1200,9 +1208,15 @@
 	}
 
 	/* Add the row itself */
+	/* This is a workaround for a warning in gailtreeview.c line 2946 where
+	 * gail uses the GtkTreePath and not a copy which if the node inserted
+	 * declares to have children and is not expanded leads to the path being
+	 * upped and therefore wrong. */
+	node->is_inserting = 1;
 	gtk_tree_model_row_inserted (GTK_TREE_MODEL (project),
 				     path,
 				     &iter);
+	node->is_inserting = 0;
 	gtk_tree_path_free (path);
 
 	parent = node->parent;

Modified: trunk/src/brasero-file-node.h
==============================================================================
--- trunk/src/brasero-file-node.h	(original)
+++ trunk/src/brasero-file-node.h	Fri Nov  7 17:30:11 2008
@@ -137,15 +137,22 @@
 
 	/* This is for nodes created at project load time. This means
 	 * that they can be replaced if a real directory is under the
-	 * parent */
+	 * parent with the same name*/
 	guint is_tmp_parent:1;
 
 	/* this should be set by BraseroDataDisc */
 	guint is_expanded:1;
 	guint is_selected:1;
 
+	/* Used by the model */
+	/* This is a workaround for a warning in gailtreeview.c line 2946 where
+	 * gail uses the GtkTreePath and not a copy which if the node inserted
+	 * declares to have children and is not expanded leads to the path being
+	 * upped and therefore wrong. */
+	guint is_inserting:1;
+
 	/* this is a ref count a max of 255 should be enough */
-	guint is_visible:8;
+	guint is_visible:7;
 };
 
 /** Returns a const gchar* (it shouldn't be freed). */



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