From f1c8ca4decc1716d62df2de5089a2a82153c9041 Mon Sep 17 00:00:00 2001 From: "Joel W. Reed" Date: Thu, 29 Nov 2007 15:51:35 -0500 Subject: [PATCH] delete.button --- class/Gtk.TeamFoundation/WorkingFolderDialog.cs | 20 +++++++++++++------- .../Workspace.cs | 4 ++-- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/class/Gtk.TeamFoundation/WorkingFolderDialog.cs b/class/Gtk.TeamFoundation/WorkingFolderDialog.cs index 6c175c7..38cb1a8 100644 --- a/class/Gtk.TeamFoundation/WorkingFolderDialog.cs +++ b/class/Gtk.TeamFoundation/WorkingFolderDialog.cs @@ -42,6 +42,7 @@ namespace Gtk.TeamFoundation private Entry localPath; private Button browseButton; private Button okButton; + private Button deleteButton; public string LocalPath { @@ -61,10 +62,10 @@ namespace Gtk.TeamFoundation return base.OnKeyPressEvent(evnt); } - public WorkingFolderDialog(Workspace workspace, string serverPath) : base("Working Folder Configuration") + public WorkingFolderDialog(Workspace workspace, string serverPath) : base("Working Folder Mapping") { this.serverPath = serverPath; - Table table = new Table(2, 3, false); + Table table = new Table(3, 3, false); table.RowSpacing = ((uint)(6)); table.ColumnSpacing = ((uint)(6)); table.BorderWidth = ((uint)(12)); @@ -78,15 +79,20 @@ namespace Gtk.TeamFoundation localPath = AddLabeledEntry(table, "_Local Path:", 2, 3); localPath.WidthChars = 32; - string lpath = workspace.TryGetLocalItemForServerItem(serverPath); - if (!String.IsNullOrEmpty(lpath)) localPath.Text = lpath; - - browseButton = new Button ("Browse..."); + browseButton = new Button("Browse..."); table.Attach(browseButton, 2, 3, 2, 3); + string lpath = workspace.TryGetLocalItemForServerItem(serverPath); + if (!String.IsNullOrEmpty(lpath)) + { + localPath.Text = lpath; + deleteButton = new Button("Remove Working Folder Mapping"); + table.Attach(deleteButton, 1, 2, 3, 4); + } + VBox.Add(table); - okButton = AddButton ("OK", ResponseType.Ok) as Button; + okButton = AddButton("OK", ResponseType.Ok) as Button; browseButton.Pressed += OnBrowseButtonPressed; AddCloseButton("Cancel"); diff --git a/class/Microsoft.TeamFoundation.VersionControl.Client/Workspace.cs b/class/Microsoft.TeamFoundation.VersionControl.Client/Workspace.cs index 10eadbc..b8a3e12 100644 --- a/class/Microsoft.TeamFoundation.VersionControl.Client/Workspace.cs +++ b/class/Microsoft.TeamFoundation.VersionControl.Client/Workspace.cs @@ -767,7 +767,7 @@ namespace Microsoft.TeamFoundation.VersionControl.Client return getOperations.Length; } - public void Update (string newName, string newComment, WorkingFolder[] newMappings) + public void Update(string newName, string newComment, WorkingFolder[] newMappings) { Workspace w1 = new Workspace(VersionControlServer, newName, OwnerName, newComment, newMappings, Computer); @@ -779,7 +779,7 @@ namespace Microsoft.TeamFoundation.VersionControl.Client folders = w2.Folders; } - public void RefreshMappings () + public void RefreshMappings() { Workspace w = Repository.QueryWorkspace(Name, OwnerName); this.folders = w.folders; -- 2.11.4.GIT