[gitg] diff-view-file: restore the diff statistics
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] diff-view-file: restore the diff statistics
- Date: Sat, 19 Dec 2015 11:39:11 +0000 (UTC)
commit a242b544660617ddbd7c05ecbc8480edd8207779
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sat Dec 19 12:38:41 2015 +0100
diff-view-file: restore the diff statistics
libgitg/gitg-diff-view-file.vala | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libgitg/gitg-diff-view-file.vala b/libgitg/gitg-diff-view-file.vala
index b60c3e2..02586f4 100644
--- a/libgitg/gitg-diff-view-file.vala
+++ b/libgitg/gitg-diff-view-file.vala
@@ -37,6 +37,9 @@ class Gitg.DiffViewFile : Gtk.Grid
private string d_selection_category = "selection";
+ private uint d_added;
+ private uint d_removed;
+
private bool d_expanded;
public bool expanded
@@ -522,8 +525,10 @@ class Gitg.DiffViewFile : Gtk.Grid
switch (line.get_origin())
{
case Ggit.DiffLineType.ADDITION:
+ d_added++;
break;
case Ggit.DiffLineType.DELETION:
+ d_removed++;
break;
case Ggit.DiffLineType.CONTEXT_EOFNL:
case Ggit.DiffLineType.ADD_EOFNL:
@@ -568,6 +573,9 @@ class Gitg.DiffViewFile : Gtk.Grid
}
}
+ d_diff_stat_file.added = d_added;
+ d_diff_stat_file.removed = d_removed;
+
sensitive = true;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]