[gitg] Show all files in "Tree" list
- From: Paolo Borelli <pborelli src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gitg] Show all files in "Tree" list
- Date: Fri, 14 Aug 2009 18:24:21 +0000 (UTC)
commit efb5bf046b84fcf319a102fb7f93b664ceb10e3d
Author: Paolo Borelli <pborelli gnome org>
Date: Fri Aug 14 20:23:39 2009 +0200
Show all files in "Tree" list
Fix parsing logic so that lines sent in the following "updates" are not
discarded
gitg/gitg-revision-tree-view.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gitg/gitg-revision-tree-view.c b/gitg/gitg-revision-tree-view.c
index c37ce44..f0d30d7 100644
--- a/gitg/gitg-revision-tree-view.c
+++ b/gitg/gitg-revision-tree-view.c
@@ -57,6 +57,8 @@ struct _GitgRevisionTreeViewPrivate
GitgRevision *revision;
GitgRunner *loader;
GtkTreePath *load_path;
+
+ gboolean skipped_blank_line;
};
static void gitg_revision_tree_view_buildable_iface_init(GtkBuildableIface *iface);
@@ -571,15 +573,14 @@ static void
on_update(GitgRunner *runner, gchar **buffer, GitgRevisionTreeView *tree)
{
gchar *line;
- gboolean skip = TRUE;
while ((line = *buffer++))
{
- if (skip)
+ if (!tree->priv->skipped_blank_line)
{
if (*line == '\0')
- skip = FALSE;
-
+ tree->priv->skipped_blank_line = TRUE;
+
continue;
}
@@ -693,6 +694,7 @@ load_node(GitgRevisionTreeView *tree, GtkTreeIter *parent)
else
tree->priv->load_path = NULL;
+ tree->priv->skipped_blank_line = FALSE;
gitg_repository_run_commandv(tree->priv->repository, tree->priv->loader, NULL, "show", id, NULL);
g_free(id);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]