2
// AddExternalFileDialog.cs
5
// Lluis Sanchez Gual <lluis@novell.com>
7
// Copyright (c) 2011 Novell, Inc (http://www.novell.com)
9
// Permission is hereby granted, free of charge, to any person obtaining a copy
10
// of this software and associated documentation files (the "Software"), to deal
11
// in the Software without restriction, including without limitation the rights
12
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
// copies of the Software, and to permit persons to whom the Software is
14
// furnished to do so, subject to the following conditions:
16
// The above copyright notice and this permission notice shall be included in
17
// all copies or substantial portions of the Software.
19
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
using MonoDevelop.Core;
29
namespace MonoDevelop.Ide.Projects
31
internal partial class AddExternalFileDialog : Gtk.Dialog
33
public AddExternalFileDialog (string file)
37
radioCopy.Active = true;
38
labelTitle.Markup = GettextCatalog.GetString (labelTitle.Text, "<b>" + GLib.Markup.EscapeText (file) + "</b>");
42
public void ShowKeepOption (string dir)
45
string here = "." + System.IO.Path.DirectorySeparatorChar;
46
if (!dir.StartsWith (here))
48
labelKeep.Markup = GettextCatalog.GetString (labelKeep.LabelProp, dir);
49
radioKeep.Active = true;
52
public bool ShowApplyAll {
53
get { return checkApplyAll.Visible; }
54
set { checkApplyAll.Visible = value; }
57
public AddAction SelectedAction {
60
return AddAction.Copy;
61
else if (radioMove.Active)
62
return AddAction.Move;
63
else if (radioLink.Active)
64
return AddAction.Link;
66
return AddAction.Keep;
70
case AddAction.Copy: radioCopy.Active = true; break;
71
case AddAction.Move: radioMove.Active = true; break;
72
case AddAction.Link: radioLink.Active = true; break;
73
case AddAction.Keep: radioKeep.Active = true; break;
78
public bool ApplyToAll {
79
get { return checkApplyAll.Active; }
80
set { checkApplyAll.Active = value; }