working
[tfs.git] / tools / tf / ChangesetDetailView.cs
blob5cab908baeb42284d74b141c858aa8677b38d7d7
1 using System;
2 using System.IO;
3 using System.Collections;
4 using System.Collections.Generic;
5 using System.Net;
6 using System.Text;
7 using Gtk;
8 using Microsoft.TeamFoundation.Client;
9 using Microsoft.TeamFoundation.VersionControl.Common;
10 using Microsoft.TeamFoundation.VersionControl.Client;
12 public class ChangesetDetailView : ScrolledWindow, IChangesetViewChild
14 private Gtk.ListStore changesetDetailStore;
15 private Driver driver;
16 private Gtk.TreeView changesetDetail;
18 public ChangesetDetailView(Driver driver)
20 this.driver = driver;
21 changesetDetail = new Gtk.TreeView();
23 changesetDetail.AppendColumn ("Type", new Gtk.CellRendererText (), "text", 0);
24 changesetDetail.AppendColumn ("File", new Gtk.CellRendererText (), "text", 1);
26 changesetDetailStore = new Gtk.ListStore (typeof(string), typeof(string));
27 changesetDetail.Model = changesetDetailStore;
29 #if HAVE_ATLEAST_GTK_210
30 changesetDetail.EnableGridLines = TreeViewGridLines.Horizontal;
31 #endif
33 Add(changesetDetail);
36 public void Clear()
38 changesetDetailStore.Clear();
41 public void UpdateCid(int cid)
43 Clear();
44 Changeset changeset = driver.VersionControlServer.GetChangeset(cid, true, false);
46 foreach (Change change in changeset.Changes)
48 changesetDetailStore.AppendValues(Command.ChangeTypeToString(change.ChangeType), change.Item.ServerItem);