[gitg] Only set visibility for files that are actually valid
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: svn-commits-list gnome org
- Subject: [gitg] Only set visibility for files that are actually valid
- Date: Sun, 19 Apr 2009 17:11:28 -0400 (EDT)
commit 71c30c3355643d54a1853c108513f5335d53b98d
Author: Jesse van den Kieboom <jesse icecrew nl>
Date: Sun Apr 19 23:01:58 2009 +0200
Only set visibility for files that are actually valid
Fixes bug #578754
---
gitg/gitg-revision-view.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/gitg/gitg-revision-view.c b/gitg/gitg-revision-view.c
index 84e35c5..02c3e3d 100644
--- a/gitg/gitg-revision-view.c
+++ b/gitg/gitg-revision-view.c
@@ -468,6 +468,7 @@ visible_from_cached_headers(GitgRevisionView *view, DiffFile *f)
{
f->visible = TRUE;
f->iter = header->iter;
+
return;
}
}
@@ -481,7 +482,6 @@ add_diff_file(GitgRevisionView *view, DiffFile *f)
/* see if it is in the cached headers */
visible_from_cached_headers(view, f);
-
gtk_list_store_set(view->priv->list_store_diff_files, &iter, 0, f, -1);
}
@@ -791,9 +791,6 @@ on_header_added(GitgDiffView *view, GitgDiffIter *iter, GitgRevisionView *self)
GtkTreeIter it;
DiffFile *f;
- gchar *from = NULL, *to = NULL;
- gitg_diff_iter_get_index(iter, &from, &to);
-
if (find_diff_file(self, iter, &it, &f))
{
if (!f->visible)
@@ -831,12 +828,16 @@ foreach_selection_changed(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *i
{
gboolean visible = data->numselected == 0 || gtk_tree_selection_path_is_selected(data->selection, path);
- DiffFile *f;
+ DiffFile *f = NULL;
gtk_tree_model_get(model, iter, 0, &f, -1);
- gitg_diff_iter_set_visible(&f->iter, visible);
- diff_file_unref(f);
+
+ if (f->visible)
+ {
+ gitg_diff_iter_set_visible(&f->iter, visible);
+ }
+ diff_file_unref(f);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]