[gitg] diff-view: hide expander with just one file
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] diff-view: hide expander with just one file
- Date: Wed, 23 Sep 2015 06:58:53 +0000 (UTC)
commit e95db3db333bd7a47f39822938a0fd1f75e1c6e3
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Aug 27 12:22:26 2015 +0200
diff-view: hide expander with just one file
libgitg/gitg-diff-view-commit-details.vala | 6 ++++++
libgitg/gitg-diff-view.vala | 1 +
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libgitg/gitg-diff-view-commit-details.vala b/libgitg/gitg-diff-view-commit-details.vala
index 15d177d..209d78b 100644
--- a/libgitg/gitg-diff-view-commit-details.vala
+++ b/libgitg/gitg-diff-view-commit-details.vala
@@ -62,6 +62,12 @@ class Gitg.DiffViewCommitDetails : Gtk.Grid
}
}
+ public bool expander_visible
+ {
+ get { return d_expander_files.visible; }
+ set { d_expander_files.visible = value; }
+ }
+
private Cancellable? d_avatar_cancel;
private Ggit.Commit? d_commit;
diff --git a/libgitg/gitg-diff-view.vala b/libgitg/gitg-diff-view.vala
index 213aa75..1466c12 100644
--- a/libgitg/gitg-diff-view.vala
+++ b/libgitg/gitg-diff-view.vala
@@ -360,6 +360,7 @@ public class Gitg.DiffView : Gtk.Grid
add_file();
d_commit_details.expanded = (files.size <= 1);
+ d_commit_details.expander_visible = (files.size > 1);
foreach (var file in files)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]