Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Ungureanu <marius.ungureanu@xamarin.com>2013-12-10 01:42:16 +0400
committerMarius Ungureanu <marius.ungureanu@xamarin.com>2013-12-10 22:23:07 +0400
commit747d8ceb9a6c17ba188b2fbc201135849d66f23a (patch)
tree38fd3d4e353d3f0d27185cfc4c61d653a4b7f9f2 /main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs
parentcbe224b98994b33c30f9f2702eb37261cf392803 (diff)
[VersionControl] Solution wide disable.
Diffstat (limited to 'main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs')
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/VersionControlGeneralOptionsPanel.cs4
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/VersionControlSolutionOptionsPanel.cs58
2 files changed, 60 insertions, 2 deletions
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/VersionControlGeneralOptionsPanel.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/VersionControlGeneralOptionsPanel.cs
index f521406588..7fd5e9adf6 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/VersionControlGeneralOptionsPanel.cs
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/VersionControlGeneralOptionsPanel.cs
@@ -41,7 +41,7 @@ namespace MonoDevelop.VersionControl
box.Margin = 12;
disableVersionControl = new Xwt.CheckBox (GettextCatalog.GetString ("Disable Version Control globally")) {
- Active = VersionControlService.IsGloballyDisabled,
+ Active = VersionControlService.ConfigurationGlobalDisabled,
};
box.PackStart (disableVersionControl);
box.Show ();
@@ -50,7 +50,7 @@ namespace MonoDevelop.VersionControl
public override void ApplyChanges ()
{
- VersionControlService.IsGloballyDisabled = disableVersionControl.Active;
+ VersionControlService.ConfigurationGlobalDisabled = disableVersionControl.Active;
VersionControlService.SaveConfiguration ();
}
}
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/VersionControlSolutionOptionsPanel.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/VersionControlSolutionOptionsPanel.cs
new file mode 100644
index 0000000000..f97e1570c6
--- /dev/null
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/VersionControlSolutionOptionsPanel.cs
@@ -0,0 +1,58 @@
+//
+// VersionControlSolutionOptionsPanel.cs
+//
+// Author:
+// Marius Ungureanu <marius.ungureanu@xamarin.com>
+//
+// Copyright (c) 2013 Marius Ungureanu
+//
+// 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 MonoDevelop.Components;
+using MonoDevelop.Core;
+using MonoDevelop.Ide.Gui.Dialogs;
+using MonoDevelop.Projects;
+
+namespace MonoDevelop.VersionControl
+{
+ public class VersionControlSolutionOptionsPanel : OptionsPanel
+ {
+ Xwt.CheckBox disableVersionControl;
+
+ public override Gtk.Widget CreatePanelWidget ()
+ {
+ Xwt.VBox box = new Xwt.VBox ();
+ box.Spacing = 6;
+ box.Margin = 12;
+
+ disableVersionControl = new Xwt.CheckBox (GettextCatalog.GetString ("Disable Version Control for this solution")) {
+ Active = VersionControlService.IsSolutionDisabled ((Solution)DataObject),
+ };
+ box.PackStart (disableVersionControl);
+ box.Show ();
+ return box.ToGtkWidget ();
+ }
+
+ public override void ApplyChanges ()
+ {
+ VersionControlService.SetSolutionDisabled ((Solution)DataObject, disableVersionControl.Active);
+ VersionControlService.SaveConfiguration ();
+ }
+ }
+}