diff options
author | Marius Ungureanu <teromario@yahoo.com> | 2017-11-28 12:14:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-28 12:14:18 +0300 |
commit | 43a7ad038890aac2daf912759edfeb88e761ae89 (patch) | |
tree | 957f788a00d8121ea92aea73b168fdfd8f725fd3 /main/src/addins | |
parent | 2dec433ebc2ed30b79d17eb7a76c7816f65c1b2d (diff) |
[Gtk] Switch overrides of Destroy to OnDestroyed. (#3414)
The former is only called when explicitly invoking widget.Destroy.
The latter is called properly (i.e. when you destroy a dialog, it'll
recursively destroy all children, thus hitting OnDestroyed)
Diffstat (limited to 'main/src/addins')
2 files changed, 4 insertions, 4 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/AttachToProcessDialog.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/AttachToProcessDialog.cs index e77429f1ef..4bc5ce2b32 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/AttachToProcessDialog.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/AttachToProcessDialog.cs @@ -132,14 +132,14 @@ namespace MonoDevelop.Debugger Runtime.RunInMainThread (new Action (FillList)).Ignore (); } - public override void Destroy () + protected override void OnDestroyed () { if (processAttacher != null) { processAttacher.AttachableProcessesChanged -= ProcessAttacher_AttachableProcessesChanged; processAttacher.Dispose (); } refreshLoopTokenSource.Cancel (); - base.Destroy (); + base.OnDestroyed (); } void Refresh (object tokenObject) diff --git a/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs b/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs index f29ccabe70..3645bd12ac 100644 --- a/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs +++ b/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs @@ -85,10 +85,10 @@ namespace MonoDevelop.Packaging.Gui ProjectHasMetadata = hasMetadata; } - public override void Destroy () + protected override void OnDestroyed () { GtkNuGetPackageMetadataOptionsPanelWidget.OnProjectHasMetadataChanged = null; - base.Destroy (); + base.OnDestroyed (); } } } |