[gitg/vala] Show tags in history navigation



commit c6b2494ea02b90e8bd6c7c1144447ea8b8acb992
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date:   Sat Jun 2 16:04:03 2012 +0200

    Show tags in history navigation

 plugins/history/gitg-history-navigation.vala |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/plugins/history/gitg-history-navigation.vala b/plugins/history/gitg-history-navigation.vala
index 66b4fbc..cfab131 100644
--- a/plugins/history/gitg-history-navigation.vala
+++ b/plugins/history/gitg-history-navigation.vala
@@ -19,6 +19,8 @@ namespace GitgHistory
 			var repo = application.repository;
 
 			List<Gitg.Ref> branches = new List<Gitg.Ref>();
+			List<Gitg.Ref> tags = new List<Gitg.Ref>();
+
 			HashTable<string, List<Gitg.Ref>> remotes;
 			List<string> remotenames = new List<string>();
 
@@ -38,6 +40,10 @@ namespace GitgHistory
 					{
 						branches.insert_sorted(r, sort_refs);
 					}
+					else if (r.parsed_name.rtype == Gitg.RefType.TAG)
+					{
+						tags.insert_sorted(r, sort_refs);
+					}
 					else if (r.parsed_name.rtype == Gitg.RefType.REMOTE)
 					{
 						unowned List<Gitg.Ref> lst;
@@ -106,6 +112,12 @@ namespace GitgHistory
 			model.end_header();
 
 			// Tags
+			model.begin_header("Tags", null);
+
+			foreach (var item in tags)
+			{
+				model.append(item.parsed_name.shortname, null, null);
+			}
 		}
 
 		public GitgExt.NavigationSide navigation_side



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]