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:
authorLluis Sanchez Gual <lluis@novell.com>2011-04-01 21:55:09 +0400
committerLluis Sanchez Gual <lluis@novell.com>2011-04-01 21:56:08 +0400
commit9a4c9e4695c15edb1ce16f183bff486b4ab52967 (patch)
tree35b7a4d8dec497a482dec987a9790e9f53f36429 /main/src/core
parent652c37952f857feb3bfcebca214379bbe48a91f0 (diff)
Add support for importing/exporting policy sets
The Custom Policies dialog now has options for importing/exporting policies from/to projects and files. I also added commands for importing/exporting project policies.
Diffstat (limited to 'main/src/core')
-rw-r--r--main/src/core/MonoDevelop.Ide/ExtensionModel/Commands.addin.xml6
-rw-r--r--main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml4
-rw-r--r--main/src/core/MonoDevelop.Ide/Makefile.am10
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs32
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs1
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ProjectSelectorWidget.cs280
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectPadContextMenu.addin.xml6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ApplyPolicyDialog.cs165
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs142
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ExportProjectPolicyDialog.cs110
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ImportProjectPolicyDialog.cs68
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectSelectorDialog.cs108
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj10
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.FindInFiles.SearchResultWidget.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget.cs32
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.TipOfTheDayWindow.cs1
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ApplyPolicyDialog.cs198
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ConfirmProjectDeleteDialog.cs1
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ExportProjectPolicyDialog.cs200
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ImportProjectPolicyDialog.cs114
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ProjectSelectorDialog.cs91
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic681
22 files changed, 2252 insertions, 10 deletions
diff --git a/main/src/core/MonoDevelop.Ide/ExtensionModel/Commands.addin.xml b/main/src/core/MonoDevelop.Ide/ExtensionModel/Commands.addin.xml
index be2ac62265..b2a6b5cb84 100644
--- a/main/src/core/MonoDevelop.Ide/ExtensionModel/Commands.addin.xml
+++ b/main/src/core/MonoDevelop.Ide/ExtensionModel/Commands.addin.xml
@@ -324,6 +324,12 @@
type = "radio|array"
defaultHandler="MonoDevelop.Ide.Commands.SelectActiveRuntimeHandler"
_label = "Active Runtime" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.ApplyPolicy"
+ defaultHandler="MonoDevelop.Ide.Commands.ApplyPolicyHandler"
+ _label = "Apply Policy..." />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.ExportPolicy"
+ defaultHandler="MonoDevelop.Ide.Commands.ExportPolicyHandler"
+ _label = "Export Policy..." />
</Category>
diff --git a/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml b/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml
index 6b934b0d40..a937604833 100644
--- a/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml
+++ b/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml
@@ -167,6 +167,10 @@
<ItemSet id = "SelectActiveRuntime" _label = "Active Runtime" autohide = "true">
<CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.SelectActiveRuntime" />
</ItemSet>
+ <SeparatorItem id = "PolicyToolsStart" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.ApplyPolicy" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.ExportPolicy" />
+ <SeparatorItem id = "PolicyToolsEnd" />
<SeparatorItem id = "OptionsSeparator" />
<CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.SolutionOptions" />
<CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.ProjectOptions" />
diff --git a/main/src/core/MonoDevelop.Ide/Makefile.am b/main/src/core/MonoDevelop.Ide/Makefile.am
index 22bccdfd4a..aa970ad84b 100644
--- a/main/src/core/MonoDevelop.Ide/Makefile.am
+++ b/main/src/core/MonoDevelop.Ide/Makefile.am
@@ -41,6 +41,7 @@ FILES = \
gtk-gui/MonoDevelop.Ide.FindInFiles.SearchResultWidget.cs \
gtk-gui/MonoDevelop.Ide.Fonts.FontChooserPanelWidget.cs \
gtk-gui/MonoDevelop.Ide.Gui.Components.ExecutionModeComboBox.cs \
+ gtk-gui/MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget.cs \
gtk-gui/MonoDevelop.Ide.Gui.Components.StringTagSelectorButton.cs \
gtk-gui/MonoDevelop.Ide.Gui.Dialogs.AddinLoadErrorDialog.cs \
gtk-gui/MonoDevelop.Ide.Gui.Dialogs.GtkErrorDialog.cs \
@@ -66,11 +67,14 @@ FILES = \
gtk-gui/MonoDevelop.Ide.Gui.OptionPanels.TextStylePolicyPanelWidget.cs \
gtk-gui/MonoDevelop.Ide.NavigateToDialog.NavigateToDialog.cs \
gtk-gui/MonoDevelop.Ide.Projects.AddMimeTypeDialog.cs \
+ gtk-gui/MonoDevelop.Ide.Projects.ApplyPolicyDialog.cs \
gtk-gui/MonoDevelop.Ide.Projects.CombineEntryFeatureSelector.cs \
gtk-gui/MonoDevelop.Ide.Projects.ConfirmProjectDeleteDialog.cs \
gtk-gui/MonoDevelop.Ide.Projects.DeleteConfigDialog.cs \
gtk-gui/MonoDevelop.Ide.Projects.ExportProjectDialog.cs \
+ gtk-gui/MonoDevelop.Ide.Projects.ExportProjectPolicyDialog.cs \
gtk-gui/MonoDevelop.Ide.Projects.FeatureSelectorDialog.cs \
+ gtk-gui/MonoDevelop.Ide.Projects.ImportProjectPolicyDialog.cs \
gtk-gui/MonoDevelop.Ide.Projects.IncludeNewFilesDialog.cs \
gtk-gui/MonoDevelop.Ide.Projects.NewConfigurationDialog.cs \
gtk-gui/MonoDevelop.Ide.Projects.NewFileDialog.cs \
@@ -92,6 +96,7 @@ FILES = \
gtk-gui/MonoDevelop.Ide.Projects.OptionPanels.RuntimeOptionsPanelWidget.cs \
gtk-gui/MonoDevelop.Ide.Projects.OptionPanels.StartupOptionsPanelWidget.cs \
gtk-gui/MonoDevelop.Ide.Projects.ProjectFileSelectorDialog.cs \
+ gtk-gui/MonoDevelop.Ide.Projects.ProjectSelectorDialog.cs \
gtk-gui/MonoDevelop.Ide.Projects.RenameConfigDialog.cs \
gtk-gui/MonoDevelop.Ide.Projects.SelectReferenceDialog.cs \
gtk-gui/MonoDevelop.Ide.SelectEncodingsDialog.cs \
@@ -405,6 +410,7 @@ FILES = \
MonoDevelop.Ide.Gui.Components/NodeState.cs \
MonoDevelop.Ide.Gui.Components/PadTreeView.cs \
MonoDevelop.Ide.Gui.Components/ProjectFileEntry.cs \
+ MonoDevelop.Ide.Gui.Components/ProjectSelectorWidget.cs \
MonoDevelop.Ide.Gui.Components/StringTagSelectorButton.cs \
MonoDevelop.Ide.Gui.Components/TransactedTreeBuilder.cs \
MonoDevelop.Ide.Gui.Components/TreeBuilder.cs \
@@ -603,6 +609,7 @@ FILES = \
MonoDevelop.Ide.Projects.OptionPanels/StartupOptionsPanel.cs \
MonoDevelop.Ide.Projects/AddFileDialog.cs \
MonoDevelop.Ide.Projects/AddMimeTypeDialog.cs \
+ MonoDevelop.Ide.Projects/ApplyPolicyDialog.cs \
MonoDevelop.Ide.Projects/AssemblyReferencePanel.cs \
MonoDevelop.Ide.Projects/CombineEntryFeatureSelector.cs \
MonoDevelop.Ide.Projects/CombineOptionsDialog.cs \
@@ -610,8 +617,10 @@ FILES = \
MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs \
MonoDevelop.Ide.Projects/DeleteConfigDialog.cs \
MonoDevelop.Ide.Projects/ExportProjectDialog.cs \
+ MonoDevelop.Ide.Projects/ExportProjectPolicyDialog.cs \
MonoDevelop.Ide.Projects/FeatureSelectorDialog.cs \
MonoDevelop.Ide.Projects/GacReferencePanel.cs \
+ MonoDevelop.Ide.Projects/ImportProjectPolicyDialog.cs \
MonoDevelop.Ide.Projects/IncludeNewFilesDialog.cs \
MonoDevelop.Ide.Projects/NewConfigurationDialog.cs \
MonoDevelop.Ide.Projects/NewFileDialog.cs \
@@ -621,6 +630,7 @@ FILES = \
MonoDevelop.Ide.Projects/ProjectFileSelectorDialog.cs \
MonoDevelop.Ide.Projects/ProjectOptionsDialog.cs \
MonoDevelop.Ide.Projects/ProjectReferencePanel.cs \
+ MonoDevelop.Ide.Projects/ProjectSelectorDialog.cs \
MonoDevelop.Ide.Projects/RenameConfigDialog.cs \
MonoDevelop.Ide.Projects/SelectReferenceDialog.cs \
MonoDevelop.Ide.Projects/TemplatePickerWidget.cs \
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
index 72eb5c6d67..955c2daa61 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
@@ -41,6 +41,8 @@ using MonoDevelop.Core.Execution;
using MonoDevelop.Ide.Execution;
using CustomCommand = MonoDevelop.Projects.CustomCommand;
using System.Linq;
+using MonoDevelop.Ide.Projects;
+using MonoDevelop.Projects.Policies;
namespace MonoDevelop.Ide.Commands
{
@@ -530,4 +532,34 @@ namespace MonoDevelop.Ide.Commands
IdeApp.Workspace.ActiveRuntime = (MonoDevelop.Core.Assemblies.TargetRuntime) dataItem;
}
}
+
+ class ApplyPolicyHandler: CommandHandler
+ {
+ protected override void Update (CommandInfo info)
+ {
+ info.Enabled = IdeApp.ProjectOperations.CurrentSelectedSolutionItem != null || IdeApp.ProjectOperations.CurrentSelectedSolution != null;
+ }
+
+ protected override void Run ()
+ {
+ ApplyPolicyDialog dlg = new ApplyPolicyDialog ((IPolicyProvider)IdeApp.ProjectOperations.CurrentSelectedSolutionItem ?? (IPolicyProvider)IdeApp.ProjectOperations.CurrentSelectedSolution);
+ dlg.Run ();
+ dlg.Destroy ();
+ }
+ }
+
+ class ExportPolicyHandler: CommandHandler
+ {
+ protected override void Update (CommandInfo info)
+ {
+ info.Enabled = IdeApp.ProjectOperations.CurrentSelectedSolutionItem != null || IdeApp.ProjectOperations.CurrentSelectedSolution != null;
+ }
+
+ protected override void Run ()
+ {
+ ExportProjectPolicyDialog dlg = new ExportProjectPolicyDialog ((IPolicyProvider)IdeApp.ProjectOperations.CurrentSelectedSolutionItem ?? (IPolicyProvider)IdeApp.ProjectOperations.CurrentSelectedSolution);
+ dlg.Run ();
+ dlg.Destroy ();
+ }
+ }
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs
index f487f6dbab..a6218f44dc 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs
@@ -2046,6 +2046,7 @@ namespace MonoDevelop.Ide.Gui.Components
public object GetNextCommandTarget ()
{
+ target.SetCurrentNodes (null);
return Next;
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ProjectSelectorWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ProjectSelectorWidget.cs
new file mode 100644
index 0000000000..65eb05797c
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ProjectSelectorWidget.cs
@@ -0,0 +1,280 @@
+//
+// ProjectSelectorWidget.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@novell.com>
+//
+// Copyright (c) 2011 Novell, Inc (http://www.novell.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.Linq;
+using MonoDevelop.Projects;
+using Gtk;
+using System.Collections.Generic;
+
+namespace MonoDevelop.Ide.Gui.Components
+{
+ [System.ComponentModel.ToolboxItem(true)]
+ public partial class ProjectSelectorWidget : Gtk.Bin
+ {
+ TreeStore store;
+ bool showCheckboxes;
+ IBuildTarget rootItem;
+ IBuildTarget currentSelection;
+ HashSet<IBuildTarget> activeItems = new HashSet<IBuildTarget> ();
+ HashSet<Type> selectableTypes = new HashSet<Type> ();
+
+ public event EventHandler SelectionChanged;
+ public event EventHandler ActiveChanged;
+
+ public ProjectSelectorWidget ()
+ {
+ this.Build();
+
+ store = new TreeStore (typeof(string), typeof(string), typeof(object), typeof(bool), typeof(bool));
+ tree.Model = store;
+
+ tree.HeadersVisible = false;
+ TreeViewColumn col = new TreeViewColumn ();
+ Gtk.CellRendererToggle ctog = new CellRendererToggle ();
+ ctog.Toggled += OnToggled;
+ col.PackStart (ctog, false);
+ Gtk.CellRendererPixbuf cr = new Gtk.CellRendererPixbuf();
+ col.PackStart (cr, false);
+ Gtk.CellRendererText crt = new Gtk.CellRendererText();
+ crt.Mode &= ~CellRendererMode.Activatable;
+ col.PackStart (crt, true);
+ col.AddAttribute (cr, "stock-id", 0);
+ col.AddAttribute (crt, "markup", 1);
+ col.AddAttribute (ctog, "active", 3);
+ col.AddAttribute (ctog, "visible", 4);
+ tree.AppendColumn (col);
+
+ tree.Selection.Changed += HandleTreeSelectionChanged;
+ }
+
+ void HandleTreeSelectionChanged (object sender, EventArgs e)
+ {
+ TreeIter it;
+ if (tree.Selection.GetSelected (out it))
+ currentSelection = (IBuildTarget) store.GetValue (it, 2);
+ else
+ currentSelection = null;
+
+ if (SelectionChanged != null)
+ SelectionChanged (this, EventArgs.Empty);
+ }
+
+ public IBuildTarget SelectedItem {
+ get {
+ if (currentSelection != null && selectableTypes.Count > 0 && !selectableTypes.Any (t => t.IsAssignableFrom (currentSelection.GetType ())))
+ return null;
+ else
+ return currentSelection;
+ }
+ set {
+ currentSelection = value;
+ SetSelection (currentSelection, null);
+ }
+ }
+
+ public IEnumerable<IBuildTarget> ActiveItems {
+ get {
+ return activeItems;
+ }
+ set {
+ activeItems = new HashSet<IBuildTarget> ();
+ activeItems.UnionWith (value);
+ SetSelection (currentSelection, activeItems);
+ }
+ }
+
+ public IEnumerable<Type> SelectableItemTypes {
+ get {
+ return selectableTypes;
+ }
+ set {
+ selectableTypes = new HashSet<Type> ();
+ selectableTypes.UnionWith (value);
+ Fill ();
+ }
+ }
+
+ public bool ShowCheckboxes {
+ get { return showCheckboxes; }
+ set { showCheckboxes = value; Fill (); }
+ }
+
+ public bool CascadeCheckboxSelection { get; set; }
+
+ public IBuildTarget RootItem {
+ get {
+ return this.rootItem;
+ }
+ set {
+ rootItem = value;
+ Fill ();
+ }
+ }
+
+ void Fill ()
+ {
+ IBuildTarget sel = SelectedItem;
+ store.Clear ();
+ if (rootItem is RootWorkspace) {
+ foreach (var item in ((RootWorkspace)rootItem).Items)
+ AddEntry (TreeIter.Zero, item);
+ SelectedItem = sel;
+ }
+ else if (rootItem != null) {
+ AddEntry (TreeIter.Zero, rootItem);
+ SelectedItem = sel;
+ }
+ }
+
+ void AddEntry (TreeIter iter, IBuildTarget item)
+ {
+ if (!IsVisible (item))
+ return;
+
+ string icon;
+ if (item is Solution)
+ icon = MonoDevelop.Ide.Gui.Stock.Solution;
+ else if (item is SolutionFolder)
+ icon = MonoDevelop.Ide.Gui.Stock.SolutionFolderClosed;
+ else if (item is WorkspaceItem)
+ icon = MonoDevelop.Ide.Gui.Stock.Workspace;
+ else if (item is Project)
+ icon = ((Project)item).StockIcon;
+ else
+ icon = MonoDevelop.Ide.Gui.Stock.Project;
+
+ bool checkVisible = IsCheckboxVisible (item);
+ bool selected = activeItems.Contains (item);
+
+ if (!iter.Equals (TreeIter.Zero))
+ iter = store.AppendValues (iter, icon, item.Name, item, selected && checkVisible, checkVisible);
+ else
+ iter = store.AppendValues (icon, item.Name, item, selected && checkVisible, checkVisible);
+
+ if (selected)
+ tree.ExpandToPath (store.GetPath (iter));
+
+ foreach (IBuildTarget ce in GetChildren (item))
+ AddEntry (iter, ce);
+ }
+
+ void SetSelection (IBuildTarget selected, HashSet<IBuildTarget> active)
+ {
+ TreeIter it;
+ if (store.GetIterFirst (out it))
+ SetSelection (it, selected, active);
+ }
+
+ bool SetSelection (TreeIter it, IBuildTarget selected, HashSet<IBuildTarget> active)
+ {
+ do {
+ IBuildTarget item = (IBuildTarget) store.GetValue (it, 2);
+ if (selected != null && item == selected) {
+ tree.Selection.SelectIter (it);
+ tree.ExpandToPath (store.GetPath (it));
+ tree.ScrollToCell (store.GetPath (it), tree.Columns[0], false, 0, 0);
+ if (active == null)
+ return true;
+ }
+ bool val = (bool) store.GetValue (it, 3);
+ bool newVal = active != null ? active.Contains (item) : val;
+ if (val != newVal)
+ store.SetValue (it, 3, newVal);
+
+ TreeIter ci;
+ if (store.IterChildren (out ci, it)) {
+ if (SetSelection (ci, selected, active))
+ return true;
+ }
+
+ } while (store.IterNext (ref it));
+
+ return false;
+ }
+
+ void OnToggled (object sender, Gtk.ToggledArgs args)
+ {
+ TreeIter iter;
+ store.GetIterFromString (out iter, args.Path);
+ IBuildTarget ob = (IBuildTarget) store.GetValue (iter, 2);
+ if (activeItems.Contains (ob)) {
+ activeItems.Remove (ob);
+ if (CascadeCheckboxSelection) {
+ foreach (var i in GetAllChildren (ob))
+ activeItems.Remove (i);
+ SetSelection (iter, null, new HashSet<IBuildTarget> ());
+ } else {
+ store.SetValue (iter, 3, false);
+ }
+ } else {
+ activeItems.Add (ob);
+ if (CascadeCheckboxSelection) {
+ foreach (var i in GetAllChildren (ob))
+ activeItems.Add (i);
+ SetSelection (iter, null, activeItems);
+ }
+ else {
+ store.SetValue (iter, 3, true);
+ }
+ }
+ if (ActiveChanged != null)
+ ActiveChanged (this, EventArgs.Empty);
+ }
+
+ IEnumerable<IBuildTarget> GetAllChildren (IBuildTarget item)
+ {
+ IEnumerable<IBuildTarget> res = GetChildren (item);
+ return res.Concat (res.SelectMany (i => GetAllChildren (i)));
+ }
+
+ IEnumerable<IBuildTarget> GetChildren (IBuildTarget item)
+ {
+ if (item is SolutionFolder) {
+ return ((SolutionFolder)item).Items;
+ } else if (item is Solution) {
+ return ((Solution)item).RootFolder.Items;
+ } else if (item is Workspace) {
+ return ((Workspace)item).Items;
+ } else
+ return new IBuildTarget [0];
+ }
+
+ protected bool IsVisible (IBuildTarget item)
+ {
+ return true;
+ }
+
+ protected bool IsCheckboxVisible (IBuildTarget item)
+ {
+ if (!ShowCheckboxes)
+ return false;
+ if (selectableTypes.Count > 0)
+ return selectableTypes.Any (t => t.IsAssignableFrom (item.GetType ()));
+ return true;
+ }
+ }
+}
+
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectPadContextMenu.addin.xml b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectPadContextMenu.addin.xml
index 05f89c9a47..8f1a921ec0 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectPadContextMenu.addin.xml
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectPadContextMenu.addin.xml
@@ -90,6 +90,12 @@
<CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.ExportProject" />
<SeparatorItem id = "ExportSeparator" />
</Condition>
+ <Condition id="ItemType" value="Solution|Project|SolutionFolder">
+ <SeparatorItem id = "PolicyToolsStart" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.ApplyPolicy" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.ExportPolicy" />
+ <SeparatorItem id = "PolicyToolsEnd" />
+ </Condition>
<Condition id="ItemType" value="IFolderItem">
<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.OpenInTerminal" />
</Condition>
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ApplyPolicyDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ApplyPolicyDialog.cs
new file mode 100644
index 0000000000..421d447481
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ApplyPolicyDialog.cs
@@ -0,0 +1,165 @@
+//
+// ApplyPolicyDialog.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@novell.com>
+//
+// Copyright (c) 2011 Novell, Inc (http://www.novell.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 MonoDevelop.Projects.Policies;
+using System.Linq;
+using MonoDevelop.Ide;
+using MonoDevelop.Core;
+using System.Collections.Generic;
+using System.Text;
+
+namespace MonoDevelop.Ide.Projects
+{
+ public partial class ApplyPolicyDialog : Gtk.Dialog
+ {
+ IPolicyProvider policyProvider;
+
+ public ApplyPolicyDialog (IPolicyProvider policyProvider)
+ {
+ this.Build ();
+ this.policyProvider = policyProvider;
+
+ foreach (PolicySet pset in PolicyService.GetPolicySets ())
+ if (pset.Visible)
+ combPolicies.AppendText (pset.Name);
+
+ fileEntry.DefaultPath = ExportProjectPolicyDialog.DefaultFileDialogPolicyDir;
+ combPolicies.Active = 0;
+ OnRadioCustomToggled (null, null);
+ UpdateContentLabels ();
+ }
+
+ protected void OnRadioCustomToggled (object sender, System.EventArgs e)
+ {
+ boxCustom.Sensitive = radioCustom.Active;
+ boxFile.Sensitive = !radioCustom.Active;
+ UpdateContentLabels ();
+ }
+
+ protected void OnButtonOkClicked (object sender, System.EventArgs e)
+ {
+ PolicySet pset = GetPolicySet (true);
+ if (pset != null) {
+ policyProvider.Policies.Import (pset, false);
+ Respond (Gtk.ResponseType.Ok);
+ }
+ }
+
+ PolicySet GetPolicySet (bool notifyErrors)
+ {
+ if (radioCustom.Active) {
+ return PolicyService.GetPolicySet (combPolicies.ActiveText);
+ }
+ else {
+ if (string.IsNullOrEmpty (fileEntry.Path)) {
+ if (notifyErrors)
+ MessageService.ShowError (GettextCatalog.GetString ("File name not specified"));
+ return null;
+ }
+ try {
+ PolicySet pset = new PolicySet ();
+ pset.LoadFromFile (fileEntry.Path);
+ ExportProjectPolicyDialog.DefaultFileDialogPolicyDir = System.IO.Path.GetDirectoryName (fileEntry.Path);
+ return pset;
+ } catch (Exception ex) {
+ if (notifyErrors)
+ MessageService.ShowException (ex, GettextCatalog.GetString ("The policy set could not be loaded"));
+ return null;
+ }
+ }
+ }
+
+ void UpdateContentLabels ()
+ {
+ PolicySet pset = GetPolicySet (false);
+ if (pset == null) {
+ labelChangesTitle.Hide ();
+ if (radioFile.Active) {
+ if (string.IsNullOrEmpty (fileEntry.Path) || !System.IO.File.Exists (fileEntry.Path)) {
+ labelChanges.Text = GettextCatalog.GetString ("Please select a valid policy file");
+ }
+ else {
+ labelChanges.Text = GettextCatalog.GetString ("The selected file is not a valid policies file");
+ }
+ }
+ else
+ labelChanges.Text = string.Empty;
+ return;
+ }
+ labelChangesTitle.Show ();
+ labelChanges.Text = GetPoliciesDescription (pset);
+ }
+
+ public static string GetPoliciesDescription (PolicyContainer pset)
+ {
+ Dictionary<string,List<string>> content = new Dictionary<string, List<string>> ();
+ foreach (var p in pset.DirectGetAll ()) {
+ string name = PolicyService.GetPolicyTypeDescription (p.PolicyType);
+ List<string> scopes;
+ if (!content.TryGetValue (name, out scopes))
+ scopes = content [name] = new List<string> ();
+ scopes.Add (p.Scope ?? "");
+ }
+
+ var sorted = content.ToList ();
+ sorted.Sort ((x, y) => x.Key.CompareTo(y.Key));
+ StringBuilder sb = new StringBuilder ();
+
+ foreach (var pol in sorted) {
+ if (sb.Length > 0)
+ sb.Append ('\n');
+ sb.Append (pol.Key);
+ if (pol.Value.Count != 1 || pol.Value[0].Length != 0) {
+ sb.Append (" (");
+ bool first = true;
+ if (pol.Value.Remove ("")) {
+ sb.Append (GettextCatalog.GetString ("default settings"));
+ first = false;
+ }
+ foreach (var s in pol.Value) {
+ if (!first)
+ sb.Append (", ");
+ sb.Append (s);
+ first = false;
+ }
+ sb.Append (")");
+ }
+ }
+ return sb.ToString ();
+ }
+
+ protected void OnCombPoliciesChanged (object sender, System.EventArgs e)
+ {
+ UpdateContentLabels ();
+ }
+
+ protected void OnFileEntryPathChanged (object sender, System.EventArgs e)
+ {
+ UpdateContentLabels ();
+ }
+ }
+}
+
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs
index f888289827..a66e3a5fa7 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs
@@ -35,14 +35,17 @@ using MonoDevelop.Ide.Gui.Dialogs;
using MonoDevelop.Projects.Policies;
using MonoDevelop.Components;
using Gtk;
+using System.Linq;
+using MonoDevelop.Projects;
namespace MonoDevelop.Ide.Projects
{
public class DefaultPolicyOptionsDialog : OptionsDialog
{
ComboBox policiesCombo;
- Button newButton;
+ MenuButton newButton;
Button deleteButton;
+ MenuButton exportButton;
List<PolicySet> sets = new List<PolicySet> ();
Dictionary<PolicySet,PolicySet> originalSets = new Dictionary<PolicySet, PolicySet> ();
@@ -64,12 +67,46 @@ namespace MonoDevelop.Ide.Projects
policiesCombo = ComboBox.NewText ();
topBar.PackStart (policiesCombo, false, false, 0);
- newButton = new Button (GettextCatalog.GetString ("Add Policy"));
- topBar.PackEnd (newButton, false, false, 0);
-
deleteButton = new Button (GettextCatalog.GetString ("Delete Policy"));
topBar.PackEnd (deleteButton, false, false, 0);
+ exportButton = new MenuButton ();
+ exportButton.Label = GettextCatalog.GetString ("Export");
+ exportButton.MenuCreator = delegate {
+ Gtk.Menu menu = new Gtk.Menu ();
+ MenuItem mi = new MenuItem (GettextCatalog.GetString ("To file..."));
+ mi.Activated += HandleToFile;
+ menu.Insert (mi, -1);
+ mi = new MenuItem (GettextCatalog.GetString ("To project or solution..."));
+ mi.Activated += HandleToProject;
+ if (!IdeApp.Workspace.IsOpen)
+ mi.Sensitive = false;
+ menu.Insert (mi, -1);
+ menu.ShowAll ();
+ return menu;
+ };
+ topBar.PackEnd (exportButton, false, false, 0);
+
+ newButton = new MenuButton ();
+ newButton.Label = GettextCatalog.GetString ("Add Policy");
+ newButton.MenuCreator = delegate {
+ Gtk.Menu menu = new Gtk.Menu ();
+ MenuItem mi = new MenuItem (GettextCatalog.GetString ("New policy..."));
+ mi.Activated += HandleNewButtonClicked;
+ menu.Insert (mi, -1);
+ mi = new MenuItem (GettextCatalog.GetString ("From file..."));
+ mi.Activated += HandleFromFile;
+ menu.Insert (mi, -1);
+ mi = new MenuItem (GettextCatalog.GetString ("From project or solution..."));
+ mi.Activated += HandleFromProject;
+ if (!IdeApp.Workspace.IsOpen)
+ mi.Sensitive = false;
+ menu.Insert (mi, -1);
+ menu.ShowAll ();
+ return menu;
+ };
+ topBar.PackEnd (newButton, false, false, 0);
+
Alignment align = new Alignment (0f, 0f, 1f, 1f);
align.LeftPadding = 9;
align.TopPadding = 9;
@@ -97,7 +134,6 @@ namespace MonoDevelop.Ide.Projects
FillPolicySets ();
policiesCombo.Changed += HandlePoliciesComboChanged;
- newButton.Clicked += HandleNewButtonClicked;
deleteButton.Clicked += HandleDeleteButtonClicked;
}
@@ -155,6 +191,98 @@ namespace MonoDevelop.Ide.Projects
dlg.Destroy ();
}
}
+
+ void HandleFromProject (object sender, EventArgs e)
+ {
+ ImportProjectPolicyDialog dlg = new ImportProjectPolicyDialog ();
+ try {
+ if (MessageService.RunCustomDialog (dlg, this) == (int) Gtk.ResponseType.Ok) {
+ PolicySet pset = new PolicySet ();
+ pset.CopyFrom (dlg.SelectedItem.Policies);
+ pset.Name = GetValidName (dlg.PolicyName);
+ sets.Add (pset);
+ FillPolicySets ();
+ policiesCombo.Active = sets.IndexOf (pset);
+ }
+ } finally {
+ dlg.Destroy ();
+ }
+ }
+
+ void HandleFromFile (object sender, EventArgs e)
+ {
+ OpenFileDialog dlg = new OpenFileDialog (GettextCatalog.GetString ("Select Policy File"));
+ dlg.Action = FileChooserAction.Open;
+ dlg.TransientFor = this;
+ dlg.AddFilter (GettextCatalog.GetString ("MonoDevelop policy files"), "*.mdpolicy");
+ dlg.AddAllFilesFilter ();
+ dlg.CurrentFolder = ExportProjectPolicyDialog.DefaultFileDialogPolicyDir;
+ if (dlg.Run ()) {
+ try {
+ PolicySet pset = new PolicySet ();
+ pset.LoadFromFile (dlg.SelectedFile);
+ if (string.IsNullOrEmpty (pset.Name))
+ pset.Name = dlg.SelectedFile.FileNameWithoutExtension;
+ pset.Name = GetValidName (pset.Name);
+ sets.Add (pset);
+ ExportProjectPolicyDialog.DefaultFileDialogPolicyDir = dlg.SelectedFile.ParentDirectory;
+ FillPolicySets ();
+ policiesCombo.Active = sets.IndexOf (pset);
+ } catch (Exception ex) {
+ MessageService.ShowException (ex, GettextCatalog.GetString ("The policy set could not be loaded"));
+ }
+ }
+ }
+
+ string GetValidName (string name)
+ {
+ string finalName = name;
+ int n = 1;
+ while (sets.Any (ps => ps.Name == finalName)) {
+ n++;
+ finalName = name + n;
+ }
+ return finalName;
+ }
+
+ void HandleToProject (object sender, EventArgs e)
+ {
+ ProjectSelectorDialog dlg = new ProjectSelectorDialog ();
+ try {
+ dlg.Title = GettextCatalog.GetString ("Apply to Project");
+ dlg.RootItem = IdeApp.Workspace;
+ dlg.SelectedItem = IdeApp.ProjectOperations.CurrentSelectedBuildTarget;
+ dlg.SelectableItemTypes = new Type[] { typeof(Solution), typeof(SolutionItem) };
+ if (MessageService.RunCustomDialog (dlg, this) == (int) Gtk.ResponseType.Ok) {
+ ((IPolicyProvider)dlg.SelectedItem).Policies.Import (currentSet, true);
+ if (dlg.SelectedItem is IWorkspaceFileObject)
+ IdeApp.ProjectOperations.Save ((IWorkspaceFileObject)dlg.SelectedItem);
+ else
+ IdeApp.ProjectOperations.Save (((SolutionItem)dlg.SelectedItem).ParentSolution);
+ }
+ } finally {
+ dlg.Destroy ();
+ }
+ }
+
+ void HandleToFile (object sender, EventArgs e)
+ {
+ OpenFileDialog dlg = new OpenFileDialog (GettextCatalog.GetString ("Select Policy File"));
+ dlg.TransientFor = this;
+ dlg.InitialFileName = currentSet.Name + ".mdpolicy";
+ dlg.Action = FileChooserAction.Save;
+ dlg.AddFilter (GettextCatalog.GetString ("MonoDevelop policy files"), "*.mdpolicy");
+ dlg.AddAllFilesFilter ();
+ dlg.CurrentFolder = ExportProjectPolicyDialog.DefaultFileDialogPolicyDir;
+ if (dlg.Run ()) {
+ try {
+ currentSet.SaveToFile (dlg.SelectedFile);
+ ExportProjectPolicyDialog.DefaultFileDialogPolicyDir = dlg.SelectedFile.ParentDirectory;
+ } catch (Exception ex) {
+ MessageService.ShowException (ex, GettextCatalog.GetString ("The policy set could not be saved"));
+ }
+ }
+ }
void FillPolicySets ()
{
@@ -192,7 +320,7 @@ namespace MonoDevelop.Ide.Projects
void UpdateStatus ()
{
if (sets.Count == 0) {
- deleteButton.Sensitive = false;
+ deleteButton.Sensitive = exportButton.Sensitive = false;
MainBox.Sensitive = false;
((ListStore)policiesCombo.Model).Clear ();
policiesCombo.Sensitive = false;
@@ -200,7 +328,7 @@ namespace MonoDevelop.Ide.Projects
policiesCombo.Active = 0;
}
else {
- deleteButton.Sensitive = true;
+ deleteButton.Sensitive = exportButton.Sensitive = true;
MainBox.Sensitive = true;
policiesCombo.Sensitive = true;
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ExportProjectPolicyDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ExportProjectPolicyDialog.cs
new file mode 100644
index 0000000000..488fd0fc11
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ExportProjectPolicyDialog.cs
@@ -0,0 +1,110 @@
+//
+// ExportProjectPolicyDialog.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@novell.com>
+//
+// Copyright (c) 2011 Novell, Inc (http://www.novell.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;
+using MonoDevelop.Core;
+using MonoDevelop.Projects;
+using MonoDevelop.Projects.Policies;
+
+namespace MonoDevelop.Ide.Projects
+{
+ partial class ExportProjectPolicyDialog : Gtk.Dialog
+ {
+ IPolicyProvider policyProvider;
+
+ public ExportProjectPolicyDialog (IPolicyProvider policyProvider)
+ {
+ this.Build ();
+ this.policyProvider = policyProvider;
+
+ fileEntry.DefaultPath = DefaultFileDialogPolicyDir;
+ if (policyProvider is SolutionItem)
+ fileEntry.Path = ((SolutionItem)policyProvider).Name + ".mdpolicy";
+ else if (policyProvider is Solution)
+ fileEntry.Path = ((Solution)policyProvider).Name + ".mdpolicy";
+
+ UpdateWidgets ();
+
+ labelPolicies.Text = ApplyPolicyDialog.GetPoliciesDescription (policyProvider.Policies);
+ }
+
+ public static FilePath DefaultFileDialogPolicyDir {
+ get { return PropertyService.Get<string> ("MonoDevelop.Ide.Projects.PolicyLocation", Environment.GetFolderPath (Environment.SpecialFolder.Personal)); }
+ set { PropertyService.Set ("MonoDevelop.Ide.Projects.PolicyLocation", value.ToString ()); }
+ }
+
+ void UpdateWidgets ()
+ {
+ boxCustom.Sensitive = radioCustom.Active;
+ boxFile.Sensitive = !radioCustom.Active;
+ }
+
+ protected void OnRadioCustomToggled (object sender, System.EventArgs e)
+ {
+ UpdateWidgets ();
+ }
+
+ protected void OnButtonOkClicked (object sender, System.EventArgs e)
+ {
+ if (radioCustom.Active) {
+ if (entryName.Text.Length == 0) {
+ MessageService.ShowError (GettextCatalog.GetString ("Policy name not specified"));
+ return;
+ }
+ PolicySet pset = CreatePolicySet ();
+ pset.Name = entryName.Text;
+ PolicyService.AddUserPolicySet (pset);
+ PolicyService.SavePolicies ();
+ }
+ else {
+ if (fileEntry.Path == null || fileEntry.Path.Length == 0) {
+ MessageService.ShowError (GettextCatalog.GetString ("File name not specified"));
+ return;
+ }
+ FilePath file = fileEntry.Path;
+ if (file.Extension != ".mdpolicy")
+ file = file + ".mdpolicy";
+ DefaultFileDialogPolicyDir = file.ParentDirectory;
+
+ if (System.IO.File.Exists (file) && !MessageService.Confirm (GettextCatalog.GetString ("The file {0} already exists. Do you want to replace it?", file), AlertButton.Replace))
+ return;
+
+ PolicySet pset = CreatePolicySet ();
+ pset.Name = file.FileName;
+ pset.SaveToFile (file);
+ }
+ Respond (Gtk.ResponseType.Ok);
+ }
+
+ PolicySet CreatePolicySet ()
+ {
+ PolicySet pset = new PolicySet ();
+ pset.Import (policyProvider.Policies, true);
+ return pset;
+ }
+ }
+}
+
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ImportProjectPolicyDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ImportProjectPolicyDialog.cs
new file mode 100644
index 0000000000..548cf4a916
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ImportProjectPolicyDialog.cs
@@ -0,0 +1,68 @@
+//
+// ImportProjectPolicyDialog.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@novell.com>
+//
+// Copyright (c) 2011 Novell, Inc (http://www.novell.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 MonoDevelop.Projects;
+using MonoDevelop.Projects.Policies;
+
+namespace MonoDevelop.Ide.Projects
+{
+ partial class ImportProjectPolicyDialog : Gtk.Dialog
+ {
+ public ImportProjectPolicyDialog ()
+ {
+ this.Build ();
+ selector.RootItem = IdeApp.Workspace;
+ selector.SelectedItem = IdeApp.ProjectOperations.CurrentSelectedBuildTarget;
+ selector.SelectableItemTypes = new Type[] { typeof(IPolicyProvider) };
+ UpdateOk ();
+ }
+
+ public string PolicyName {
+ get { return entryName.Text; }
+ set { entryName.Text = value; }
+ }
+
+ public IPolicyProvider SelectedItem {
+ get { return (IPolicyProvider) selector.SelectedItem; }
+ }
+
+ protected void OnEntryNameChanged (object sender, System.EventArgs e)
+ {
+ UpdateOk ();
+ }
+
+ void UpdateOk ()
+ {
+ buttonOk.Sensitive = selector.SelectedItem != null && PolicyName.Length > 0;
+ }
+
+ protected void OnSelectorSelectionChanged (object sender, System.EventArgs e)
+ {
+ UpdateOk ();
+ }
+ }
+}
+
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectSelectorDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectSelectorDialog.cs
new file mode 100644
index 0000000000..21c9816b5e
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectSelectorDialog.cs
@@ -0,0 +1,108 @@
+//
+// ProjectSelectorDialog.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@novell.com>
+//
+// Copyright (c) 2011 Novell, Inc (http://www.novell.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.Linq;
+using MonoDevelop.Ide.Gui.Components;
+using MonoDevelop.Projects;
+using System.Collections.Generic;
+
+namespace MonoDevelop.Ide.Projects
+{
+ public partial class ProjectSelectorDialog : Gtk.Dialog
+ {
+ bool allowEmptySelection;
+
+ public ProjectSelectorDialog ()
+ {
+ this.Build ();
+ UpdateOk ();
+ }
+
+ public string Label {
+ get { return labelTitle.Text; }
+ set { labelTitle.Text = value; }
+ }
+
+ public bool AllowEmptySelection {
+ get {
+ return this.allowEmptySelection;
+ }
+ set {
+ allowEmptySelection = value;
+ UpdateOk ();
+ }
+ }
+
+ public IBuildTarget SelectedItem {
+ get { return selector.SelectedItem; }
+ set { selector.SelectedItem = value; }
+ }
+
+ public IEnumerable<IBuildTarget> ActiveItems {
+ get { return selector.ActiveItems; }
+ set { selector.ActiveItems = value; }
+ }
+
+ public bool ShowCheckboxes {
+ get { return selector.ShowCheckboxes; }
+ set { selector.ShowCheckboxes = value; UpdateOk (); }
+ }
+
+ public bool CascadeCheckboxSelection {
+ get { return selector.CascadeCheckboxSelection; }
+ set { selector.CascadeCheckboxSelection = value; }
+ }
+
+ public IBuildTarget RootItem {
+ get { return selector.RootItem; }
+ set { selector.RootItem = value; }
+ }
+
+ public IEnumerable<Type> SelectableItemTypes {
+ get { return selector.SelectableItemTypes; }
+ set { selector.SelectableItemTypes = value; }
+ }
+
+ void UpdateOk ()
+ {
+ if (selector.ShowCheckboxes)
+ buttonOk.Sensitive = AllowEmptySelection || selector.ActiveItems.Any ();
+ else
+ buttonOk.Sensitive = AllowEmptySelection || selector.SelectedItem != null;
+ }
+
+ protected void OnSelectorSelectionChanged (object sender, System.EventArgs e)
+ {
+ UpdateOk ();
+ }
+
+ protected void OnSelectorActiveChanged (object sender, System.EventArgs e)
+ {
+ UpdateOk ();
+ }
+ }
+}
+
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
index fdfc35be89..e6be89b728 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
@@ -1428,6 +1428,16 @@
<Compile Include="MonoDevelop.Ide.Extensions\FileTypeCondition.cs" />
<Compile Include="MonoDevelop.Ide\CodeGenerationService.cs" />
<Compile Include="MonoDevelop.Ide.Gui\IDisplayBinding.cs" />
+ <Compile Include="MonoDevelop.Ide.Projects\ExportProjectPolicyDialog.cs" />
+ <Compile Include="gtk-gui\MonoDevelop.Ide.Projects.ExportProjectPolicyDialog.cs" />
+ <Compile Include="MonoDevelop.Ide.Projects\ApplyPolicyDialog.cs" />
+ <Compile Include="gtk-gui\MonoDevelop.Ide.Projects.ApplyPolicyDialog.cs" />
+ <Compile Include="MonoDevelop.Ide.Gui.Components\ProjectSelectorWidget.cs" />
+ <Compile Include="gtk-gui\MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget.cs" />
+ <Compile Include="MonoDevelop.Ide.Projects\ProjectSelectorDialog.cs" />
+ <Compile Include="gtk-gui\MonoDevelop.Ide.Projects.ProjectSelectorDialog.cs" />
+ <Compile Include="MonoDevelop.Ide.Projects\ImportProjectPolicyDialog.cs" />
+ <Compile Include="gtk-gui\MonoDevelop.Ide.Projects.ImportProjectPolicyDialog.cs" />
</ItemGroup>
<ItemGroup>
<None Include="ChangeLog" />
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.FindInFiles.SearchResultWidget.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.FindInFiles.SearchResultWidget.cs
index 025971b844..12cfe5fa1e 100644
--- a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.FindInFiles.SearchResultWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.FindInFiles.SearchResultWidget.cs
@@ -2,7 +2,7 @@
// This file has been generated by the GUI designer. Do not modify.
namespace MonoDevelop.Ide.FindInFiles
{
- public partial class SearchResultWidget
+ internal partial class SearchResultWidget
{
private global::Gtk.UIManager UIManager;
private global::Gtk.Action ViewModeAction;
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget.cs
new file mode 100644
index 0000000000..37cfea8e04
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget.cs
@@ -0,0 +1,32 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace MonoDevelop.Ide.Gui.Components
+{
+ public partial class ProjectSelectorWidget
+ {
+ private global::Gtk.ScrolledWindow GtkScrolledWindow;
+ private global::Gtk.TreeView tree;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget
+ global::Stetic.BinContainer.Attach (this);
+ this.Name = "MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget";
+ // Container child MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget.Gtk.Container+ContainerChild
+ this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
+ this.GtkScrolledWindow.Name = "GtkScrolledWindow";
+ this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
+ // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
+ this.tree = new global::Gtk.TreeView ();
+ this.tree.CanFocus = true;
+ this.tree.Name = "tree";
+ this.GtkScrolledWindow.Add (this.tree);
+ this.Add (this.GtkScrolledWindow);
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.Hide ();
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.TipOfTheDayWindow.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.TipOfTheDayWindow.cs
index 9daf3a29d9..39d30c5a02 100644
--- a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.TipOfTheDayWindow.cs
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.TipOfTheDayWindow.cs
@@ -100,6 +100,7 @@ namespace MonoDevelop.Ide.Gui.Dialogs
w7.Fill = false;
// Container child hbox5.Gtk.Box+BoxChild
this.hbuttonbox1 = new global::Gtk.HButtonBox ();
+ this.hbuttonbox1.Name = "hbuttonbox1";
this.hbuttonbox1.Spacing = 10;
this.hbuttonbox1.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
// Container child hbuttonbox1.Gtk.ButtonBox+ButtonBoxChild
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ApplyPolicyDialog.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ApplyPolicyDialog.cs
new file mode 100644
index 0000000000..4d1cc5e8da
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ApplyPolicyDialog.cs
@@ -0,0 +1,198 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace MonoDevelop.Ide.Projects
+{
+ public partial class ApplyPolicyDialog
+ {
+ private global::Gtk.VBox vbox3;
+ private global::Gtk.RadioButton radioCustom;
+ private global::Gtk.Alignment boxCustom;
+ private global::Gtk.HBox hbox1;
+ private global::Gtk.Label label2;
+ private global::Gtk.ComboBox combPolicies;
+ private global::Gtk.RadioButton radioFile;
+ private global::Gtk.Alignment boxFile;
+ private global::Gtk.HBox hbox2;
+ private global::Gtk.Label label3;
+ private global::MonoDevelop.Components.FileEntry fileEntry;
+ private global::Gtk.HSeparator hseparator1;
+ private global::Gtk.Label labelChangesTitle;
+ private global::Gtk.Label labelChanges;
+ private global::Gtk.Button buttonCancel;
+ private global::Gtk.Button buttonOk;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget MonoDevelop.Ide.Projects.ApplyPolicyDialog
+ this.Name = "MonoDevelop.Ide.Projects.ApplyPolicyDialog";
+ this.Title = global::MonoDevelop.Core.GettextCatalog.GetString ("Apply Policies");
+ this.WindowPosition = ((global::Gtk.WindowPosition)(4));
+ // Internal child MonoDevelop.Ide.Projects.ApplyPolicyDialog.VBox
+ global::Gtk.VBox w1 = this.VBox;
+ w1.Name = "dialog1_VBox";
+ w1.BorderWidth = ((uint)(2));
+ // Container child dialog1_VBox.Gtk.Box+BoxChild
+ this.vbox3 = new global::Gtk.VBox ();
+ this.vbox3.Name = "vbox3";
+ this.vbox3.Spacing = 6;
+ this.vbox3.BorderWidth = ((uint)(12));
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.radioCustom = new global::Gtk.RadioButton (global::MonoDevelop.Core.GettextCatalog.GetString ("Apply stock or custom policy set"));
+ this.radioCustom.CanFocus = true;
+ this.radioCustom.Name = "radioCustom";
+ this.radioCustom.DrawIndicator = true;
+ this.radioCustom.UseUnderline = true;
+ this.radioCustom.Group = new global::GLib.SList (global::System.IntPtr.Zero);
+ this.vbox3.Add (this.radioCustom);
+ global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.radioCustom]));
+ w2.Position = 0;
+ w2.Expand = false;
+ w2.Fill = false;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.boxCustom = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
+ this.boxCustom.Name = "boxCustom";
+ this.boxCustom.LeftPadding = ((uint)(42));
+ // Container child boxCustom.Gtk.Container+ContainerChild
+ this.hbox1 = new global::Gtk.HBox ();
+ this.hbox1.Name = "hbox1";
+ this.hbox1.Spacing = 6;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.label2 = new global::Gtk.Label ();
+ this.label2.Name = "label2";
+ this.label2.LabelProp = global::MonoDevelop.Core.GettextCatalog.GetString ("Policy:");
+ this.hbox1.Add (this.label2);
+ global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label2]));
+ w3.Position = 0;
+ w3.Expand = false;
+ w3.Fill = false;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.combPolicies = global::Gtk.ComboBox.NewText ();
+ this.combPolicies.Name = "combPolicies";
+ this.hbox1.Add (this.combPolicies);
+ global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.combPolicies]));
+ w4.Position = 1;
+ w4.Expand = false;
+ w4.Fill = false;
+ this.boxCustom.Add (this.hbox1);
+ this.vbox3.Add (this.boxCustom);
+ global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.boxCustom]));
+ w6.Position = 1;
+ w6.Expand = false;
+ w6.Fill = false;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.radioFile = new global::Gtk.RadioButton (global::MonoDevelop.Core.GettextCatalog.GetString ("Apply policies from file"));
+ this.radioFile.CanFocus = true;
+ this.radioFile.Name = "radioFile";
+ this.radioFile.DrawIndicator = true;
+ this.radioFile.UseUnderline = true;
+ this.radioFile.Group = this.radioCustom.Group;
+ this.vbox3.Add (this.radioFile);
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.radioFile]));
+ w7.Position = 2;
+ w7.Expand = false;
+ w7.Fill = false;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.boxFile = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
+ this.boxFile.Name = "boxFile";
+ this.boxFile.LeftPadding = ((uint)(42));
+ // Container child boxFile.Gtk.Container+ContainerChild
+ this.hbox2 = new global::Gtk.HBox ();
+ this.hbox2.Name = "hbox2";
+ this.hbox2.Spacing = 6;
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.label3 = new global::Gtk.Label ();
+ this.label3.Name = "label3";
+ this.label3.LabelProp = global::MonoDevelop.Core.GettextCatalog.GetString ("File:");
+ this.hbox2.Add (this.label3);
+ global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.label3]));
+ w8.Position = 0;
+ w8.Expand = false;
+ w8.Fill = false;
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.fileEntry = new global::MonoDevelop.Components.FileEntry ();
+ this.fileEntry.Name = "fileEntry";
+ this.fileEntry.BrowserTitle = "Select Policy Set File";
+ this.hbox2.Add (this.fileEntry);
+ global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.fileEntry]));
+ w9.Position = 1;
+ this.boxFile.Add (this.hbox2);
+ this.vbox3.Add (this.boxFile);
+ global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.boxFile]));
+ w11.Position = 3;
+ w11.Expand = false;
+ w11.Fill = false;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.hseparator1 = new global::Gtk.HSeparator ();
+ this.hseparator1.Name = "hseparator1";
+ this.vbox3.Add (this.hseparator1);
+ global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hseparator1]));
+ w12.Position = 4;
+ w12.Expand = false;
+ w12.Fill = false;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.labelChangesTitle = new global::Gtk.Label ();
+ this.labelChangesTitle.Name = "labelChangesTitle";
+ this.labelChangesTitle.Xalign = 0F;
+ this.labelChangesTitle.LabelProp = global::MonoDevelop.Core.GettextCatalog.GetString ("The following policies will be set or replaced:");
+ this.vbox3.Add (this.labelChangesTitle);
+ global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.labelChangesTitle]));
+ w13.Position = 5;
+ w13.Expand = false;
+ w13.Fill = false;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.labelChanges = new global::Gtk.Label ();
+ this.labelChanges.Name = "labelChanges";
+ this.labelChanges.Xalign = 0F;
+ this.vbox3.Add (this.labelChanges);
+ global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.labelChanges]));
+ w14.Position = 6;
+ w1.Add (this.vbox3);
+ global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox3]));
+ w15.Position = 0;
+ w15.Expand = false;
+ w15.Fill = false;
+ // Internal child MonoDevelop.Ide.Projects.ApplyPolicyDialog.ActionArea
+ global::Gtk.HButtonBox w16 = this.ActionArea;
+ w16.Name = "dialog1_ActionArea";
+ w16.Spacing = 10;
+ w16.BorderWidth = ((uint)(5));
+ w16.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+ // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+ this.buttonCancel = new global::Gtk.Button ();
+ this.buttonCancel.CanDefault = true;
+ this.buttonCancel.CanFocus = true;
+ this.buttonCancel.Name = "buttonCancel";
+ this.buttonCancel.UseStock = true;
+ this.buttonCancel.UseUnderline = true;
+ this.buttonCancel.Label = "gtk-cancel";
+ this.AddActionWidget (this.buttonCancel, -6);
+ global::Gtk.ButtonBox.ButtonBoxChild w17 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w16 [this.buttonCancel]));
+ w17.Expand = false;
+ w17.Fill = false;
+ // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+ this.buttonOk = new global::Gtk.Button ();
+ this.buttonOk.CanDefault = true;
+ this.buttonOk.CanFocus = true;
+ this.buttonOk.Name = "buttonOk";
+ this.buttonOk.UseStock = true;
+ this.buttonOk.UseUnderline = true;
+ this.buttonOk.Label = "gtk-apply";
+ w16.Add (this.buttonOk);
+ global::Gtk.ButtonBox.ButtonBoxChild w18 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w16 [this.buttonOk]));
+ w18.Position = 1;
+ w18.Expand = false;
+ w18.Fill = false;
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.DefaultWidth = 479;
+ this.DefaultHeight = 258;
+ this.Show ();
+ this.radioCustom.Toggled += new global::System.EventHandler (this.OnRadioCustomToggled);
+ this.combPolicies.Changed += new global::System.EventHandler (this.OnCombPoliciesChanged);
+ this.fileEntry.PathChanged += new global::System.EventHandler (this.OnFileEntryPathChanged);
+ this.buttonOk.Clicked += new global::System.EventHandler (this.OnButtonOkClicked);
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ConfirmProjectDeleteDialog.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ConfirmProjectDeleteDialog.cs
index 926885d0b1..4c8b441630 100644
--- a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ConfirmProjectDeleteDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ConfirmProjectDeleteDialog.cs
@@ -47,7 +47,6 @@ namespace MonoDevelop.Ide.Projects
this.radioDeleteAll = new global::Gtk.RadioButton (global::MonoDevelop.Core.GettextCatalog.GetString ("Delete the project file and the whole project directory:"));
this.radioDeleteAll.CanFocus = true;
this.radioDeleteAll.Name = "radioDeleteAll";
- this.radioDeleteAll.Active = true;
this.radioDeleteAll.DrawIndicator = true;
this.radioDeleteAll.UseUnderline = true;
this.radioDeleteAll.Group = new global::GLib.SList (global::System.IntPtr.Zero);
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ExportProjectPolicyDialog.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ExportProjectPolicyDialog.cs
new file mode 100644
index 0000000000..ccb789e734
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ExportProjectPolicyDialog.cs
@@ -0,0 +1,200 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace MonoDevelop.Ide.Projects
+{
+ internal partial class ExportProjectPolicyDialog
+ {
+ private global::Gtk.VBox vbox2;
+ private global::Gtk.RadioButton radioCustom;
+ private global::Gtk.Alignment boxCustom;
+ private global::Gtk.HBox hbox1;
+ private global::Gtk.Label label2;
+ private global::Gtk.Entry entryName;
+ private global::Gtk.RadioButton radioFile;
+ private global::Gtk.Alignment boxFile;
+ private global::Gtk.HBox hbox2;
+ private global::Gtk.Label label3;
+ private global::MonoDevelop.Components.FileEntry fileEntry;
+ private global::Gtk.HSeparator hseparator1;
+ private global::Gtk.Label labelChangesTitle;
+ private global::Gtk.Label labelPolicies;
+ private global::Gtk.Button buttonCancel;
+ private global::Gtk.Button buttonOk;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget MonoDevelop.Ide.Projects.ExportProjectPolicyDialog
+ this.Name = "MonoDevelop.Ide.Projects.ExportProjectPolicyDialog";
+ this.Title = global::MonoDevelop.Core.GettextCatalog.GetString ("Export Policies");
+ this.WindowPosition = ((global::Gtk.WindowPosition)(4));
+ // Internal child MonoDevelop.Ide.Projects.ExportProjectPolicyDialog.VBox
+ global::Gtk.VBox w1 = this.VBox;
+ w1.Name = "dialog1_VBox";
+ w1.BorderWidth = ((uint)(2));
+ // Container child dialog1_VBox.Gtk.Box+BoxChild
+ this.vbox2 = new global::Gtk.VBox ();
+ this.vbox2.Name = "vbox2";
+ this.vbox2.Spacing = 6;
+ this.vbox2.BorderWidth = ((uint)(12));
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.radioCustom = new global::Gtk.RadioButton (global::MonoDevelop.Core.GettextCatalog.GetString ("Save project policies as a new custom policy set"));
+ this.radioCustom.CanFocus = true;
+ this.radioCustom.Name = "radioCustom";
+ this.radioCustom.DrawIndicator = true;
+ this.radioCustom.UseUnderline = true;
+ this.radioCustom.Group = new global::GLib.SList (global::System.IntPtr.Zero);
+ this.vbox2.Add (this.radioCustom);
+ global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.radioCustom]));
+ w2.Position = 0;
+ w2.Expand = false;
+ w2.Fill = false;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.boxCustom = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
+ this.boxCustom.Name = "boxCustom";
+ this.boxCustom.LeftPadding = ((uint)(42));
+ // Container child boxCustom.Gtk.Container+ContainerChild
+ this.hbox1 = new global::Gtk.HBox ();
+ this.hbox1.Name = "hbox1";
+ this.hbox1.Spacing = 6;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.label2 = new global::Gtk.Label ();
+ this.label2.Name = "label2";
+ this.label2.LabelProp = global::MonoDevelop.Core.GettextCatalog.GetString ("Name:");
+ this.hbox1.Add (this.label2);
+ global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label2]));
+ w3.Position = 0;
+ w3.Expand = false;
+ w3.Fill = false;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.entryName = new global::Gtk.Entry ();
+ this.entryName.CanFocus = true;
+ this.entryName.Name = "entryName";
+ this.entryName.IsEditable = true;
+ this.entryName.WidthChars = 40;
+ this.entryName.InvisibleChar = '●';
+ this.hbox1.Add (this.entryName);
+ global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.entryName]));
+ w4.Position = 1;
+ w4.Expand = false;
+ w4.Fill = false;
+ this.boxCustom.Add (this.hbox1);
+ this.vbox2.Add (this.boxCustom);
+ global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.boxCustom]));
+ w6.Position = 1;
+ w6.Expand = false;
+ w6.Fill = false;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.radioFile = new global::Gtk.RadioButton (global::MonoDevelop.Core.GettextCatalog.GetString ("Export policies to a file"));
+ this.radioFile.CanFocus = true;
+ this.radioFile.Name = "radioFile";
+ this.radioFile.DrawIndicator = true;
+ this.radioFile.UseUnderline = true;
+ this.radioFile.Group = this.radioCustom.Group;
+ this.vbox2.Add (this.radioFile);
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.radioFile]));
+ w7.Position = 2;
+ w7.Expand = false;
+ w7.Fill = false;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.boxFile = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
+ this.boxFile.Name = "boxFile";
+ this.boxFile.LeftPadding = ((uint)(42));
+ // Container child boxFile.Gtk.Container+ContainerChild
+ this.hbox2 = new global::Gtk.HBox ();
+ this.hbox2.Name = "hbox2";
+ this.hbox2.Spacing = 6;
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.label3 = new global::Gtk.Label ();
+ this.label3.Name = "label3";
+ this.label3.LabelProp = global::MonoDevelop.Core.GettextCatalog.GetString ("File:");
+ this.hbox2.Add (this.label3);
+ global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.label3]));
+ w8.Position = 0;
+ w8.Expand = false;
+ w8.Fill = false;
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.fileEntry = new global::MonoDevelop.Components.FileEntry ();
+ this.fileEntry.Name = "fileEntry";
+ this.hbox2.Add (this.fileEntry);
+ global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.fileEntry]));
+ w9.Position = 1;
+ this.boxFile.Add (this.hbox2);
+ this.vbox2.Add (this.boxFile);
+ global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.boxFile]));
+ w11.Position = 3;
+ w11.Expand = false;
+ w11.Fill = false;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.hseparator1 = new global::Gtk.HSeparator ();
+ this.hseparator1.Name = "hseparator1";
+ this.vbox2.Add (this.hseparator1);
+ global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hseparator1]));
+ w12.Position = 4;
+ w12.Expand = false;
+ w12.Fill = false;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.labelChangesTitle = new global::Gtk.Label ();
+ this.labelChangesTitle.Name = "labelChangesTitle";
+ this.labelChangesTitle.Xalign = 0F;
+ this.labelChangesTitle.LabelProp = global::MonoDevelop.Core.GettextCatalog.GetString ("The following policies will be exported:");
+ this.vbox2.Add (this.labelChangesTitle);
+ global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.labelChangesTitle]));
+ w13.Position = 5;
+ w13.Expand = false;
+ w13.Fill = false;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.labelPolicies = new global::Gtk.Label ();
+ this.labelPolicies.Name = "labelPolicies";
+ this.labelPolicies.Xalign = 0F;
+ this.vbox2.Add (this.labelPolicies);
+ global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.labelPolicies]));
+ w14.Position = 6;
+ w14.Expand = false;
+ w14.Fill = false;
+ w1.Add (this.vbox2);
+ global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox2]));
+ w15.Position = 0;
+ w15.Expand = false;
+ w15.Fill = false;
+ // Internal child MonoDevelop.Ide.Projects.ExportProjectPolicyDialog.ActionArea
+ global::Gtk.HButtonBox w16 = this.ActionArea;
+ w16.Name = "dialog1_ActionArea";
+ w16.Spacing = 10;
+ w16.BorderWidth = ((uint)(5));
+ w16.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+ // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+ this.buttonCancel = new global::Gtk.Button ();
+ this.buttonCancel.CanDefault = true;
+ this.buttonCancel.CanFocus = true;
+ this.buttonCancel.Name = "buttonCancel";
+ this.buttonCancel.UseStock = true;
+ this.buttonCancel.UseUnderline = true;
+ this.buttonCancel.Label = "gtk-cancel";
+ this.AddActionWidget (this.buttonCancel, -6);
+ global::Gtk.ButtonBox.ButtonBoxChild w17 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w16 [this.buttonCancel]));
+ w17.Expand = false;
+ w17.Fill = false;
+ // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+ this.buttonOk = new global::Gtk.Button ();
+ this.buttonOk.CanDefault = true;
+ this.buttonOk.CanFocus = true;
+ this.buttonOk.Name = "buttonOk";
+ this.buttonOk.UseUnderline = true;
+ this.buttonOk.Label = global::MonoDevelop.Core.GettextCatalog.GetString ("Export");
+ w16.Add (this.buttonOk);
+ global::Gtk.ButtonBox.ButtonBoxChild w18 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w16 [this.buttonOk]));
+ w18.Position = 1;
+ w18.Expand = false;
+ w18.Fill = false;
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.DefaultWidth = 528;
+ this.DefaultHeight = 254;
+ this.Show ();
+ this.radioCustom.Toggled += new global::System.EventHandler (this.OnRadioCustomToggled);
+ this.buttonOk.Clicked += new global::System.EventHandler (this.OnButtonOkClicked);
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ImportProjectPolicyDialog.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ImportProjectPolicyDialog.cs
new file mode 100644
index 0000000000..f20c99a3bb
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ImportProjectPolicyDialog.cs
@@ -0,0 +1,114 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace MonoDevelop.Ide.Projects
+{
+ internal partial class ImportProjectPolicyDialog
+ {
+ private global::Gtk.VBox vbox5;
+ private global::Gtk.Label label7;
+ private global::Gtk.Entry entryName;
+ private global::Gtk.Label label8;
+ private global::MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget selector;
+ private global::Gtk.Button buttonCancel;
+ private global::Gtk.Button buttonOk;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget MonoDevelop.Ide.Projects.ImportProjectPolicyDialog
+ this.Name = "MonoDevelop.Ide.Projects.ImportProjectPolicyDialog";
+ this.WindowPosition = ((global::Gtk.WindowPosition)(4));
+ // Internal child MonoDevelop.Ide.Projects.ImportProjectPolicyDialog.VBox
+ global::Gtk.VBox w1 = this.VBox;
+ w1.Name = "dialog1_VBox";
+ w1.BorderWidth = ((uint)(2));
+ // Container child dialog1_VBox.Gtk.Box+BoxChild
+ this.vbox5 = new global::Gtk.VBox ();
+ this.vbox5.Name = "vbox5";
+ this.vbox5.Spacing = 6;
+ this.vbox5.BorderWidth = ((uint)(9));
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.label7 = new global::Gtk.Label ();
+ this.label7.Name = "label7";
+ this.label7.Xalign = 0F;
+ this.label7.LabelProp = global::MonoDevelop.Core.GettextCatalog.GetString ("Policy Name:");
+ this.vbox5.Add (this.label7);
+ global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.label7]));
+ w2.Position = 0;
+ w2.Expand = false;
+ w2.Fill = false;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.entryName = new global::Gtk.Entry ();
+ this.entryName.CanFocus = true;
+ this.entryName.Name = "entryName";
+ this.entryName.IsEditable = true;
+ this.entryName.InvisibleChar = '●';
+ this.vbox5.Add (this.entryName);
+ global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.entryName]));
+ w3.Position = 1;
+ w3.Expand = false;
+ w3.Fill = false;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.label8 = new global::Gtk.Label ();
+ this.label8.Name = "label8";
+ this.label8.Xalign = 0F;
+ this.label8.LabelProp = global::MonoDevelop.Core.GettextCatalog.GetString ("Select the project or solution from which to import the policies:");
+ this.vbox5.Add (this.label8);
+ global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.label8]));
+ w4.Position = 2;
+ w4.Expand = false;
+ w4.Fill = false;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.selector = new global::MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget ();
+ this.selector.Events = ((global::Gdk.EventMask)(256));
+ this.selector.Name = "selector";
+ this.selector.ShowCheckboxes = false;
+ this.selector.CascadeCheckboxSelection = false;
+ this.vbox5.Add (this.selector);
+ global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.selector]));
+ w5.Position = 3;
+ w1.Add (this.vbox5);
+ global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox5]));
+ w6.Position = 0;
+ // Internal child MonoDevelop.Ide.Projects.ImportProjectPolicyDialog.ActionArea
+ global::Gtk.HButtonBox w7 = this.ActionArea;
+ w7.Name = "dialog1_ActionArea";
+ w7.Spacing = 10;
+ w7.BorderWidth = ((uint)(5));
+ w7.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+ // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+ this.buttonCancel = new global::Gtk.Button ();
+ this.buttonCancel.CanDefault = true;
+ this.buttonCancel.CanFocus = true;
+ this.buttonCancel.Name = "buttonCancel";
+ this.buttonCancel.UseStock = true;
+ this.buttonCancel.UseUnderline = true;
+ this.buttonCancel.Label = "gtk-cancel";
+ this.AddActionWidget (this.buttonCancel, -6);
+ global::Gtk.ButtonBox.ButtonBoxChild w8 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w7 [this.buttonCancel]));
+ w8.Expand = false;
+ w8.Fill = false;
+ // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+ this.buttonOk = new global::Gtk.Button ();
+ this.buttonOk.CanDefault = true;
+ this.buttonOk.CanFocus = true;
+ this.buttonOk.Name = "buttonOk";
+ this.buttonOk.UseStock = true;
+ this.buttonOk.UseUnderline = true;
+ this.buttonOk.Label = "gtk-ok";
+ this.AddActionWidget (this.buttonOk, -5);
+ global::Gtk.ButtonBox.ButtonBoxChild w9 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w7 [this.buttonOk]));
+ w9.Position = 1;
+ w9.Expand = false;
+ w9.Fill = false;
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.DefaultWidth = 501;
+ this.DefaultHeight = 447;
+ this.Show ();
+ this.entryName.Changed += new global::System.EventHandler (this.OnEntryNameChanged);
+ this.selector.SelectionChanged += new global::System.EventHandler (this.OnSelectorSelectionChanged);
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ProjectSelectorDialog.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ProjectSelectorDialog.cs
new file mode 100644
index 0000000000..c78074982c
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ProjectSelectorDialog.cs
@@ -0,0 +1,91 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace MonoDevelop.Ide.Projects
+{
+ public partial class ProjectSelectorDialog
+ {
+ private global::Gtk.VBox vbox4;
+ private global::Gtk.Label labelTitle;
+ private global::MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget selector;
+ private global::Gtk.Button buttonCancel;
+ private global::Gtk.Button buttonOk;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget MonoDevelop.Ide.Projects.ProjectSelectorDialog
+ this.Name = "MonoDevelop.Ide.Projects.ProjectSelectorDialog";
+ this.WindowPosition = ((global::Gtk.WindowPosition)(4));
+ // Internal child MonoDevelop.Ide.Projects.ProjectSelectorDialog.VBox
+ global::Gtk.VBox w1 = this.VBox;
+ w1.Name = "dialog1_VBox";
+ w1.BorderWidth = ((uint)(2));
+ // Container child dialog1_VBox.Gtk.Box+BoxChild
+ this.vbox4 = new global::Gtk.VBox ();
+ this.vbox4.Name = "vbox4";
+ this.vbox4.Spacing = 6;
+ this.vbox4.BorderWidth = ((uint)(9));
+ // Container child vbox4.Gtk.Box+BoxChild
+ this.labelTitle = new global::Gtk.Label ();
+ this.labelTitle.Name = "labelTitle";
+ this.labelTitle.Xalign = 0F;
+ this.labelTitle.LabelProp = global::MonoDevelop.Core.GettextCatalog.GetString ("Select a project or solution:");
+ this.vbox4.Add (this.labelTitle);
+ global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.labelTitle]));
+ w2.Position = 0;
+ w2.Expand = false;
+ w2.Fill = false;
+ // Container child vbox4.Gtk.Box+BoxChild
+ this.selector = new global::MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget ();
+ this.selector.Events = ((global::Gdk.EventMask)(256));
+ this.selector.Name = "selector";
+ this.selector.ShowCheckboxes = false;
+ this.selector.CascadeCheckboxSelection = false;
+ this.vbox4.Add (this.selector);
+ global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.selector]));
+ w3.Position = 1;
+ w1.Add (this.vbox4);
+ global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox4]));
+ w4.Position = 0;
+ // Internal child MonoDevelop.Ide.Projects.ProjectSelectorDialog.ActionArea
+ global::Gtk.HButtonBox w5 = this.ActionArea;
+ w5.Name = "dialog1_ActionArea";
+ w5.Spacing = 10;
+ w5.BorderWidth = ((uint)(5));
+ w5.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+ // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+ this.buttonCancel = new global::Gtk.Button ();
+ this.buttonCancel.CanDefault = true;
+ this.buttonCancel.CanFocus = true;
+ this.buttonCancel.Name = "buttonCancel";
+ this.buttonCancel.UseStock = true;
+ this.buttonCancel.UseUnderline = true;
+ this.buttonCancel.Label = "gtk-cancel";
+ this.AddActionWidget (this.buttonCancel, -6);
+ global::Gtk.ButtonBox.ButtonBoxChild w6 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w5 [this.buttonCancel]));
+ w6.Expand = false;
+ w6.Fill = false;
+ // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+ this.buttonOk = new global::Gtk.Button ();
+ this.buttonOk.CanDefault = true;
+ this.buttonOk.CanFocus = true;
+ this.buttonOk.Name = "buttonOk";
+ this.buttonOk.UseStock = true;
+ this.buttonOk.UseUnderline = true;
+ this.buttonOk.Label = "gtk-ok";
+ this.AddActionWidget (this.buttonOk, -5);
+ global::Gtk.ButtonBox.ButtonBoxChild w7 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w5 [this.buttonOk]));
+ w7.Position = 1;
+ w7.Expand = false;
+ w7.Fill = false;
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.DefaultWidth = 492;
+ this.DefaultHeight = 466;
+ this.Show ();
+ this.selector.SelectionChanged += new global::System.EventHandler (this.OnSelectorSelectionChanged);
+ this.selector.ActiveChanged += new global::System.EventHandler (this.OnSelectorActiveChanged);
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic b/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic
index ed8bf2fe90..c5ce1eca09 100644
--- a/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic
@@ -5802,6 +5802,7 @@ Large</property>
</action-group>
<property name="MemberName" />
<property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
<child>
<widget class="Gtk.HBox" id="hbox1">
<property name="MemberName" />
@@ -6465,7 +6466,6 @@ All solutions</property>
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">Delete the project file and the whole project directory:</property>
- <property name="Active">True</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
@@ -11661,4 +11661,683 @@ please quit MonoDevelop before installing them.</property>
</widget>
</child>
</widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.ExportProjectPolicyDialog" design-size="528 254">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Export Policies</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioCustom">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Save project policies as a new custom policy set</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Toggled" handler="OnRadioCustomToggled" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="boxCustom">
+ <property name="MemberName" />
+ <property name="LeftPadding">42</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Name:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="WidthChars">40</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioFile">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Export policies to a file</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="boxFile">
+ <property name="MemberName" />
+ <property name="LeftPadding">42</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">File:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FileEntry" id="fileEntry">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelChangesTitle">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">The following policies will be exported:</property>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelPolicies">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ </widget>
+ <packing>
+ <property name="Position">6</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Export</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonOkClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.ApplyPolicyDialog" design-size="479 258">
+ <property name="MemberName" />
+ <property name="Title" translatable="yes">Apply Policies</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioCustom">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Apply stock or custom policy set</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Toggled" handler="OnRadioCustomToggled" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="boxCustom">
+ <property name="MemberName" />
+ <property name="LeftPadding">42</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Policy:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="combPolicies">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnCombPoliciesChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioFile">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Apply policies from file</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="boxFile">
+ <property name="MemberName" />
+ <property name="LeftPadding">42</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">File:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FileEntry" id="fileEntry">
+ <property name="MemberName" />
+ <property name="BrowserTitle">Select Policy Set File</property>
+ <signal name="PathChanged" handler="OnFileEntryPathChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelChangesTitle">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">The following policies will be set or replaced:</property>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelChanges">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ </widget>
+ <packing>
+ <property name="Position">6</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-apply</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonOkClicked" />
+ <property name="label">gtk-apply</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="tree">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.ProjectSelectorDialog" design-size="492 466">
+ <property name="MemberName" />
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.Label" id="labelTitle">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select a project or solution:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget" id="selector">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="ShowCheckboxes">False</property>
+ <property name="CascadeCheckboxSelection">False</property>
+ <signal name="SelectionChanged" handler="OnSelectorSelectionChanged" />
+ <signal name="ActiveChanged" handler="OnSelectorActiveChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.ImportProjectPolicyDialog" design-size="501 447">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Policy Name:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryNameChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the project or solution from which to import the policies:</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget" id="selector">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="ShowCheckboxes">False</property>
+ <property name="CascadeCheckboxSelection">False</property>
+ <signal name="SelectionChanged" handler="OnSelectorSelectionChanged" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
</stetic-interface> \ No newline at end of file