From 942111f015e359209ff64139e02a4301794003a6 Mon Sep 17 00:00:00 2001 From: "Joel W. Reed" Date: Sat, 10 Nov 2007 21:59:39 -0500 Subject: [PATCH] add.license.preamble --- class/Gtk.TeamFoundation/AuthenticationDialog.cs | 95 ++++++++++++++++++++++ class/Gtk.TeamFoundation/ChangesetDetailView.cs | 28 +++++++ class/Gtk.TeamFoundation/ChangesetDiffView.cs | 28 +++++++ class/Gtk.TeamFoundation/ChangesetView.cs | 28 +++++++ class/Gtk.TeamFoundation/DiffItemNull.cs | 28 +++++++ class/Gtk.TeamFoundation/DirectoryView.cs | 28 +++++++ class/Gtk.TeamFoundation/ExploreView.cs | 28 +++++++ class/Gtk.TeamFoundation/FileView.cs | 28 +++++++ class/Gtk.TeamFoundation/Gtk.TeamFoundation.csproj | 1 + .../IVersionControlServerFactory.cs | 28 +++++++ class/Gtk.TeamFoundation/RepositoryView.cs | 28 +++++++ class/Gtk.TeamFoundation/SortableColumns.cs | 28 +++++++ class/Gtk.TeamFoundation/SourceView.cs | 28 +++++++ tools/opentf/Gui.cs | 64 +-------------- tools/opentf/Makefile | 3 +- 15 files changed, 407 insertions(+), 64 deletions(-) create mode 100644 class/Gtk.TeamFoundation/AuthenticationDialog.cs diff --git a/class/Gtk.TeamFoundation/AuthenticationDialog.cs b/class/Gtk.TeamFoundation/AuthenticationDialog.cs new file mode 100644 index 0000000..7914bb1 --- /dev/null +++ b/class/Gtk.TeamFoundation/AuthenticationDialog.cs @@ -0,0 +1,95 @@ +// +// AuthenticationDialog.cs +// +// Authors: +// Joel Reed (joelwreed@gmail.com) +// + +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System; +using System.Text; +using Gtk; + +namespace Gtk.TeamFoundation +{ + class AuthenticationDialog : Gtk.Dialog + { + private Entry username; + private Entry password; + private Button okButton; + private Button cancelButton; + + public string Login + { + get { + return username.Text + "," + password.Text; + } + } + + protected override bool OnKeyPressEvent(Gdk.EventKey evnt) + { + if (evnt.Key == Gdk.Key.Return) + okButton.Click(); + if (evnt.Key == Gdk.Key.Escape) + cancelButton.Click(); + + return base.OnKeyPressEvent(evnt); + } + + public AuthenticationDialog() : base("Enter Credentials", null, DialogFlags.Modal) + { + Label intro = new Label("Please enter your logon credentials."); + intro.Xpad = 10; + intro.Ypad = 10; + intro.SetPadding(10, 10); + + VBox.Add(new Label("Please enter your logon credentials.")); + Table table = new Table(2, 2, false); + + { + Label label = new Label("_Username:"); + table.Attach(label, 0, 1, 1, 2); + } + + username = new Entry (); + username.IsEditable = true; + table.Attach(username, 1, 2, 1, 2); + + { + Label label = new Label("_Password:"); + table.Attach(label, 0, 1, 2, 3); + } + + password = new Entry (); + password.IsEditable = true; + table.Attach(password, 1, 2, 2, 3); + + VBox.Add(table); + + okButton = AddButton ("OK", ResponseType.Ok) as Button; + cancelButton = AddButton ("Cancel", ResponseType.Cancel) as Button; + + DefaultResponse = ResponseType.Ok; + } + } +} \ No newline at end of file diff --git a/class/Gtk.TeamFoundation/ChangesetDetailView.cs b/class/Gtk.TeamFoundation/ChangesetDetailView.cs index 40f0aef..1a9a9ff 100644 --- a/class/Gtk.TeamFoundation/ChangesetDetailView.cs +++ b/class/Gtk.TeamFoundation/ChangesetDetailView.cs @@ -1,3 +1,31 @@ +// +// ChangesetDetailView.cs +// +// Authors: +// Joel Reed (joelwreed@gmail.com) +// + +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + using System; using System.IO; using System.Collections; diff --git a/class/Gtk.TeamFoundation/ChangesetDiffView.cs b/class/Gtk.TeamFoundation/ChangesetDiffView.cs index e869ab9..2fa56d5 100644 --- a/class/Gtk.TeamFoundation/ChangesetDiffView.cs +++ b/class/Gtk.TeamFoundation/ChangesetDiffView.cs @@ -1,3 +1,31 @@ +// +// ChangesetDiffView.cs +// +// Authors: +// Joel Reed (joelwreed@gmail.com) +// + +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + using System; using System.IO; using System.Collections; diff --git a/class/Gtk.TeamFoundation/ChangesetView.cs b/class/Gtk.TeamFoundation/ChangesetView.cs index 1e0936a..529b05a 100644 --- a/class/Gtk.TeamFoundation/ChangesetView.cs +++ b/class/Gtk.TeamFoundation/ChangesetView.cs @@ -1,3 +1,31 @@ +// +// ChangesetView.cs +// +// Authors: +// Joel Reed (joelwreed@gmail.com) +// + +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + using System; using System.IO; using System.Collections; diff --git a/class/Gtk.TeamFoundation/DiffItemNull.cs b/class/Gtk.TeamFoundation/DiffItemNull.cs index f29d51b..cede64c 100644 --- a/class/Gtk.TeamFoundation/DiffItemNull.cs +++ b/class/Gtk.TeamFoundation/DiffItemNull.cs @@ -1,3 +1,31 @@ +// +// DiffItemNull.cs +// +// Authors: +// Joel Reed (joelwreed@gmail.com) +// + +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + using System; using System.IO; using System.Collections; diff --git a/class/Gtk.TeamFoundation/DirectoryView.cs b/class/Gtk.TeamFoundation/DirectoryView.cs index 5981b5a..f17bd34 100644 --- a/class/Gtk.TeamFoundation/DirectoryView.cs +++ b/class/Gtk.TeamFoundation/DirectoryView.cs @@ -1,3 +1,31 @@ +// +// DirectoryView.cs +// +// Authors: +// Joel Reed (joelwreed@gmail.com) +// + +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + using System; using System.IO; using System.Collections; diff --git a/class/Gtk.TeamFoundation/ExploreView.cs b/class/Gtk.TeamFoundation/ExploreView.cs index 833d08f..9c74750 100644 --- a/class/Gtk.TeamFoundation/ExploreView.cs +++ b/class/Gtk.TeamFoundation/ExploreView.cs @@ -1,3 +1,31 @@ +// +// ExploreView.cs +// +// Authors: +// Joel Reed (joelwreed@gmail.com) +// + +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + using System; using System.Net; using Gtk; diff --git a/class/Gtk.TeamFoundation/FileView.cs b/class/Gtk.TeamFoundation/FileView.cs index 91dc8b8..4894506 100644 --- a/class/Gtk.TeamFoundation/FileView.cs +++ b/class/Gtk.TeamFoundation/FileView.cs @@ -1,3 +1,31 @@ +// +// FileView.cs +// +// Authors: +// Joel Reed (joelwreed@gmail.com) +// + +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + using System; using System.IO; using System.Collections; diff --git a/class/Gtk.TeamFoundation/Gtk.TeamFoundation.csproj b/class/Gtk.TeamFoundation/Gtk.TeamFoundation.csproj index c8bb6a1..fecb045 100644 --- a/class/Gtk.TeamFoundation/Gtk.TeamFoundation.csproj +++ b/class/Gtk.TeamFoundation/Gtk.TeamFoundation.csproj @@ -28,6 +28,7 @@ + diff --git a/class/Gtk.TeamFoundation/IVersionControlServerFactory.cs b/class/Gtk.TeamFoundation/IVersionControlServerFactory.cs index c22d451..4bac6b1 100644 --- a/class/Gtk.TeamFoundation/IVersionControlServerFactory.cs +++ b/class/Gtk.TeamFoundation/IVersionControlServerFactory.cs @@ -1,3 +1,31 @@ +// +// IVersionControlServerFactory.cs +// +// Authors: +// Joel Reed (joelwreed@gmail.com) +// + +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + using System; using Microsoft.TeamFoundation.VersionControl.Client; diff --git a/class/Gtk.TeamFoundation/RepositoryView.cs b/class/Gtk.TeamFoundation/RepositoryView.cs index 4ce9bfc..60bd54b 100644 --- a/class/Gtk.TeamFoundation/RepositoryView.cs +++ b/class/Gtk.TeamFoundation/RepositoryView.cs @@ -1,3 +1,31 @@ +// +// RepositoryView.cs +// +// Authors: +// Joel Reed (joelwreed@gmail.com) +// + +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + using System; using System.IO; using System.Net; diff --git a/class/Gtk.TeamFoundation/SortableColumns.cs b/class/Gtk.TeamFoundation/SortableColumns.cs index 417ec39..7f80247 100644 --- a/class/Gtk.TeamFoundation/SortableColumns.cs +++ b/class/Gtk.TeamFoundation/SortableColumns.cs @@ -1,3 +1,31 @@ +// +// SortableColumns.cs +// +// Authors: +// Joel Reed (joelwreed@gmail.com) +// + +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + using System; using Gtk; diff --git a/class/Gtk.TeamFoundation/SourceView.cs b/class/Gtk.TeamFoundation/SourceView.cs index 8f74fab..aaa9b01 100644 --- a/class/Gtk.TeamFoundation/SourceView.cs +++ b/class/Gtk.TeamFoundation/SourceView.cs @@ -1,3 +1,31 @@ +// +// SourceView.cs +// +// Authors: +// Joel Reed (joelwreed@gmail.com) +// + +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + using System; using System.Text; using Gtk; diff --git a/tools/opentf/Gui.cs b/tools/opentf/Gui.cs index c6c0911..07c5191 100644 --- a/tools/opentf/Gui.cs +++ b/tools/opentf/Gui.cs @@ -29,74 +29,14 @@ using System; using System.Text; using Gtk; - -class AuthDialog : Gtk.Dialog -{ - private Entry username; - private Entry password; - private Button okButton; - private Button cancelButton; - - public string Login - { - get { - return username.Text + "," + password.Text; - } - } - - protected override bool OnKeyPressEvent(Gdk.EventKey evnt) - { - if (evnt.Key == Gdk.Key.Return) - okButton.Click(); - if (evnt.Key == Gdk.Key.Escape) - cancelButton.Click(); - - return base.OnKeyPressEvent(evnt); - } - - public AuthDialog() : base("Enter Credentials", null, DialogFlags.Modal) - { - Label intro = new Label("Please enter your logon credentials."); - intro.Xpad = 10; - intro.Ypad = 10; - intro.SetPadding(10, 10); - - VBox.Add(new Label("Please enter your logon credentials.")); - Table table = new Table(2, 2, false); - - { - Label label = new Label("_Username:"); - table.Attach(label, 0, 1, 1, 2); - } - - username = new Entry (); - username.IsEditable = true; - table.Attach(username, 1, 2, 1, 2); - - { - Label label = new Label("_Password:"); - table.Attach(label, 0, 1, 2, 3); - } - - password = new Entry (); - password.IsEditable = true; - table.Attach(password, 1, 2, 2, 3); - - VBox.Add(table); - - okButton = AddButton ("OK", ResponseType.Ok) as Button; - cancelButton = AddButton ("Cancel", ResponseType.Cancel) as Button; - - DefaultResponse = ResponseType.Ok; - } -} +using Gtk.TeamFoundation; partial class Driver { public string PromptForLogin(string serverUrl) { Application.Init(); - AuthDialog dialog = new AuthDialog(); + AuthenticationDialog dialog = new AuthenticationDialog(); dialog.ShowAll(); int rc = dialog.Run(); diff --git a/tools/opentf/Makefile b/tools/opentf/Makefile index 73194bc..0e95126 100644 --- a/tools/opentf/Makefile +++ b/tools/opentf/Makefile @@ -3,10 +3,9 @@ SUBDIRS = include ../../build/rules.make LOCAL_MCS_FLAGS = -r:Mono.Posix.dll -EXPLORE_SOURCES = ExploreCommand.cs ifeq ($(HAVE_GTK),yes) -EXTRA_SOURCES += $(EXPLORE_SOURCES) Gui.cs +EXTRA_SOURCES += ExploreCommand.cs Gui.cs LOCAL_MCS_FLAGS += -pkg:gtk-sharp-2.0 -d:HAVE_GTK else EXTRA_SOURCES += NoGui.cs -- 2.11.4.GIT