gedit r6735 - in trunk: . plugins/filebrowser
- From: jessevdk svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6735 - in trunk: . plugins/filebrowser
- Date: Sun, 28 Dec 2008 11:26:40 +0000 (UTC)
Author: jessevdk
Date: Sun Dec 28 11:26:40 2008
New Revision: 6735
URL: http://svn.gnome.org/viewvc/gedit?rev=6735&view=rev
Log:
* plugins/filebrowser/gedit-file-browser-store.c: Fix a problem
with fill_model where the tree path might have been altered and
is thus then invalid. Fixes bug #556410.
Modified:
trunk/ChangeLog
trunk/plugins/filebrowser/gedit-file-browser-store.c
Modified: trunk/plugins/filebrowser/gedit-file-browser-store.c
==============================================================================
--- trunk/plugins/filebrowser/gedit-file-browser-store.c (original)
+++ trunk/plugins/filebrowser/gedit-file-browser-store.c Sun Dec 28 11:26:40 2008
@@ -2371,7 +2371,7 @@
static void
model_fill (GeditFileBrowserStore * model, FileBrowserNode * node,
- GtkTreePath * path)
+ GtkTreePath ** path)
{
gboolean free_path = FALSE;
GtkTreeIter iter = {0,};
@@ -2380,19 +2380,19 @@
if (node == NULL) {
node = model->priv->virtual_root;
- path = gtk_tree_path_new ();
+ *path = gtk_tree_path_new ();
free_path = TRUE;
}
- if (path == NULL) {
- path =
+ if (*path == NULL) {
+ *path =
gedit_file_browser_store_get_path_real (model, node);
free_path = TRUE;
}
if (!model_node_visibility (model, node)) {
if (free_path)
- gtk_tree_path_free (path);
+ gtk_tree_path_free (*path);
return;
}
@@ -2401,12 +2401,12 @@
/* Insert node */
iter.user_data = node;
- row_inserted(model, &path, &iter);
+ row_inserted(model, path, &iter);
}
if (NODE_IS_DIR (node)) {
/* Go to the first child */
- gtk_tree_path_down (path);
+ gtk_tree_path_down (*path);
for (item = FILE_BROWSER_NODE_DIR (node)->children; item;
item = item->next) {
@@ -2416,18 +2416,18 @@
model_fill (model, child, path);
/* Increase path for next child */
- gtk_tree_path_next (path);
+ gtk_tree_path_next (*path);
}
}
/* Move back up to node path */
- gtk_tree_path_up (path);
+ gtk_tree_path_up (*path);
}
model_check_dummy (model, node);
if (free_path)
- gtk_tree_path_free (path);
+ gtk_tree_path_free (*path);
}
static void
@@ -2440,6 +2440,7 @@
FileBrowserNodeDir *dir;
GSList *item;
GSList *copy;
+ GtkTreePath *empty = NULL;
prev = node;
next = prev->parent;
@@ -2504,7 +2505,7 @@
/* Now finally, set the virtual root, and load it up! */
model->priv->virtual_root = node;
- model_fill (model, NULL, NULL);
+ model_fill (model, NULL, &empty);
if (!NODE_LOADED (node))
model_load_directory (model, node);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]