gedit r6425 - in trunk: . plugins/filebrowser
- From: jessevdk svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6425 - in trunk: . plugins/filebrowser
- Date: Sun, 17 Aug 2008 18:51:58 +0000 (UTC)
Author: jessevdk
Date: Sun Aug 17 18:51:58 2008
New Revision: 6425
URL: http://svn.gnome.org/viewvc/gedit?rev=6425&view=rev
Log:
* plugins/filebrowser/gedit-file-browser-store.c:
Bug 547692 â Crash when selecting 'show hidden' from the side pane
Bug was caused by change in working of row_inserted
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 Aug 17 18:51:58 2008
@@ -1131,14 +1131,14 @@
gtk_tree_model_row_inserted (GTK_TREE_MODEL(model), copy, iter);
gtk_tree_path_free (copy);
- if (ref) {
+ if (ref)
+ {
gtk_tree_path_free (*path);
/* To restore the path, we get the path from the reference. But, since
we inserted a row, the path will be one index further than the
actual path of our node. We therefore call gtk_tree_path_prev */
*path = gtk_tree_row_reference_get_path (ref);
-
gtk_tree_path_prev (*path);
}
@@ -1160,14 +1160,14 @@
static void
model_refilter_node (GeditFileBrowserStore * model,
FileBrowserNode * node,
- GtkTreePath * path)
+ GtkTreePath ** path)
{
gboolean old_visible;
gboolean new_visible;
FileBrowserNodeDir *dir;
GSList *item;
GtkTreeIter iter;
- gboolean free_path = FALSE;
+ GtkTreePath *tmppath = NULL;
gboolean in_tree;
if (node == NULL)
@@ -1178,19 +1178,20 @@
in_tree = node_in_tree (model, node);
- if (path == NULL) {
+ if (path == NULL)
+ {
if (in_tree)
- path = gedit_file_browser_store_get_path_real (model,
+ tmppath = gedit_file_browser_store_get_path_real (model,
node);
else
- path = gtk_tree_path_new_first ();
+ tmppath = gtk_tree_path_new_first ();
- free_path = TRUE;
+ path = &tmppath;
}
if (NODE_IS_DIR (node)) {
if (in_tree)
- gtk_tree_path_down (path);
+ gtk_tree_path_down (*path);
dir = FILE_BROWSER_NODE_DIR (node);
@@ -1201,7 +1202,7 @@
}
if (in_tree)
- gtk_tree_path_up (path);
+ gtk_tree_path_up (*path);
}
if (in_tree) {
@@ -1210,21 +1211,21 @@
if (old_visible != new_visible) {
if (old_visible) {
node->inserted = FALSE;
- row_deleted (model, path);
+ row_deleted (model, *path);
} else {
iter.user_data = node;
- row_inserted (model, &path, &iter);
- gtk_tree_path_next (path);
+ row_inserted (model, path, &iter);
+ gtk_tree_path_next (*path);
}
} else if (old_visible) {
- gtk_tree_path_next (path);
+ gtk_tree_path_next (*path);
}
}
model_check_dummy (model, node);
- if (free_path)
- gtk_tree_path_free (path);
+ if (tmppath)
+ gtk_tree_path_free (tmppath);
}
static void
@@ -1838,7 +1839,7 @@
if (isadded) {
path = gedit_file_browser_store_get_path_real (model, node);
- model_refilter_node (model, node, path);
+ model_refilter_node (model, node, &path);
gtk_tree_path_free (path);
model_check_dummy (model, node->parent);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]