[gitg] Do not show date in commit dialog when it is now
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Do not show date in commit dialog when it is now
- Date: Sat, 6 Jul 2013 19:50:39 +0000 (UTC)
commit 3b1cf73e4aa712c4fa96fc7300f69b2f0f4253ff
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Sat Jul 6 21:50:03 2013 +0200
Do not show date in commit dialog when it is now
gitg/commit/gitg-commit-dialog.vala | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/gitg/commit/gitg-commit-dialog.vala b/gitg/commit/gitg-commit-dialog.vala
index ae73a5e..d0270e7 100644
--- a/gitg/commit/gitg-commit-dialog.vala
+++ b/gitg/commit/gitg-commit-dialog.vala
@@ -119,7 +119,18 @@ class Dialog : Gtk.Dialog
var email = d_author.get_email();
d_label_user.set_label(@"$name <$email>");
- d_label_date.set_label((new Gitg.Date.for_date_time(d_author.get_time())).for_display());
+
+ var t = d_author.get_time();
+ var now = new DateTime.now_local();
+
+ if (now.difference(t) < TimeSpan.SECOND * 5)
+ {
+ d_label_date.set_label("");
+ }
+ else
+ {
+ d_label_date.set_label((new Gitg.Date.for_date_time(t)).for_display());
+ }
var ac = Gitg.AvatarCache.default();
d_cancel_avatar = new Cancellable();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]