[mono/monodevelop] [2 commits] 1cc997eb: [Core] Include external MonoDoc directory on Windows
"Michael Hutchinson (
[email protected])" <
[email protected]>
Thu, 7 Nov 2013 21:36:57 +0000
| Newsgroups |
gmane.comp.gnome.mono.patches |
| Message-ID |
<00000142347f2768-887a0f32-1777-4a21-aaaa-b2b0c221c8bb-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/monodevelop
Compare: https://github.com/mono/monodevelop/compare/b2994fb297e5...4ad78b6bb399
Commit: 1cc997ebd36624bcf21864e2deb73967cc795e81
Author: Michael Hutchinson <[email protected]> (mhutch)
Date: 2013-11-07 21:33:06 GMT
URL: https://github.com/mono/monodevelop/commit/1cc997ebd36624bcf21864e2deb73967cc795e81
[Core] Include external MonoDoc directory on Windows
BXC7813 - Does not show API documentation
Changed paths:
M main/src/core/MonoDevelop.Core/MonoDevelop.Projects/HelpService.cs
Modified: main/src/core/MonoDevelop.Core/MonoDevelop.Projects/HelpService.cs
===================================================================
@@ -78,6 +78,13 @@ static void InitializeHelpTree ()
foreach (var node in AddinManager.GetExtensionNodes ("/MonoDevelop/ProjectModel/MonoDocSources"))
sources.Add (((MonoDocSourceNode)node).Directory);
+
+ if (Platform.IsWindows) {
+ // windoc defines a special external directory used by XA. we need to read these docs too.
+ // Not sure why it wasn't defined in monodoc.dll
+ var commonAppData = Environment.GetFolderPath (Environment.SpecialFolder.CommonApplicationData);
+ sources.Add (Path.Combine (commonAppData, "Monodoc"));
+ }
//remove nonexistent sources
foreach (var s in sources.ToList ().Where (d => !Directory.Exists (d)))
Commit: 4ad78b6bb39976da41afc6d2784a148c160d6793
Author: Michael Hutchinson <[email protected]> (mhutch)
Date: 2013-11-07 21:33:39 GMT
URL: https://github.com/mono/monodevelop/commit/4ad78b6bb39976da41afc6d2784a148c160d6793
Merge branch 'master' of github.com:mono/monodevelop
Changed paths:
M main/external/xwt
M main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataPropertyInfo.cs
M main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataType.cs
M main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.csproj
M main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs
M main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValueTreeView.cs
M main/src/addins/MonoDevelop.Debugger/gtk-gui/MonoDevelop.Debugger.ExceptionCaughtWidget.cs
M main/src/addins/MonoDevelop.Debugger/gtk-gui/gui.stetic
M main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFile.cs
M version-checks
Added paths:
A main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/InfoFrame.cs
Modified: main/external/xwt
===================================================================
@@ -1 +1 @@
-Subproject commit dfc729dd856d1cceff7853a2648468d4f68d044e
+Subproject commit 4ba97a9b9735565e706c03c5755a648d997a52c6
Modified: main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataPropertyInfo.cs
===================================================================
@@ -83,6 +83,12 @@ internal MetadataPropertyInfo (IMetadataImport importer, int propertyToken, Meta
m_propAttributes = (PropertyAttributes) pdwPropFlags;
m_name = szProperty.ToString ();
MetadataHelperFunctions.GetCustomAttribute (importer, propertyToken, typeof (System.Diagnostics.DebuggerBrowsableAttribute));
+
+ if (!m_importer.IsValidToken ((uint)m_pmdGetter))
+ m_pmdGetter = 0;
+
+ if (!m_importer.IsValidToken ((uint)m_pmdSetter))
+ m_pmdSetter = 0;
}
public override PropertyAttributes Attributes
@@ -107,11 +113,15 @@ public override MethodInfo[] GetAccessors (bool nonPublic)
public override MethodInfo GetGetMethod (bool nonPublic)
{
- if (m_getter == null) {
- if (m_pmdGetter != 0)
- m_getter = new MetadataMethodInfo (m_importer, m_pmdGetter);
- }
- return m_getter;
+ if (m_pmdGetter == 0)
+ return null;
+
+ if (m_getter == null)
+ m_getter = new MetadataMethodInfo (m_importer, m_pmdGetter);
+
+ if (nonPublic || m_getter.IsPublic)
+ return m_getter;
+ return null;
}
public override ParameterInfo[] GetIndexParameters ( )
@@ -124,11 +134,15 @@ public override ParameterInfo[] GetIndexParameters ( )
public override MethodInfo GetSetMethod (bool nonPublic)
{
- if (m_setter == null) {
- if (m_pmdSetter != 0)
- m_setter = new MetadataMethodInfo (m_importer, m_pmdSetter);
- }
- return m_setter;
+ if (m_pmdSetter == 0)
+ return null;
+
+ if (m_setter == null)
+ m_setter = new MetadataMethodInfo (m_importer, m_pmdSetter);
+
+ if (nonPublic || m_setter.IsPublic)
+ return m_setter;
+ return null;
}
public override object GetValue (object obj, BindingFlags invokeAttr, Binder binder, object[] index, System.Globalization.CultureInfo culture)
Modified: main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataType.cs
===================================================================
@@ -423,9 +423,9 @@ public override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
break;
MetadataPropertyInfo prop = new MetadataPropertyInfo (m_importer, methodToken, this);
try {
- MethodInfo mi = prop.GetGetMethod ();
+ MethodInfo mi = prop.GetGetMethod () ?? prop.GetSetMethod ();
if (mi == null)
- mi = prop.GetSetMethod ();
+ continue;
if (FlagsMatch (mi.IsPublic, mi.IsStatic, bindingAttr))
al.Add (prop);
}
Modified: main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.csproj
===================================================================
@@ -22,8 +22,8 @@
<Execution>
<Execution clr-version="Net_2_0" />
</Execution>
- <GenerateDocumentation>true</GenerateDocumentation>
<NoWarn>1591;1573</NoWarn>
+ <DocumentationFile>..\..\..\build\AddIns\MonoDevelop.Debugger\MonoDevelop.Debugger.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -36,8 +36,8 @@
<Execution clr-version="Net_2_0" />
</Execution>
<DebugSymbols>true</DebugSymbols>
- <GenerateDocumentation>true</GenerateDocumentation>
<NoWarn>1591;1573</NoWarn>
+ <DocumentationFile>..\..\..\build\AddIns\MonoDevelop.Debugger\MonoDevelop.Debugger.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@@ -149,6 +149,7 @@
<Compile Include="MonoDevelop.Debugger\DebuggerConsoleView.cs" />
<Compile Include="MonoDevelop.Debugger.Visualizer\CStringVisualizer.cs" />
<Compile Include="MonoDevelop.Debugger.Visualizer\ValueVisualizer.cs" />
+ <Compile Include="MonoDevelop.Debugger\InfoFrame.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MonoDevelop.Debugger.addin.xml">
Modified: main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs
===================================================================
@@ -38,29 +38,34 @@ namespace MonoDevelop.Debugger
{
public partial class ExceptionCaughtWidget : Gtk.Bin
{
- Gtk.TreeStore stackStore;
- ExceptionInfo exception;
+ readonly Gtk.TreeStore stackStore;
+ readonly ExceptionInfo exception;
bool destroyed;
public ExceptionCaughtWidget (ExceptionInfo exception)
{
this.Build ();
+ vboxExceptionInfo.Remove (labelMessage);
+ var frame = new InfoFrame (labelMessage);
+ frame.Show ();
+ vboxExceptionInfo.PackStart (frame, false, true, 0);
+
stackStore = new TreeStore (typeof(string), typeof(string), typeof(int), typeof(int));
treeStack.Model = stackStore;
var crt = new CellRendererText ();
+ crt.Ellipsize = Pango.EllipsizeMode.End;
+ crt.WrapWidth = -1;
treeStack.AppendColumn ("", crt, "markup", 0);
treeStack.ShowExpanders = false;
+ treeStack.RulesHint = true;
valueView.AllowExpanding = true;
valueView.Frame = DebuggingService.CurrentFrame;
this.exception = exception;
exception.Changed += HandleExceptionChanged;
- treeStack.SizeAllocated += delegate(object o, SizeAllocatedArgs args) {
- if (crt.WrapWidth != args.Allocation.Width)
- crt.WrapWidth = args.Allocation.Width;
- };
+ treeStack.SizeAllocated += (object o, SizeAllocatedArgs args) => crt.WrapWidth = args.Allocation.Width;
Fill ();
treeStack.RowActivated += HandleRowActivated;
@@ -68,11 +73,13 @@ public ExceptionCaughtWidget (ExceptionInfo exception)
void HandleRowActivated (object o, RowActivatedArgs args)
{
- Gtk.TreeIter it;
- if (!stackStore.GetIter (out it, args.Path))
+ TreeIter iter;
+
+ if (!stackStore.GetIter (out iter, args.Path))
return;
- string file = (string) stackStore.GetValue (it, 1);
- int line = (int) stackStore.GetValue (it, 2);
+
+ string file = (string) stackStore.GetValue (iter, 1);
+ int line = (int) stackStore.GetValue (iter, 2);
if (!string.IsNullOrEmpty (file))
IdeApp.Workbench.OpenDocument (file, line, 0);
}
@@ -103,6 +110,7 @@ void Fill ()
valueView.AddValue (exception.Instance);
valueView.ExpandRow (new TreePath ("0"), false);
}
+
if (exception.StackIsEvaluating) {
stackStore.AppendValues (GettextCatalog.GetString ("Loading..."), "", 0, 0);
}
@@ -110,11 +118,12 @@ void Fill ()
void ShowStackTrace (ExceptionInfo exc, bool showExceptionNode)
{
- TreeIter it = TreeIter.Zero;
+ TreeIter iter = TreeIter.Zero;
+
if (showExceptionNode) {
treeStack.ShowExpanders = true;
string tn = exc.Type + ": " + exc.Message;
- it = stackStore.AppendValues (tn, null, 0, 0);
+ iter = stackStore.AppendValues (tn, null, 0, 0);
}
foreach (ExceptionStackFrame frame in exc.StackTrace) {
@@ -129,8 +138,8 @@ void ShowStackTrace (ExceptionInfo exc, bool showExceptionNode)
text += "</small>";
}
- if (!it.Equals (TreeIter.Zero))
- stackStore.AppendValues (it, text, frame.File, frame.Line, frame.Column);
+ if (!iter.Equals (TreeIter.Zero))
+ stackStore.AppendValues (iter, text, frame.File, frame.Line, frame.Column);
else
stackStore.AppendValues (text, frame.File, frame.Line, frame.Column);
}
@@ -150,9 +159,9 @@ protected override void OnDestroyed ()
class ExceptionCaughtDialog: Gtk.Dialog
{
- ExceptionCaughtWidget widget;
- ExceptionInfo ex;
- ExceptionCaughtMessage msg;
+ readonly ExceptionCaughtWidget widget;
+ readonly ExceptionCaughtMessage msg;
+ readonly ExceptionInfo ex;
public ExceptionCaughtDialog (ExceptionInfo val, ExceptionCaughtMessage msg)
{
@@ -206,10 +215,10 @@ void HandleCopyClicked (object sender, EventArgs e)
class ExceptionCaughtMessage : IDisposable
{
- ExceptionInfo ex;
+ ExceptionCaughtMiniButton miniButton;
ExceptionCaughtDialog dialog;
ExceptionCaughtButton button;
- ExceptionCaughtMiniButton miniButton;
+ readonly ExceptionInfo ex;
public ExceptionCaughtMessage (ExceptionInfo val, FilePath file, int line, int col)
{
@@ -299,11 +308,11 @@ public void Close ()
class ExceptionCaughtButton: TopLevelWidgetExtension
{
- ExceptionCaughtMessage dlg;
- ExceptionInfo exception;
+ readonly Gdk.Pixbuf closeSelOverImage;
+ readonly Gdk.Pixbuf closeSelImage;
+ readonly ExceptionCaughtMessage dlg;
+ readonly ExceptionInfo exception;
Gtk.Label messageLabel;
- Gdk.Pixbuf closeSelImage;
- Gdk.Pixbuf closeSelOverImage;
public ExceptionCaughtButton (ExceptionInfo val, ExceptionCaughtMessage dlg, FilePath file, int line)
{
@@ -393,7 +402,7 @@ void LoadData ()
class ExceptionCaughtMiniButton: TopLevelWidgetExtension
{
- ExceptionCaughtMessage dlg;
+ readonly ExceptionCaughtMessage dlg;
public ExceptionCaughtMiniButton (ExceptionCaughtMessage dlg, FilePath file, int line)
{
Added: main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/InfoFrame.cs
===================================================================
@@ -0,0 +1,57 @@
+//
+// InfoFrame.cs
+//
+// Author:
+// Jeffrey Stedfast <[email protected]>
+//
+// Copyright (c) 2013 Xamarin 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 Gtk;
+
+namespace MonoDevelop.Debugger
+{
+ [System.ComponentModel.ToolboxItem (true)]
+ class InfoFrame : Gtk.Frame
+ {
+ public InfoFrame ()
+ {
+ Shadow = ShadowType.EtchedIn;
+ }
+
+ public InfoFrame (Widget child) : this ()
+ {
+ Child = child;
+ }
+
+ protected override bool OnExposeEvent (Gdk.EventExpose evnt)
+ {
+ using (Cairo.Context cr = Gdk.CairoHelper.Create (GdkWindow)) {
+ cr.Rectangle (Allocation.X, Allocation.Y, Allocation.Width, Allocation.Height);
+ cr.SetSourceRGB (1.0, 0.98, 0.91);
+ cr.Fill ();
+ }
+
+ return base.OnExposeEvent (evnt);
+ }
+ }
+}
Modified: main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValueTreeView.cs
===================================================================
@@ -45,23 +45,25 @@
namespace MonoDevelop.Debugger
{
[System.ComponentModel.ToolboxItem (true)]
- public class ObjectValueTreeView: Gtk.TreeView, ICompletionWidget
+ public class ObjectValueTreeView : TreeView, ICompletionWidget
{
- List<string> valueNames = new List<string> ();
- Dictionary<string,string> oldValues = new Dictionary<string,string> ();
- List<ObjectValue> values = new List<ObjectValue> ();
- Dictionary<ObjectValue,TreeRowReference> nodes = new Dictionary<ObjectValue, TreeRowReference> ();
- Dictionary<string,ObjectValue> cachedValues = new Dictionary<string,ObjectValue> ();
- Dictionary<ObjectValue, Task> expandTasks = new Dictionary<ObjectValue, Task> ();
- TreeStore store;
- TreeViewState state;
- string createMsg;
+ readonly Dictionary<ObjectValue, TreeRowReference> nodes = new Dictionary<ObjectValue, TreeRowReference> ();
+ readonly Dictionary<string, ObjectValue> cachedValues = new Dictionary<string, ObjectValue> ();
+ readonly Dictionary<ObjectValue, Task> expandTasks = new Dictionary<ObjectValue, Task> ();
+ readonly Dictionary<string, string> oldValues = new Dictionary<string, string> ();
+ readonly List<ObjectValue> values = new List<ObjectValue> ();
+ readonly List<string> valueNames = new List<string> ();
+
+ readonly Gdk.Pixbuf noLiveIcon;
+ readonly Gdk.Pixbuf liveIcon;
+
+ readonly TreeViewState state;
+ readonly TreeStore store;
+ readonly string createMsg;
bool restoringState = false;
bool compact;
StackFrame frame;
bool disposed;
- Gdk.Pixbuf noLiveIcon;
- Gdk.Pixbuf liveIcon;
bool columnsAdjusted;
bool columnSizesUpdating;
@@ -70,26 +72,26 @@ public class ObjectValueTreeView: Gtk.TreeView, ICompletionWidget
double valueColWidth;
double typeColWidth;
- CellRendererText crtExp;
- CellRendererText crtValue;
- CellRendererText crtType;
- CellRendererIcon crpButton;
- CellRendererIcon crpPin;
- CellRendererIcon crpLiveUpdate;
- CellRendererIcon crpViewer;
- Gtk.Entry editEntry;
+ readonly CellRendererText crtExp;
+ readonly CellRendererText crtValue;
+ readonly CellRendererText crtType;
+ readonly CellRendererIcon crpButton;
+ readonly CellRendererIcon crpPin;
+ readonly CellRendererIcon crpLiveUpdate;
+ readonly CellRendererIcon crpViewer;
+ Entry editEntry;
Mono.Debugging.Client.CompletionData currentCompletionData;
- TreeViewColumn expCol;
- TreeViewColumn valueCol;
- TreeViewColumn typeCol;
- TreeViewColumn pinCol;
+ readonly TreeViewColumn expCol;
+ readonly TreeViewColumn valueCol;
+ readonly TreeViewColumn typeCol;
+ readonly TreeViewColumn pinCol;
- string errorColor = "red";
- string modifiedColor = "blue";
- string disabledColor = "gray";
+ const string errorColor = "red";
+ const string modifiedColor = "blue";
+ const string disabledColor = "gray";
- static CommandEntrySet menuSet;
+ static readonly CommandEntrySet menuSet;
const int NameCol = 0;
const int ValueCol = 1;
@@ -138,7 +140,7 @@ public ObjectValueTreeView ()
Pango.FontDescription newFont = this.Style.FontDescription.Copy ();
newFont.Size = (newFont.Size * 8) / 10;
- liveIcon = ImageService.GetPixbuf (Gtk.Stock.Execute, IconSize.Menu);
+ liveIcon = ImageService.GetPixbuf (Stock.Execute, IconSize.Menu);
noLiveIcon = ImageService.MakeTransparent (liveIcon, 0.5);
expCol = new TreeViewColumn ();
@@ -161,12 +163,12 @@ public ObjectValueTreeView ()
valueCol = new TreeViewColumn ();
valueCol.Title = GettextCatalog.GetString ("Value");
crpViewer = new CellRendererIcon ();
- crpViewer.IconId = Gtk.Stock.ZoomIn;
+ crpViewer.IconId = Stock.ZoomIn;
valueCol.PackStart (crpViewer, false);
valueCol.AddAttribute (crpViewer, "visible", ViewerButtonVisibleCol);
crpButton = new CellRendererIcon ();
- crpButton.StockSize = (uint)Gtk.IconSize.Menu;
- crpButton.IconId = Gtk.Stock.Refresh;
+ crpButton.StockSize = (uint) IconSize.Menu;
+ crpButton.IconId = Stock.Refresh;
valueCol.PackStart (crpButton, false);
valueCol.AddAttribute (crpButton, "visible", ValueButtonVisibleCol);
crtValue = new CellRendererText ();
@@ -397,16 +399,16 @@ public void LoadState ()
compact = value;
Pango.FontDescription newFont;
if (compact) {
- newFont = this.Style.FontDescription.Copy ();
+ newFont = Style.FontDescription.Copy ();
newFont.Size = (newFont.Size * 8) / 10;
expCol.Sizing = TreeViewColumnSizing.Autosize;
valueCol.Sizing = TreeViewColumnSizing.Autosize;
valueCol.MaxWidth = 800;
- crpButton.Pixbuf = ImageService.GetPixbuf (Gtk.Stock.Refresh).ScaleSimple (12, 12, Gdk.InterpType.Hyper);
- crpViewer.Pixbuf = ImageService.GetPixbuf (Gtk.Stock.ZoomIn).ScaleSimple (12, 12, Gdk.InterpType.Hyper);
+ crpButton.Pixbuf = ImageService.GetPixbuf (Stock.Refresh).ScaleSimple (12, 12, Gdk.InterpType.Hyper);
+ crpViewer.Pixbuf = ImageService.GetPixbuf (Stock.ZoomIn).ScaleSimple (12, 12, Gdk.InterpType.Hyper);
ColumnsAutosize ();
} else {
- newFont = this.Style.FontDescription;
+ newFont = Style.FontDescription;
expCol.Sizing = TreeViewColumnSizing.Fixed;
valueCol.Sizing = TreeViewColumnSizing.Fixed;
valueCol.MaxWidth = int.MaxValue;
@@ -719,7 +721,7 @@ void SetValues (TreeIter parent, TreeIter it, string name, ObjectValue val)
strval = val.Value;
valueColor = disabledColor;
if (val.CanRefresh)
- valueButton = Gtk.Stock.Refresh;
+ valueButton = Stock.Refresh;
canEdit = false;
}
else if (val.IsEvaluating) {
@@ -905,19 +907,19 @@ string GetIterPath (TreeIter iter)
return sb.ToString ();
}
- void OnExpEditing (object s, Gtk.EditingStartedArgs args)
+ void OnExpEditing (object s, EditingStartedArgs args)
{
TreeIter it;
if (!store.GetIterFromString (out it, args.Path))
return;
- Gtk.Entry e = (Gtk.Entry) args.Editable;
+ Entry e = (Entry) args.Editable;
if (e.Text == createMsg)
e.Text = string.Empty;
OnStartEditing (args);
}
- void OnExpEdited (object s, Gtk.EditedArgs args)
+ void OnExpEdited (object s, EditedArgs args)
{
OnEndEditing ();
@@ -950,13 +952,13 @@ void OnExpEdited (object s, Gtk.EditedArgs args)
bool editing;
- void OnValueEditing (object s, Gtk.EditingStartedArgs args)
+ void OnValueEditing (object s, EditingStartedArgs args)
{
TreeIter it;
if (!store.GetIterFromString (out it, args.Path))
return;
- var entry = (Gtk.Entry) args.Editable;
+ var entry = (Entry) args.Editable;
ObjectValue val = store.GetValue (it, ObjectCol) as ObjectValue;
string strVal = val != null ? val.Value : null;
@@ -967,14 +969,16 @@ void OnValueEditing (object s, Gtk.EditingStartedArgs args)
OnStartEditing (args);
}
- void OnValueEdited (object s, Gtk.EditedArgs args)
+ void OnValueEdited (object s, EditedArgs args)
{
OnEndEditing ();
TreeIter it;
if (!store.GetIterFromString (out it, args.Path))
return;
- ObjectValue val = store.GetValue (it, ObjectCol) as ObjectValue;
+
+ ObjectValue val = (ObjectValue) store.GetValue (it, ObjectCol);
+
try {
string newVal = args.NewText;
/* if (newVal == null) {
@@ -986,6 +990,7 @@ void OnValueEdited (object s, Gtk.EditedArgs args)
} catch (Exception ex) {
LoggingService.LogError ("Could not set value for object '" + val.Name + "'", ex);
}
+
store.SetValue (it, ValueCol, val.DisplayValue);
// Update the color
@@ -1008,10 +1013,10 @@ void OnEditingCancelled (object s, EventArgs args)
OnEndEditing ();
}
- void OnStartEditing (Gtk.EditingStartedArgs args)
+ void OnStartEditing (EditingStartedArgs args)
{
editing = true;
- editEntry = (Gtk.Entry) args.Editable;
+ editEntry = (Entry) args.Editable;
editEntry.KeyPressEvent += OnEditKeyPress;
editEntry.KeyReleaseEvent += OnEditKeyRelease;
if (StartEditing != null)
@@ -1048,7 +1053,7 @@ void OnEditKeyRelease (object sender, EventArgs e)
uint keyValue;
[GLib.ConnectBeforeAttribute]
- void OnEditKeyPress (object s, Gtk.KeyPressEventArgs args)
+ void OnEditKeyPress (object s, KeyPressEventArgs args)
{
wasHandled = false;
key = args.Event.Key;
@@ -1069,7 +1074,7 @@ static bool IsCompletionChar (char c)
void PopupCompletion (Entry entry)
{
- Gtk.Application.Invoke (delegate {
+ Application.Invoke (delegate {
char c = (char)Gdk.Keyval.ToUnicode (keyValue);
if (currentCompletionData == null && IsCompletionChar (c)) {
string exp = entry.Text.Substring (0, entry.CursorPosition);
@@ -1297,10 +1302,10 @@ protected void OnCopy ()
return;
if (selected.Length == 1) {
- object focus = IdeApp.Workbench.RootWindow.Focus;
+ var editable = IdeApp.Workbench.RootWindow.Focus as Editable;
- if (focus is Gtk.Editable) {
- ((Gtk.Editable) focus).CopyClipboard ();
+ if (editable != null) {
+ editable.CopyClipboard ();
return;
}
}
@@ -1524,7 +1529,8 @@ public void RemovePinnedWatch (TreeIter it)
protected virtual void OnCompletionContextChanged (EventArgs e)
{
- EventHandler handler = this.CompletionContextChanged;
+ var handler = CompletionContextChanged;
+
if (handler != null)
handler (this, e);
}
@@ -1559,9 +1565,9 @@ char ICompletionWidget.GetChar (int offset)
{
string txt = editEntry.Text;
if (offset >= txt.Length)
- return (char)0;
- else
- return txt [offset];
+ return '\0';
+
+ return txt [offset];
}
CodeCompletionContext ICompletionWidget.CreateCodeCompletionContext (int triggerOffset)
@@ -1711,12 +1717,14 @@ public DebugCompletionDataList (Mono.Debugging.Client.CompletionData data)
get;
set;
}
- static List<ICompletionKeyHandler> keyHandler = new List<ICompletionKeyHandler> ();
+
+ static readonly List<ICompletionKeyHandler> keyHandler = new List<ICompletionKeyHandler> ();
public IEnumerable<ICompletionKeyHandler> KeyHandler { get { return keyHandler;} }
public void OnCompletionListClosed (EventArgs e)
{
- EventHandler handler = this.CompletionListClosed;
+ var handler = CompletionListClosed;
+
if (handler != null)
handler (this, e);
}
@@ -1726,7 +1734,7 @@ public void OnCompletionListClosed (EventArgs e)
class DebugCompletionData : MonoDevelop.Ide.CodeCompletion.CompletionData
{
- CompletionItem item;
+ readonly CompletionItem item;
public DebugCompletionData (CompletionItem item)
{
Modified: main/src/addins/MonoDevelop.Debugger/gtk-gui/MonoDevelop.Debugger.ExceptionCaughtWidget.cs
===================================================================
@@ -73,8 +73,6 @@ protected virtual void Build ()
this.hbox2.Add (this.vboxExceptionInfo);
global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.vboxExceptionInfo]));
w4.Position = 1;
- w4.Expand = false;
- w4.Fill = false;
this.vbox2.Add (this.hbox2);
global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox2]));
w5.Position = 0;
Modified: main/src/addins/MonoDevelop.Debugger/gtk-gui/gui.stetic
===================================================================
@@ -1820,9 +1820,7 @@ Break when the hit count is a multiple of</property>
</widget>
<packing>
<property name="Position">1</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
+ <property name="AutoSize">False</property>
</packing>
</child>
</widget>
Modified: main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFile.cs
===================================================================
@@ -397,12 +397,12 @@ internal bool ResolveParent ()
}
#endregion
+ // FIXME: rename this to LogicalName for a better mapping to the MSBuild property
public string ResourceId {
get {
- if (BuildAction != MonoDevelop.Projects.BuildAction.EmbeddedResource)
- return string.Empty;
- if (string.IsNullOrEmpty (resourceId) && project is DotNetProject)
+ if (BuildAction == MonoDevelop.Projects.BuildAction.EmbeddedResource && string.IsNullOrEmpty (resourceId) && project is DotNetProject)
return ((DotNetProject)project).ResourceHandler.GetDefaultResourceId (this);
+
return resourceId;
}
set {
Modified: version-checks
===================================================================
@@ -17,7 +17,7 @@ DEP[0]=md-addins
DEP_NAME[0]=MDADDINS
DEP_PATH[0]=${top_srcdir}/../md-addins
DEP_MODULE[0][email protected]:xamarin/md-addins.git
-DEP_NEEDED_VERSION[0]=a7ce288830ba36dcb13147d908f214500665b5c0
+DEP_NEEDED_VERSION[0]=3d230f0a822fb49b50a280d108878bd91335b338
DEP_BRANCH_AND_REMOTE[0]="master origin/master"
# heap-shot
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches