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:
authorMichael Hutchinson <mhutchinson@novell.com>2010-11-06 00:18:28 +0300
committerMichael Hutchinson <mhutchinson@novell.com>2010-11-06 00:18:28 +0300
commitfe64796d9493f8c2cb781162e5cc8e13d9f0fa0c (patch)
treeada6a108ec498508a51519220ae9f075554eb0b2
parent8f0424c57fa81e8d71fa1927fb0a1ec0e7604893 (diff)
Fix GTK warnings
-rw-r--r--extras/MonoDevelop.IPhone/MonoDevelop.IPhone/IPhoneProjectStringTagProvider.cs62
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs6
2 files changed, 65 insertions, 3 deletions
diff --git a/extras/MonoDevelop.IPhone/MonoDevelop.IPhone/IPhoneProjectStringTagProvider.cs b/extras/MonoDevelop.IPhone/MonoDevelop.IPhone/IPhoneProjectStringTagProvider.cs
new file mode 100644
index 0000000000..b8ee62df41
--- /dev/null
+++ b/extras/MonoDevelop.IPhone/MonoDevelop.IPhone/IPhoneProjectStringTagProvider.cs
@@ -0,0 +1,62 @@
+//
+// IPhoneProject.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (c) 2010 Novell, Inc.
+//
+// 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.Xml;
+using MonoDevelop.Core;
+using MonoDevelop.Core.Serialization;
+using MonoDevelop.Projects;
+using System.IO;
+using System.Collections.Generic;
+using MonoDevelop.Core.ProgressMonitoring;
+using MonoDevelop.Core.Execution;
+using MonoDevelop.Ide;
+using System.Reflection;
+using MonoDevelop.MacDev.Plist;
+using System.Text;
+namespace MonoDevelop.IPhone
+{
+ [Mono.Addins.Extension]
+ class IPhoneProjectStringTagProvider : MonoDevelop.Core.StringParsing.StringTagProvider<IPhoneProject>
+ {
+ public override IEnumerable<MonoDevelop.Core.StringParsing.StringTagDescription> GetTags ()
+ {
+ yield return new MonoDevelop.Core.StringParsing.StringTagDescription ("BundleIdentifier", GettextCatalog.GetString ("iPhone Bundle Identifier"));
+ yield return new MonoDevelop.Core.StringParsing.StringTagDescription ("BundleVersion", GettextCatalog.GetString ("iPhone Bundle Version"));
+ }
+
+ public override object GetTagValue (IPhoneProject instance, string tag)
+ {
+ switch (tag) {
+ case "BUNDLEIDENTIFIER":
+ return instance.BundleIdentifier;
+ case "BUNDLEVERSION":
+ return instance.BundleVersion;
+ }
+ throw new NotSupportedException ();
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs
index 84114bf4c6..d760cd356d 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs
@@ -88,12 +88,12 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
Array array = Enum.GetValues (typeof (CustomCommandType));
comboType.Active = Array.IndexOf (array, cmd.Type);
labelName.Visible = entryName.Visible = (cmd.Type == CustomCommandType.Custom);
- entryName.Text = cmd.Name;
- entryCommand.Text = cmd.Command;
+ entryName.Text = cmd.Name ?? "";
+ entryCommand.Text = cmd.Command ?? "";
checkExternalCons.Active = cmd.ExternalConsole;
checkPauseCons.Active = cmd.PauseExternalConsole;
checkPauseCons.Sensitive = cmd.ExternalConsole;
- workingdirEntry.Text = cmd.WorkingDir;
+ workingdirEntry.Text = cmd.WorkingDir ?? "";
}
updating = false;
}