diff options
author | Marius Ungureanu <teromario@yahoo.com> | 2017-06-25 14:30:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-25 14:30:35 +0300 |
commit | 9e327cc667fec776b44231ab5bb2fa1a8e5ac34b (patch) | |
tree | fc80bbbdacf8604850b79b34b861235d8aa51761 | |
parent | d6e5ec6dc6bea3595919bb15b90a6948e5bf5d5f (diff) |
[Gtk#] Update to match newest API (#2682)
The Invoke API now can take both an Action and an EventHandler. delegate {} causes ambiguous results.
77 files changed, 130 insertions, 130 deletions
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/RoslynCodeCompletionFactory.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/RoslynCodeCompletionFactory.cs index 536f59fa8f..4cd34d87c6 100644 --- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/RoslynCodeCompletionFactory.cs +++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/RoslynCodeCompletionFactory.cs @@ -144,7 +144,7 @@ namespace MonoDevelop.CSharp.Completion } if (runCompletionCompletionCommand && IdeApp.Workbench != null) { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { ext.RunCompletionCommand (); }); } diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs index f79283ab0c..acf5920841 100644 --- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs +++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs @@ -91,7 +91,7 @@ namespace MonoDevelop.CSharp.Highlighting var doNotify = !AreEqual (highlightTree, newTree, token); if (!token.IsCancellationRequested) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { if (token.IsCancellationRequested) return; if (highlightTree != null) { diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CodeGenerationService.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CodeGenerationService.cs index 70577eba0e..667764b0de 100644 --- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CodeGenerationService.cs +++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CodeGenerationService.cs @@ -171,7 +171,7 @@ namespace MonoDevelop.Refactoring var node = root.GetAnnotatedNodes (insertedMemberAnnotation).Single (); - Application.Invoke (async delegate { + Application.Invoke (async (o, args) => { var insertionPoints = InsertionPointService.GetInsertionPoints ( doc.Editor, await doc.UpdateParseDocument (), diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp/PathedDocumentTextEditorExtension.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp/PathedDocumentTextEditorExtension.cs index 88047088ee..3fd986f72c 100644 --- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp/PathedDocumentTextEditorExtension.cs +++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp/PathedDocumentTextEditorExtension.cs @@ -132,7 +132,7 @@ namespace MonoDevelop.CSharp isPathSet = false; // Delay the execution of UpdateOwnerProjects since it may end calling DocumentContext.AttachToProject, // which shouldn't be called while the extension chain is being initialized. - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { UpdateOwnerProjects (); Editor_CaretPositionChanged (null, null); }); @@ -773,7 +773,7 @@ namespace MonoDevelop.CSharp var regionEntry = await GetRegionEntry (DocumentContext.ParsedDocument, loc).ConfigureAwait (false); - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { var result = new List<PathEntry>(); if (curProject != null) { diff --git a/main/src/addins/MacPlatform/MacPlatform.cs b/main/src/addins/MacPlatform/MacPlatform.cs index 6076894ef0..3f8f857cb7 100644 --- a/main/src/addins/MacPlatform/MacPlatform.cs +++ b/main/src/addins/MacPlatform/MacPlatform.cs @@ -198,14 +198,14 @@ namespace MonoDevelop.MacIntegration internal static void OpenUrl (string url) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { NSWorkspace.SharedWorkspace.OpenUrl (new NSUrl (url)); }); } public override void OpenFile (string filename) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { NSWorkspace.SharedWorkspace.OpenFile (filename); }); } diff --git a/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs b/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs index ce5a514e80..9279c91e33 100644 --- a/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs +++ b/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs @@ -1264,7 +1264,7 @@ namespace MonoDevelop.AssemblyBrowser internal void Open (string url, AssemblyLoader currentAssembly = null, bool expandNode = true) { Task.WhenAll (this.definitions.Select (d => d.LoadingTask).ToArray ()).ContinueWith (d => { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { suspendNavigation = false; ITreeNavigator nav = SearchMember (url, expandNode); if (definitions == null) // we've been disposed @@ -1310,7 +1310,7 @@ namespace MonoDevelop.AssemblyBrowser result.LoadingTask.ContinueWith (t2 => { if (definitions == null) // disposed return; - Application.Invoke (delegate { + Application.Invoke ((o, args) => { var nav = SearchMember (url, expandNode); if (nav == null) { if (++i == references.Count) @@ -1361,7 +1361,7 @@ namespace MonoDevelop.AssemblyBrowser } if (definitions == null) // disposed return; - Application.Invoke (delegate { + Application.Invoke ((o, args) => { var nav = SearchMember (url); if (nav == null) { LoggingService.LogError ("Assembly browser: Can't find: " + url + "."); @@ -1373,7 +1373,7 @@ namespace MonoDevelop.AssemblyBrowser internal void SelectAssembly (AssemblyLoader loader) { AssemblyDefinition cu = loader.CecilLoader.GetCecilObject (loader.UnresolvedAssembly); - Application.Invoke (delegate { + Application.Invoke ((o, args) => { ITreeNavigator nav = TreeView.GetRootNode (); if (nav == null) return; @@ -1517,7 +1517,7 @@ namespace MonoDevelop.AssemblyBrowser definitions.Add (result); result.LoadingTask = result.LoadingTask.ContinueWith (task => { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { if (definitions == null) return; try { @@ -1603,7 +1603,7 @@ namespace MonoDevelop.AssemblyBrowser foreach (var def in definitions) { if (!this.definitions.Contains (def)) { this.definitions.Add (def); - Application.Invoke (delegate { + Application.Invoke ((o, args) => { if (definitions.Count + projects.Count == 1) { TreeView.LoadTree (def.LoadingTask.Result); } else { diff --git a/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/CustomSoftDebuggerEngine.cs b/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/CustomSoftDebuggerEngine.cs index 65ad712d29..bafd6278f6 100644 --- a/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/CustomSoftDebuggerEngine.cs +++ b/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/CustomSoftDebuggerEngine.cs @@ -86,7 +86,7 @@ namespace MonoDevelop.Debugger.Soft var ev = new System.Threading.ManualResetEvent (false); T val = default (T); Exception caught = null; - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { try { val = func (); } catch (Exception ex) { diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs index 06d90acfc4..27e6da652c 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs @@ -700,7 +700,7 @@ namespace MonoDevelop.Debugger static bool ExceptionHandler (Exception ex) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { if (ex is DebuggerException) MessageService.ShowError (ex.Message, ex); else @@ -1288,14 +1288,14 @@ namespace MonoDevelop.Debugger public void SetMessage (DebuggerStartInfo dsi, string message, bool listening, int attemptNumber) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { IdeApp.Workbench.StatusBar.ShowMessage (Ide.Gui.Stock.StatusConnecting, message); }); } public void Dispose () { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { IdeApp.Workbench.StatusBar.ShowReady (); }); } @@ -1318,7 +1318,7 @@ namespace MonoDevelop.Debugger cts = new System.Threading.CancellationTokenSource (); //MessageService is threadsafe but we want this to be async - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { RunDialog (message); }); } diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs index 3acd6fbdfa..0a3e8d016f 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs @@ -520,7 +520,7 @@ widget ""*.exception_dialog_expander"" style ""exception-dialog-expander"" } }); exception.Changed += delegate { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { InnerExceptionsStore.EmitRowChanged (InnerExceptionsStore.GetPath (iter), iter); updateInnerExceptions (); InnerExceptionsTreeView.ExpandRow (InnerExceptionsStore.GetPath (iter), true); @@ -631,7 +631,7 @@ widget ""*.exception_dialog_expander"" style ""exception-dialog-expander"" void ExceptionChanged (object sender, EventArgs e) { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { if (hadInnerException != HasInnerException ()) Build (); UpdateDisplay (); @@ -1014,7 +1014,7 @@ widget ""*.exception_dialog_expander"" style ""exception-dialog-expander"" box.PackStart (vb, false, false, 0); exception.Changed += delegate { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { LoadData (); }); }; diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValueTreeView.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValueTreeView.cs index 19ba6f9f24..4bfec4d843 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValueTreeView.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValueTreeView.cs @@ -642,7 +642,7 @@ namespace MonoDevelop.Debugger if (tval != valueCol.FixedWidth) { valueCol.FixedWidth = tval; - Application.Invoke (delegate { QueueResize (); }); + Application.Invoke ((o, args) => { QueueResize (); }); } columnSizesUpdating = false; @@ -1030,7 +1030,7 @@ namespace MonoDevelop.Debugger void OnValueUpdated (object o, EventArgs a) { - Application.Invoke (delegate { + Application.Invoke ((o2, a2) => { if (disposed) return; diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/CodeBehindWriter.cs b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/CodeBehindWriter.cs index 3f8fbdeb1c..0ff699cfcf 100644 --- a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/CodeBehindWriter.cs +++ b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/CodeBehindWriter.cs @@ -111,7 +111,7 @@ namespace MonoDevelop.DesignerSupport } FileService.SystemRename (tempPath, path); //mark the file as changed so it gets reparsed - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { FileService.NotifyFileChanged (path); }); WrittenCount++; @@ -146,7 +146,7 @@ namespace MonoDevelop.DesignerSupport File.WriteAllText (tempPath, contents); FileService.SystemRename (tempPath, path); //mark the file as changed so it gets reparsed - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { FileService.NotifyFileChanged (path); }); WrittenCount++; diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/RemoteDesignerProcess.cs b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/RemoteDesignerProcess.cs index 2846f52550..01a080e9fe 100644 --- a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/RemoteDesignerProcess.cs +++ b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/RemoteDesignerProcess.cs @@ -135,7 +135,7 @@ namespace MonoDevelop.DesignerSupport if (gtkThread != null && gtkThread.ManagedThreadId != System.Threading.Thread.CurrentThread.ManagedThreadId) { - Gtk.Application.Invoke (delegate{ + Gtk.Application.Invoke ((o, args) => { ShowText (err); }); } else { @@ -196,14 +196,14 @@ namespace MonoDevelop.DesignerSupport public void AttachDesigner (uint socket) { - Application.Invoke ( delegate { + Application.Invoke ( (o, args) => { designerPlug = AttachChildViaPlug (socket, designerFrame); }); } public void AttachPropertyGrid (uint socket) { - Application.Invoke ( delegate { + Application.Invoke ( (o, args) => { propGridPlug = AttachChildViaPlug (socket, propGridFrame); }); } @@ -241,7 +241,7 @@ namespace MonoDevelop.DesignerSupport disposed = true; System.Diagnostics.Trace.WriteLine ("Trying to close designer GUI thread"); - Application.Invoke ( delegate { + Application.Invoke ( (o, args) => { Application.Quit (); DisposePhase2 (); }); diff --git a/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationNodeBuilder.cs b/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationNodeBuilder.cs index b8bfda44ad..04f0d6d85f 100644 --- a/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationNodeBuilder.cs +++ b/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationNodeBuilder.cs @@ -132,7 +132,7 @@ namespace MonoDevelop.Gettext.NodeBuilders { try { project.UpdateTranslations (monitor, translation); - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { POEditorWidget.ReloadWidgets (); }); } catch (Exception ex) { diff --git a/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs b/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs index 687dd4558d..e6cc4c2e18 100644 --- a/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs +++ b/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs @@ -163,7 +163,7 @@ namespace MonoDevelop.Gettext.NodeBuilders { try { project.UpdateTranslations (monitor); - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { POEditorWidget.ReloadWidgets (); }); } catch (Exception ex) { diff --git a/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.GuiBuilder/GuiBuilderService.cs b/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.GuiBuilder/GuiBuilderService.cs index f1ada4ce17..8ff3f2cfcf 100644 --- a/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.GuiBuilder/GuiBuilderService.cs +++ b/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.GuiBuilder/GuiBuilderService.cs @@ -543,7 +543,7 @@ namespace MonoDevelop.GtkCore.GuiBuilder // Make sure the generated files are added to the project if (info.UpdateGtkFolder ()) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { IdeApp.ProjectOperations.SaveAsync (project); }); } diff --git a/main/src/addins/MonoDevelop.GtkCore/libstetic/DND.cs b/main/src/addins/MonoDevelop.GtkCore/libstetic/DND.cs index 9c671588e1..e9f98e5a34 100644 --- a/main/src/addins/MonoDevelop.GtkCore/libstetic/DND.cs +++ b/main/src/addins/MonoDevelop.GtkCore/libstetic/DND.cs @@ -170,7 +170,7 @@ namespace Stetic { Cancel (); Gtk.Drag.Finish (ctx, true, true, time); - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((args, e) => { IProject project = targetWrapper.Project; string uid = targetWrapper.UndoId; string tname = ((Wrapper.Widget)targetWrapper).GetTopLevel ().Wrapped.Name; diff --git a/main/src/addins/MonoDevelop.GtkCore/libsteticui/ActionGroupDesigner.cs b/main/src/addins/MonoDevelop.GtkCore/libsteticui/ActionGroupDesigner.cs index 473add6802..42f6ec82ef 100644 --- a/main/src/addins/MonoDevelop.GtkCore/libsteticui/ActionGroupDesigner.cs +++ b/main/src/addins/MonoDevelop.GtkCore/libsteticui/ActionGroupDesigner.cs @@ -244,28 +244,28 @@ namespace Stetic public void NotifyBindField () { Gtk.Application.Invoke ( - delegate { if (!disposed) designer.NotifyBindField (); } + (o, args) => { if (!disposed) designer.NotifyBindField (); } ); } public void NotifyModified () { Gtk.Application.Invoke ( - delegate { if (!disposed) designer.NotifyModified (); } + (o, args) => { if (!disposed) designer.NotifyModified (); } ); } public void NotifySignalAdded (Wrapper.Action action, string name, Signal signal) { Gtk.Application.Invoke ( - delegate { if (!disposed) designer.NotifySignalAdded (action, name, signal); } + (o, args) => { if (!disposed) designer.NotifySignalAdded (action, name, signal); } ); } public void NotifySignalChanged (Wrapper.Action action, string name, Signal oldSignal, Signal signal) { Gtk.Application.Invoke ( - delegate { if (!disposed) designer.NotifySignalChanged (action, name, oldSignal, signal); } + (o, args) => { if (!disposed) designer.NotifySignalChanged (action, name, oldSignal, signal); } ); } diff --git a/main/src/addins/MonoDevelop.GtkCore/libsteticui/GuiDispatchServerSink.cs b/main/src/addins/MonoDevelop.GtkCore/libsteticui/GuiDispatchServerSink.cs index e1262948e4..9bf683e233 100644 --- a/main/src/addins/MonoDevelop.GtkCore/libsteticui/GuiDispatchServerSink.cs +++ b/main/src/addins/MonoDevelop.GtkCore/libsteticui/GuiDispatchServerSink.cs @@ -124,7 +124,7 @@ namespace Stetic else { object wo = new object (); lock (wo) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { try { h (null, null); } finally { diff --git a/main/src/addins/MonoDevelop.GtkCore/libsteticui/SignalsEditor.cs b/main/src/addins/MonoDevelop.GtkCore/libsteticui/SignalsEditor.cs index d5aa7dd7c7..023a52c1cf 100644 --- a/main/src/addins/MonoDevelop.GtkCore/libsteticui/SignalsEditor.cs +++ b/main/src/addins/MonoDevelop.GtkCore/libsteticui/SignalsEditor.cs @@ -75,7 +75,7 @@ namespace Stetic public void NotifySignalActivated () { Gtk.Application.Invoke ( - delegate { + (o, args) => { if (!disposed) editor.NotifySignalActivated (); } ); diff --git a/main/src/addins/MonoDevelop.GtkCore/libsteticui/WidgetTree.cs b/main/src/addins/MonoDevelop.GtkCore/libsteticui/WidgetTree.cs index 08e692fb0a..66f423aab3 100644 --- a/main/src/addins/MonoDevelop.GtkCore/libsteticui/WidgetTree.cs +++ b/main/src/addins/MonoDevelop.GtkCore/libsteticui/WidgetTree.cs @@ -62,7 +62,7 @@ namespace Stetic public void NotifyWidgetActivated (object ob, string widgetName, string widgetType) { Gtk.Application.Invoke ( - delegate { + (o, args) => { if (disposed) return; Component c = app.GetComponent (ob, widgetName, widgetType); if (c != null && ComponentActivated != null) @@ -74,7 +74,7 @@ namespace Stetic public void NotifySelectionChanged (object ob, string widgetName, string widgetType) { Gtk.Application.Invoke ( - delegate { + (o, args) => { if (disposed) return; Component c = ob != null ? app.GetComponent (ob, widgetName, widgetType) : null; if (SelectionChanged != null) diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionEditorExtension.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionEditorExtension.cs index 7a967414e0..aaaf2d8c40 100644 --- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionEditorExtension.cs +++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionEditorExtension.cs @@ -206,7 +206,7 @@ namespace MonoDevelop.CodeActions return CodeActionContainer.Empty; var codeActionContainer = new CodeActionContainer (codeIssueFixes, codeActions, diagnosticsAtCaret); - Application.Invoke (delegate { + Application.Invoke ((o, args) => { if (cancellationToken.IsCancellationRequested) return; if (codeActionContainer.IsEmpty) { diff --git a/main/src/addins/MonoDevelop.RegexToolkit/MonoDevelop.RegexToolkit/RegexToolkitWidget.cs b/main/src/addins/MonoDevelop.RegexToolkit/MonoDevelop.RegexToolkit/RegexToolkitWidget.cs index f61f447fec..dc07f85c84 100644 --- a/main/src/addins/MonoDevelop.RegexToolkit/MonoDevelop.RegexToolkit/RegexToolkitWidget.cs +++ b/main/src/addins/MonoDevelop.RegexToolkit/MonoDevelop.RegexToolkit/RegexToolkitWidget.cs @@ -145,7 +145,7 @@ namespace MonoDevelop.RegexToolkit { try { Regex regex = new Regex (pattern, options); - Application.Invoke (delegate { + Application.Invoke ((o, args) => { this.resultStore.Clear (); var matches = regex.Matches (input); foreach (Match match in matches) { @@ -176,7 +176,7 @@ namespace MonoDevelop.RegexToolkit } catch (ThreadAbortException) { Thread.ResetAbort (); } catch (ArgumentException) { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { Ide.IdeApp.Workbench.StatusBar.ShowError (GettextCatalog.GetString ("Invalid expression")); }); } finally { diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextViewMargin.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextViewMargin.cs index cb3870548b..7d74e4ae60 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextViewMargin.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextViewMargin.cs @@ -425,7 +425,7 @@ namespace Mono.TextEditor } } } - Application.Invoke (delegate { + Application.Invoke ((o2, a2) => { this.selectedRegions = newRegions; if (updateLines != null) { var document = textEditor.Document; diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Wrappers/SemanticHighlightingSyntaxMode.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Wrappers/SemanticHighlightingSyntaxMode.cs index 47c0406402..948f9b1838 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Wrappers/SemanticHighlightingSyntaxMode.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Wrappers/SemanticHighlightingSyntaxMode.cs @@ -110,7 +110,7 @@ namespace MonoDevelop.SourceEditor.Wrappers void SemanticHighlighting_SemanticHighlightingUpdated (object sender, EventArgs e) { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { if (isDisposed) return; UnregisterLineSegmentTrees (); diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs index 038e82f32f..cc84876feb 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs @@ -432,7 +432,7 @@ namespace MonoDevelop.SourceEditor int x, y; widget.TextEditor.TextArea.GetTopLevelWidgetPosition (w, out x, out y); var size = w.SizeRequest (); - Application.Invoke (delegate { + Application.Invoke ((o, args) => { widget.TextEditor.ScrollTo (new Gdk.Rectangle (x, y, size.Width, size.Height)); }); } @@ -639,7 +639,7 @@ namespace MonoDevelop.SourceEditor }).ContinueWith (t => { if (token.IsCancellationRequested) return; - Application.Invoke (delegate { + Application.Invoke ((o, args) => { if (token.IsCancellationRequested) return; var newErrorMarkers = new List<MessageBubbleTextMarker> (); diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs index deeb2beb17..579854ddc2 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs @@ -505,7 +505,7 @@ namespace MonoDevelop.SourceEditor if (reloadSettings) { reloadSettings = false; - Application.Invoke (delegate { + Application.Invoke ((o, args) => { if (isDisposed) return; view.LoadSettings (); diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/DebugTextMarker.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/DebugTextMarker.cs index 3c7dd609f4..1dc36d27d0 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/DebugTextMarker.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/DebugTextMarker.cs @@ -76,7 +76,7 @@ namespace MonoDevelop.SourceEditor if (CanDrawForeground (margin)) // update tooltip during the next ui loop run, // otherwise Gtk will not update the position of the tooltip - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o2, a2) => { args.Editor.TooltipText = Tooltip; }); else if (args.Editor.TooltipText == Tooltip) diff --git a/main/src/addins/MonoDevelop.UnitTesting/Gui/TestResultsPad.cs b/main/src/addins/MonoDevelop.UnitTesting/Gui/TestResultsPad.cs index da2f623495..0b5760fc03 100644 --- a/main/src/addins/MonoDevelop.UnitTesting/Gui/TestResultsPad.cs +++ b/main/src/addins/MonoDevelop.UnitTesting/Gui/TestResultsPad.cs @@ -825,7 +825,7 @@ namespace MonoDevelop.UnitTesting void OnCancel () { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { failuresStore.AppendValues (TestStatusIcon.Failure, GettextCatalog.GetString ("Test execution cancelled."), null); }); } diff --git a/main/src/addins/MonoDevelop.UnitTesting/Services/AbstractUnitTestEditorExtension.cs b/main/src/addins/MonoDevelop.UnitTesting/Services/AbstractUnitTestEditorExtension.cs index 8d4e500097..ee58887fcd 100644 --- a/main/src/addins/MonoDevelop.UnitTesting/Services/AbstractUnitTestEditorExtension.cs +++ b/main/src/addins/MonoDevelop.UnitTesting/Services/AbstractUnitTestEditorExtension.cs @@ -98,7 +98,7 @@ namespace MonoDevelop.UnitTesting var foundTests = task.Result; if (foundTests == null || DocumentContext == null) return; - Application.Invoke (delegate { + Application.Invoke ((o, args) => { if (token.IsCancellationRequested || DocumentContext == null) return; foreach (var oldMarker in currentMarker) diff --git a/main/src/addins/MonoDevelop.UnitTesting/Services/UnitTest.cs b/main/src/addins/MonoDevelop.UnitTesting/Services/UnitTest.cs index c19796d5cb..b759443617 100644 --- a/main/src/addins/MonoDevelop.UnitTesting/Services/UnitTest.cs +++ b/main/src/addins/MonoDevelop.UnitTesting/Services/UnitTest.cs @@ -404,7 +404,7 @@ namespace MonoDevelop.UnitTesting protected virtual void OnTestChanged () { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { // Run asynchronously in the UI thread if (TestChanged != null) TestChanged (this, EventArgs.Empty); @@ -413,7 +413,7 @@ namespace MonoDevelop.UnitTesting protected virtual void OnTestStatusChanged () { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { // Run asynchronously in the UI thread if (TestStatusChanged != null) TestStatusChanged (this, EventArgs.Empty); diff --git a/main/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.Dialogs/WebReferenceDialog.cs b/main/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.Dialogs/WebReferenceDialog.cs index 89e60acb6c..dd598d13c6 100644 --- a/main/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.Dialogs/WebReferenceDialog.cs +++ b/main/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.Dialogs/WebReferenceDialog.cs @@ -377,14 +377,14 @@ namespace MonoDevelop.WebReferences.Dialogs return; } - Application.Invoke (delegate { + Application.Invoke ((o, args) => { UpdateService (service, url); }); } void ShowError (string error) { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { if (docLabel != null) { docLabel.Text = error; docLabel.LineWrapMode = Pango.WrapMode.Word; diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs index 2913adac75..f6252c446a 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs @@ -153,7 +153,7 @@ namespace MonoDevelop.VersionControl.Git bool RefreshFile (string path, CheckoutNotifyFlags flags) { FilePath fp = RootRepository.FromGitPath (path); - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { if (IdeApp.IsInitialized) { MonoDevelop.Ide.Gui.Document doc = IdeApp.Workbench.GetDocument (fp); if (doc != null) diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/SelectRepositoryDialog.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/SelectRepositoryDialog.cs index 963c7bb25f..8ad5a5e087 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/SelectRepositoryDialog.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/SelectRepositoryDialog.cs @@ -279,7 +279,7 @@ namespace MonoDevelop.VersionControl.Dialogs ex = e; } - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { if (ex != null) { LoggingService.LogError ("Failed to load connected repositories.", ex.ToString ()); } diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/ChangeSetView.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/ChangeSetView.cs index 168ffb5194..0df03a9b53 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/ChangeSetView.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/ChangeSetView.cs @@ -339,7 +339,7 @@ namespace MonoDevelop.VersionControl.Views ddata.diffRequested = true; ddata.diffRunning = false; if (null != DiffDataLoaded) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { DiffDataLoaded (ddata); DiffDataLoaded = null; }); diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/ComparisonWidget.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/ComparisonWidget.cs index f828b3039e..3c1d3e50ab 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/ComparisonWidget.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/ComparisonWidget.cs @@ -188,7 +188,7 @@ namespace MonoDevelop.VersionControl.Views }; worker.RunWorkerCompleted += delegate(object sender, RunWorkerCompletedEventArgs e) { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { var result = (KeyValuePair<Revision, string>)e.Result; var box = toEditor == editors[0] ? diffComboBox : originalComboBox; RemoveLocal (toEditor.GetTextEditorData ()); diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogWidget.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogWidget.cs index 0fa3659950..b08562fa3d 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogWidget.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogWidget.cs @@ -404,7 +404,7 @@ namespace MonoDevelop.VersionControl.Views try { text = info.Repository.GetTextAtRevision (path, rev); } catch (Exception e) { - Application.Invoke (delegate { + Application.Invoke ((o2, a2) => { LoggingService.LogError ("Error while getting revision text", e); MessageService.ShowError ( GettextCatalog.GetString ("Error while getting revision text."), @@ -417,7 +417,7 @@ namespace MonoDevelop.VersionControl.Views try { prevRev = rev.GetPrevious (); } catch (Exception e) { - Application.Invoke (delegate { + Application.Invoke ((o2, a2) => { MessageService.ShowError (GettextCatalog.GetString ("Error while getting previous revision."), e); }); return; @@ -438,7 +438,7 @@ namespace MonoDevelop.VersionControl.Views try { prevRevisionText = info.Repository.GetTextAtRevision (path, prevRev); } catch (Exception e) { - Application.Invoke (delegate { + Application.Invoke ((o2, a2) => { LoggingService.LogError ("Error while getting revision text", e); MessageService.ShowError ( GettextCatalog.GetString ("Error while getting revision text."), @@ -463,7 +463,7 @@ namespace MonoDevelop.VersionControl.Views lines = Mono.TextEditor.Utils.Diff.GetDiffString (originalDocument, changedDocument).Split ('\n'); } } - Application.Invoke (delegate { + Application.Invoke ((o2, a2) => { changedpathstore.SetValue (iter, colDiff, lines); }); }); diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/StatusView.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/StatusView.cs index 0a03810fe5..cf634cff82 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/StatusView.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/StatusView.cs @@ -1081,7 +1081,7 @@ namespace MonoDevelop.VersionControl.Views // the value. Do not capture the TreeIter as it may invalidate // before the diff data has asyncronously loaded. GC.KeepAlive (info.Diff.Value); - Gtk.Application.Invoke (delegate { if (!disposed) FillDifs (); }); + Gtk.Application.Invoke ((o, args) => { if (!disposed) FillDifs (); }); }); } else if (info.Exception != null) { text = new [] { GettextCatalog.GetString ("Could not get diff information. ") }; diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/AddRemoveMoveCommand.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/AddRemoveMoveCommand.cs index be9da672f5..ba5a42e0fc 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/AddRemoveMoveCommand.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/AddRemoveMoveCommand.cs @@ -37,7 +37,7 @@ namespace MonoDevelop.VersionControl foreach (VersionControlItemList list in items.SplitByRepository ()) list[0].Repository.Add (list.Paths, true, monitor); - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { VersionControlService.NotifyFileStatusChanged (items); }); monitor.ReportSuccess (GettextCatalog.GetString ("Add operation completed.")); @@ -131,7 +131,7 @@ namespace MonoDevelop.VersionControl dirs[0].Repository.DeleteDirectories (dirs.Paths, true, Monitor, true); } - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { VersionControlService.NotifyFileStatusChanged (items); }); Monitor.ReportSuccess (GettextCatalog.GetString ("Remove operation completed.")); diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/IgnoreCommand.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/IgnoreCommand.cs index 2e035e90ce..e6690818c4 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/IgnoreCommand.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/IgnoreCommand.cs @@ -81,7 +81,7 @@ namespace MonoDevelop.VersionControl foreach (VersionControlItemList list in items.SplitByRepository ())
list[0].Repository.Ignore (list.Paths);
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
foreach (VersionControlItem item in items)
if (!item.IsDirectory)
FileService.NotifyFileChanged (item.Path);
@@ -144,7 +144,7 @@ namespace MonoDevelop.VersionControl foreach (VersionControlItemList list in items.SplitByRepository ())
list[0].Repository.Unignore (list.Paths);
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
foreach (VersionControlItem item in items)
if (!item.IsDirectory)
FileService.NotifyFileChanged (item.Path);
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/LockCommand.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/LockCommand.cs index 684ded981b..a8f4eaf134 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/LockCommand.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/LockCommand.cs @@ -61,7 +61,7 @@ namespace MonoDevelop.VersionControl list[0].Repository.Lock (Monitor, list.Paths); - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { VersionControlService.NotifyFileStatusChanged (items); }); Monitor.ReportSuccess (GettextCatalog.GetString ("Lock operation completed.")); diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/PublishCommand.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/PublishCommand.cs index b7a27f5535..59f86a78a8 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/PublishCommand.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/PublishCommand.cs @@ -101,7 +101,7 @@ namespace MonoDevelop.VersionControl return;
}
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
VersionControlService.NotifyFileStatusChanged (new FileUpdateEventArgs (vc, path, true));
});
Monitor.ReportSuccess (GettextCatalog.GetString ("Publish operation completed."));
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/RevertCommand.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/RevertCommand.cs index 2e053bb10b..40532a1b4c 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/RevertCommand.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/RevertCommand.cs @@ -59,7 +59,7 @@ namespace MonoDevelop.VersionControl foreach (VersionControlItemList list in items.SplitByRepository ()) list[0].Repository.Revert (list.Paths, true, Monitor); - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { foreach (VersionControlItem item in items) { if (!item.IsDirectory) { FileService.NotifyFileChanged (item.Path); diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/RevertRevisionsCommands.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/RevertRevisionsCommands.cs index 293d5b7295..33fa40909f 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/RevertRevisionsCommands.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/RevertRevisionsCommands.cs @@ -115,7 +115,7 @@ namespace MonoDevelop.VersionControl if (!(isDir || Directory.Exists (path))) isDir = false; - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { if (!isDir) { // Reload reverted files Document doc = IdeApp.Workbench.GetDocument (path); diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/UnlockCommand.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/UnlockCommand.cs index 0fb3740224..787101fbac 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/UnlockCommand.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/UnlockCommand.cs @@ -62,7 +62,7 @@ namespace MonoDevelop.VersionControl foreach (VersionControlItemList list in items.SplitByRepository ()) list[0].Repository.Unlock (Monitor, list.Paths); - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { VersionControlService.NotifyFileStatusChanged (items); }); Monitor.ReportSuccess (GettextCatalog.GetString ("Unlock operation completed.")); diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/UpdateCommand.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/UpdateCommand.cs index 18ab6a7713..b839c4b9cb 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/UpdateCommand.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/UpdateCommand.cs @@ -33,7 +33,7 @@ namespace MonoDevelop.VersionControl foreach (VersionControlItemList list in items.SplitByRepository ()) { list[0].Repository.Update (list.Paths, true, Monitor); } - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { VersionControlService.NotifyFileStatusChanged (items); }); Monitor.ReportSuccess (GettextCatalog.GetString ("Update operation completed.")); diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlService.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlService.cs index b05f6ea56d..71dfc48d81 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlService.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlService.cs @@ -387,7 +387,7 @@ namespace MonoDevelop.VersionControl internal static void NotifyPrepareCommit (Repository repo, ChangeSet changeSet) { if (!Runtime.IsMainThread) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { NotifyPrepareCommit (repo, changeSet); }); return; @@ -403,7 +403,7 @@ namespace MonoDevelop.VersionControl internal static void NotifyBeforeCommit (Repository repo, ChangeSet changeSet) { if (!Runtime.IsMainThread) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { NotifyBeforeCommit (repo, changeSet); }); return; @@ -419,7 +419,7 @@ namespace MonoDevelop.VersionControl internal static void NotifyAfterCommit (Repository repo, ChangeSet changeSet, bool success) { if (!Runtime.IsMainThread) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { NotifyAfterCommit (repo, changeSet, success); }); return; @@ -449,7 +449,7 @@ namespace MonoDevelop.VersionControl public static void NotifyFileStatusChanged (FileUpdateEventArgs args) { if (!Runtime.IsMainThread) - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o2, a2) => { NotifyFileStatusChanged (args); }); else { diff --git a/main/src/addins/Xml/Editor/BaseXmlEditorExtension.cs b/main/src/addins/Xml/Editor/BaseXmlEditorExtension.cs index 0b900a37fb..4871b51b13 100644 --- a/main/src/addins/Xml/Editor/BaseXmlEditorExtension.cs +++ b/main/src/addins/Xml/Editor/BaseXmlEditorExtension.cs @@ -88,7 +88,7 @@ namespace MonoDevelop.Xml.Editor // Delay the execution of UpdateOwnerProjects since it may end calling Document.AttachToProject, // which shouldn't be called while the extension chain is being initialized. // TODO: Move handling of owner projects to Document - Application.Invoke (delegate { + Application.Invoke ((o, args) => { UpdateOwnerProjects (); }); diff --git a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs index 46f3f2e679..895e248343 100644 --- a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs +++ b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs @@ -1276,7 +1276,7 @@ namespace Mono.TextEditor if (!startTask) { var newFoldedSegments = UpdateFoldSegmentWorker (newSegments, out update); if (useApplicationInvoke) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { foldedSegments = newFoldedSegments; InformFoldTreeUpdated (); }); @@ -1294,7 +1294,7 @@ namespace Mono.TextEditor if (token.IsCancellationRequested) return; foldedSegments = segments; - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { if (token.IsCancellationRequested) return; InformFoldTreeUpdated (); diff --git a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/HeightTree.cs b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/HeightTree.cs index b5c836255f..a30b668e0b 100644 --- a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/HeightTree.cs +++ b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/HeightTree.cs @@ -83,7 +83,7 @@ namespace Mono.TextEditor void HandleFoldTreeUpdated (object sender, EventArgs e) { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { Rebuild (); }); } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestSession.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestSession.cs index 62efba8339..70104d068b 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestSession.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestSession.cs @@ -98,7 +98,7 @@ namespace MonoDevelop.Components.AutoTest public void ExecuteCommand (object cmd, object dataItem = null, CommandSource source = CommandSource.Unknown) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { AutoTestService.CommandManager.DispatchCommand (cmd, dataItem, null, source); }); } @@ -114,7 +114,7 @@ namespace MonoDevelop.Components.AutoTest } syncEvent.Reset (); - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { try { res = del (); } catch (Exception ex) { diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/PlaceholderWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/PlaceholderWindow.cs index 02cb1e98d4..1caba3c247 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/PlaceholderWindow.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/PlaceholderWindow.cs @@ -106,7 +106,7 @@ namespace MonoDevelop.Components.DockNotebook protected override void OnDestroyed () { base.OnDestroyed (); - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { titleWindow.Destroy (); }); IdeApp.Workbench.UnlockActiveWindowChangeEvent (); @@ -465,7 +465,7 @@ namespace MonoDevelop.Components.DockNotebook public void Close () { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { placeholder.Destroy (); }); } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockFrameTopLevel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockFrameTopLevel.cs index 723e7ae6a8..0f2a5fa8a9 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockFrameTopLevel.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockFrameTopLevel.cs @@ -128,7 +128,7 @@ namespace MonoDevelop.Components.Docking if (ContainerWindow != null) { if (!repositionRequested && width != 0 && height != 0) { repositionRequested = true; - Application.Invoke (delegate { + Application.Invoke ((o, args) => { var pos = frame.GetScreenCoordinates (new Gdk.Point (x, y)); DesktopService.PlaceWindow (ContainerWindow, pos.X, pos.Y, width, height); repositionRequested = false; diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions/AlertDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions/AlertDialog.cs index 8bd896d2bc..397b972fb2 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions/AlertDialog.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions/AlertDialog.cs @@ -85,7 +85,7 @@ namespace MonoDevelop.Components.Extensions if (data.Message.CancellationToken.CanBeCanceled) { data.Message.CancellationToken.Register (delegate { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { if (alertDialog != null) { alertDialog.Respond (Gtk.ResponseType.DeleteEvent); } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuExtensionsMac.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuExtensionsMac.cs index b91d4aa448..25e57dc339 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuExtensionsMac.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuExtensionsMac.cs @@ -74,7 +74,7 @@ namespace MonoDevelop.Components parent.GrabFocus (); - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { // Explicitly release the grab because the menu is shown on the mouse position, and the widget doesn't get the mouse release event Gdk.Pointer.Ungrab (Gtk.Global.CurrentEventTime); var nsview = MonoDevelop.Components.Mac.GtkMacInterop.GetNSView (parent); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs index 89b3d87c8c..f1f8f2aea3 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs @@ -926,7 +926,7 @@ namespace MonoDevelop.Components // Delay the call to the leave handler since the pointer may be // entering a child widget, in which case the event doesn't have to be fired - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o2, a2) => { if (!Inside) LeaveHandler (); }); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs index a4a2ca67f8..0975a375f9 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs @@ -432,7 +432,7 @@ namespace MonoDevelop.Ide.CustomTools FileService.NotifyFileChanged (result.GeneratedFilePath); // add file to project, update file properties, etc - Gtk.Application.Invoke (async delegate { + Gtk.Application.Invoke (async (o, args) => { bool projectChanged = false; if (genFile == null) { genFile = file.Project.AddFile (result.GeneratedFilePath, result.OverrideBuildAction); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/AbstractUsagesExtension.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/AbstractUsagesExtension.cs index 1b8a22291b..76e692de88 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/AbstractUsagesExtension.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/AbstractUsagesExtension.cs @@ -145,7 +145,7 @@ namespace MonoDevelop.Ide.Editor.Extension } var list = await GetReferencesAsync (result, token); if (!token.IsCancellationRequested) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { if (!token.IsCancellationRequested) ShowReferences (list); }); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/BraceMatcherTextEditorExtension.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/BraceMatcherTextEditorExtension.cs index 71a91bfd24..b95e323c55 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/BraceMatcherTextEditorExtension.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/BraceMatcherTextEditorExtension.cs @@ -164,7 +164,7 @@ namespace MonoDevelop.Ide.Editor.Extension } if (token.IsCancellationRequested) return; - Application.Invoke (delegate { + Application.Invoke ((o, args) => { if (token.IsCancellationRequested) return; Editor.UpdateBraceMatchingResult (result); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/ErrorHandlerTextEditorExtension.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/ErrorHandlerTextEditorExtension.cs index 1334966ce9..e28e21a33f 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/ErrorHandlerTextEditorExtension.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/ErrorHandlerTextEditorExtension.cs @@ -151,7 +151,7 @@ namespace MonoDevelop.Ide.Editor.Extension return; try { var errors = await parsedDocument.GetErrorsAsync(token).ConfigureAwait (false); - Application.Invoke (delegate { + Application.Invoke ((o, args) => { if (token.IsCancellationRequested || isDisposed) return; RemoveErrorUndelinesResetTimerId (); @@ -232,7 +232,7 @@ namespace MonoDevelop.Ide.Editor.Extension } if (token.IsCancellationRequested) return; - Application.Invoke (delegate { + Application.Invoke ((o, args) => { if (token.IsCancellationRequested || isDisposed) return; tasks = newTasks.ToImmutable (); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/FoldingTextEditorExtension.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/FoldingTextEditorExtension.cs index 0ad4db604e..d2e252b50e 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/FoldingTextEditorExtension.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/FoldingTextEditorExtension.cs @@ -139,7 +139,7 @@ namespace MonoDevelop.Ide.Editor.Extension if (firstTime) { Editor.SetFoldings (foldSegments); } else { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { if (!token.IsCancellationRequested) Editor.SetFoldings (foldSegments); }); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs index 1463e22736..d9bd0dab4e 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs @@ -58,21 +58,21 @@ namespace MonoDevelop.Ide.FindInFiles public override void BeginReplace (string content, Encoding encoding) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { undoGroup = editor.OpenUndoGroup (); }); } public override void Replace (int offset, int length, string replacement) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { editor.ReplaceText (offset, length, replacement); }); } public override void EndReplace () { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { if (undoGroup != null) { undoGroup.Dispose (); undoGroup = null; @@ -182,7 +182,7 @@ namespace MonoDevelop.Ide.FindInFiles document = await SearchDocument (); this.encoding = encoding; if (document != null) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { undoGroup = document.Editor.OpenUndoGroup (); }); return; @@ -195,7 +195,7 @@ namespace MonoDevelop.Ide.FindInFiles buffer.Remove (offset, length); buffer.Insert (offset, replacement); if (document != null) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { document.Editor.ReplaceText (offset, length, replacement); }); return; @@ -205,7 +205,7 @@ namespace MonoDevelop.Ide.FindInFiles public virtual void EndReplace () { if (document != null) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { if (undoGroup != null) { undoGroup.Dispose (); undoGroup = null; diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs index e083aaf58f..3083309e5f 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs @@ -841,14 +841,14 @@ namespace MonoDevelop.Ide.FindInFiles searchMonitor.PathMode = scope.PathMode; if (UpdateResultPad != null) { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { UpdateResultPad (searchMonitor.ResultPad); }); } searchMonitor.ReportStatus (scope.GetDescription (options, pattern, null)); if (UpdateStopButton != null) { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { UpdateStopButton (); }); } @@ -884,7 +884,7 @@ namespace MonoDevelop.Ide.FindInFiles searchMonitor.Log.WriteLine (GettextCatalog.GetString ("Search time: {0} seconds."), (DateTime.Now - timer).TotalSeconds); } if (UpdateStopButton != null) { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { UpdateStopButton (); }); } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/VersionInformationTabPage.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/VersionInformationTabPage.cs index 62ec799fc1..afb2191602 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/VersionInformationTabPage.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/VersionInformationTabPage.cs @@ -53,14 +53,14 @@ namespace MonoDevelop.Ide.Gui.Dialogs new System.Threading.Thread (() => { try { var info = SystemInformation.GetDescription ().ToArray (); - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { if (destroyed) return; SetText (info); }); } catch (Exception ex) { LoggingService.LogError ("Failed to load version information", ex); - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { if (destroyed) return; SetLabel (GettextCatalog.GetString ("Failed to load version information.")); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectSolutionPad.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectSolutionPad.cs index bb6974575f..376eb06181 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectSolutionPad.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectSolutionPad.cs @@ -82,7 +82,7 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad void OnWindowChanged (object ob, EventArgs args) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o2, a2) => { SelectActiveFile (); }); } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs index 82035b410f..cfac69112e 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs @@ -42,7 +42,7 @@ namespace MonoDevelop.Ide.Gui { this.title = title; if (!iconName.IsNull) { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { var img = ImageService.GetIcon (iconName, IconSize.Menu); icon = IdeApp.Workbench.StatusBar.ShowStatusIcon (img); icon.Title = GettextCatalog.GetString ("Background Progress"); @@ -63,7 +63,7 @@ namespace MonoDevelop.Ide.Gui else tip = string.Format ("{0} ({1}%)\n{2}", title, (int)(Progress * 100), CurrentTaskName); - Application.Invoke (delegate { + Application.Invoke ((o, args) => { if (icon != null) icon.ToolTip = tip; }); @@ -72,7 +72,7 @@ namespace MonoDevelop.Ide.Gui public override void Dispose() { base.Dispose (); - Application.Invoke (delegate { + Application.Invoke ((o, args) => { if (icon != null) { icon.Dispose (); icon = null; diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs index 45432db1d3..d7f2fe48dd 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs @@ -1029,7 +1029,7 @@ namespace MonoDevelop.Ide.Gui TypeSystemService.ParseProjection (options, mimeType, token).ContinueWith (task => { if (token.IsCancellationRequested) return; - Application.Invoke (delegate { + Application.Invoke ((o, args) => { // this may be called after the document has closed, in that case the OnDocumentParsed event shouldn't be invoked. var taskResult = task.Result; if (isClosed || taskResult == null || token.IsCancellationRequested) @@ -1046,7 +1046,7 @@ namespace MonoDevelop.Ide.Gui TypeSystemService.ParseFile (options, mimeType, token).ContinueWith (task => { if (token.IsCancellationRequested) return; - Application.Invoke (delegate { + Application.Invoke ((o, args) => { // this may be called after the document has closed, in that case the OnDocumentParsed event shouldn't be invoked. if (isClosed || task.Result == null || token.IsCancellationRequested) return; diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs index 28b078d663..08f596c6aa 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs @@ -283,7 +283,7 @@ namespace MonoDevelop.Ide.Gui tabControl.CurrentTabIndex = tab.Index; // Focus the tab in the next iteration since presenting the window may take some time - Application.Invoke (delegate { + Application.Invoke ((o, args) => { DockNotebook.ActiveNotebook = tabControl; DeepGrabFocus (this.ActiveViewContent.Control); }); 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 44ff749e74..1ac3ee7c81 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs @@ -356,7 +356,7 @@ namespace MonoDevelop.Ide.Projects } else { // There are validation errors. Cancel the policy switch int last = policiesCombo.Active; - Application.Invoke (delegate { + Application.Invoke ((o, args) => { loading = true; policiesCombo.Active = last; loading = false; diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs index c63799ea16..87c8440d4b 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs @@ -296,7 +296,7 @@ namespace MonoDevelop.Ide.Tasks void OnCommentTasksChanged (object sender, CommentTasksChangedEventArgs args) { - Application.Invoke (delegate { + Application.Invoke ((o, a) => { foreach (var e in args.Changes) { //because of parse queueing, it's possible for this event to come in after the solution is closed //so we track which solutions are currently open so that we don't leak memory by holding diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.cs index 535097f973..36db51a996 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.cs @@ -179,7 +179,7 @@ namespace MonoDevelop.Ide.TypeSystem internal void HideStatusIcon ()
{
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
workspacesLoading--;
if (workspacesLoading == 0 && statusIcon != null) {
statusIcon.Dispose ();
@@ -194,7 +194,7 @@ namespace MonoDevelop.Ide.TypeSystem internal void ShowStatusIcon ()
{
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
workspacesLoading++;
if (statusIcon != null)
return;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs index ed8da5693f..ea44ee0cf2 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs @@ -120,7 +120,7 @@ namespace MonoDevelop.Ide.TypeSystem w.UpdateFileContent (file, text); } - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { if (IdeApp.Workbench != null) foreach (var w in IdeApp.Workbench.Documents) w.StartReparseThread (); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs index eae2a2c8bc..d9b864370a 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs @@ -171,7 +171,7 @@ namespace MonoDevelop.Ide.WelcomePage }
LoggingService.LogInfo ("Welcome Page updated.");
- Gtk.Application.Invoke (delegate { LoadNews (); });
+ Gtk.Application.Invoke ((o, args) => { LoadNews (); });
} catch (Exception ex) {
var agg = ex as AggregateException; diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DefaultWebCertificateProvider.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DefaultWebCertificateProvider.cs index f0788d1b3b..f62bf8f7c0 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DefaultWebCertificateProvider.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DefaultWebCertificateProvider.cs @@ -46,7 +46,7 @@ namespace MonoDevelop.Ide if (!TrustedCertificates.TryGetValue (certificateFingerprint, out value)) { using (var handle = new System.Threading.ManualResetEvent (false)) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { value = MessageService.AskQuestion ( GettextCatalog.GetString ("Untrusted HTTP certificate detected"), GettextCatalog.GetString ("Do you want to temporarily trust this certificate in order to connect to the server at {0}?", uri), diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DispatchService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DispatchService.cs index 648eb17bb8..191205e8a0 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DispatchService.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DispatchService.cs @@ -48,7 +48,7 @@ namespace MonoDevelop.Ide { public override void Post (SendOrPostCallback d, object state) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { d (state); }); } @@ -61,7 +61,7 @@ namespace MonoDevelop.Ide } var ob = new object (); lock (ob) { - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { try { d (state); } finally { diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs index ae8e0ebcbb..c578c70507 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs @@ -479,7 +479,7 @@ namespace MonoDevelop.Ide return task.Result; //cancelDialog is used to close dialog when task is finished var cancelDialog = new CancellationTokenSource (); - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { if (cancelDialog.Token.IsCancellationRequested) return; var gm = new GenericMessage (waitMessage, null, cancelDialog.Token); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs index 435f3c735a..a5477722b1 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs @@ -939,7 +939,7 @@ namespace MonoDevelop.Ide NotifyItemAddedGui (item, IsReloading); else { bool reloading = IsReloading; - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { NotifyItemAddedGui (item, reloading); }); } @@ -973,7 +973,7 @@ namespace MonoDevelop.Ide NotifyItemRemovedGui (item, IsReloading); else { bool reloading = IsReloading; - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o, args) => { NotifyItemRemovedGui (item, reloading); }); } @@ -1093,7 +1093,7 @@ namespace MonoDevelop.Ide // Delay the notification of this event to ensure that the new project is properly // registered in the parser database when it is fired - Gtk.Application.Invoke (delegate { + Gtk.Application.Invoke ((o2, a2) => { if (ItemAddedToSolution != null) ItemAddedToSolution (sender, args); }); diff --git a/main/src/tools/mdmonitor/InstrumentationChartView.cs b/main/src/tools/mdmonitor/InstrumentationChartView.cs index f5c2b4485b..541bc71ee5 100644 --- a/main/src/tools/mdmonitor/InstrumentationChartView.cs +++ b/main/src/tools/mdmonitor/InstrumentationChartView.cs @@ -500,14 +500,14 @@ namespace Mono.Instrumentation.Monitor public void SaveAs () { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { parent.NewView (view); }); } public void Delete () { - Application.Invoke (delegate { + Application.Invoke ((o, args) => { parent.DeleteView (originalView); }); } |