[Monodevelop-patches-list] r1393 - in trunk/MonoDevelop/src/Main/Base: . Commands Gui/Dialogs
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Mon Apr 5 21:03:55 EDT 2004
Author: jluke
Date: 2004-04-05 21:03:55 -0400 (Mon, 05 Apr 2004)
New Revision: 1393
Modified:
trunk/MonoDevelop/src/Main/Base/ChangeLog
trunk/MonoDevelop/src/Main/Base/Commands/HelpCommands.cs
trunk/MonoDevelop/src/Main/Base/Commands/ToolsCommands.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewLayoutDialog.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TipOfTheDay.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ViewGPLDialog.cs
Log:
more disposing
Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-04-06 00:34:53 UTC (rev 1392)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-04-06 01:03:55 UTC (rev 1393)
@@ -3,7 +3,12 @@
* Gui/BrowserDisplayBinding/HtmlViewPane.cs:
* Gui/BrowserDisplayBinding/BrowserDisplayBinding.cs: small cleanups
* Commands/HelpCommands.cs: make sure dispose is called on the
- tip of the day and about dialogs
+ tip of the day, about and viewgpl dialogs
+ * Commands/ToolsCommands.cs: make sure dispose is called for the
+ NewLayoutDialog
+ * Gui/Dialogs/NewLayoutDialog.cs: implement IDisposable
+ * Gui/Dialogs/ViewGplDialog.cs: implement IDisposable
+ * Gui/Dialogs/TipOfTheDayDialog.cs: implement IDisposable
2004-04-04 Todd Berman <tberman at sevenl.net>
Modified: trunk/MonoDevelop/src/Main/Base/Commands/HelpCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/HelpCommands.cs 2004-04-06 00:34:53 UTC (rev 1392)
+++ trunk/MonoDevelop/src/Main/Base/Commands/HelpCommands.cs 2004-04-06 01:03:55 UTC (rev 1393)
@@ -39,7 +39,7 @@
{
public override void Run()
{
- ViewGPLDialog vgd = new ViewGPLDialog ();
+ using (ViewGPLDialog vgd = new ViewGPLDialog ());
}
}
@@ -86,9 +86,9 @@
{
public override void Run()
{
- //FIXME: make this a dialog and use Run
- TipOfTheDayWindow totdw = new TipOfTheDayWindow ();
- totdw.Show ();
+ using (TipOfTheDayWindow totdw = new TipOfTheDayWindow ()) {
+ totdw.Show ();
+ }
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Commands/ToolsCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/ToolsCommands.cs 2004-04-06 00:34:53 UTC (rev 1392)
+++ trunk/MonoDevelop/src/Main/Base/Commands/ToolsCommands.cs 2004-04-06 01:03:55 UTC (rev 1393)
@@ -47,8 +47,9 @@
{
public override void Run()
{
- NewLayoutDialog dlg = new NewLayoutDialog ();
- dlg.Run ();
+ using (NewLayoutDialog dlg = new NewLayoutDialog ()) {
+ dlg.Run ();
+ }
}
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewLayoutDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewLayoutDialog.cs 2004-04-06 00:34:53 UTC (rev 1392)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewLayoutDialog.cs 2004-04-06 01:03:55 UTC (rev 1393)
@@ -10,7 +10,7 @@
namespace MonoDevelop.Gui.Dialogs
{
- public class NewLayoutDialog
+ public class NewLayoutDialog : IDisposable
{
IWorkbenchLayout wbLayout = WorkbenchSingleton.Workbench.WorkbenchLayout;
string[] existentLayouts;
@@ -35,6 +35,11 @@
existentLayouts = wbLayout.Layouts;
}
+ public void Dispose ()
+ {
+ newLayoutDialog.Dispose ();
+ }
+
void OnNameChanged (object obj, EventArgs args)
{
newButton.Sensitive = (layoutName.Text != "" &&
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TipOfTheDay.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TipOfTheDay.cs 2004-04-06 00:34:53 UTC (rev 1392)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TipOfTheDay.cs 2004-04-06 01:03:55 UTC (rev 1393)
@@ -10,15 +10,13 @@
using System.Xml;
using Gtk;
-using GtkSharp;
-
using MonoDevelop.Gui;
using MonoDevelop.Core.Properties;
using MonoDevelop.Core.Services;
namespace MonoDevelop.Gui.Dialogs
{
- public class TipOfTheDayWindow
+ public class TipOfTheDayWindow : IDisposable
{
ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService (typeof (IResourceService));
PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService (typeof (PropertyService));
@@ -58,6 +56,11 @@
tipTextview.Buffer.InsertAtCursor (tips[currentTip]);
}
+ public void Dispose ()
+ {
+ tipOfTheDayWindow.Dispose ();
+ }
+
private void ParseTips (XmlElement el)
{
StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService (typeof (StringParserService));
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ViewGPLDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ViewGPLDialog.cs 2004-04-06 00:34:53 UTC (rev 1392)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ViewGPLDialog.cs 2004-04-06 01:03:55 UTC (rev 1393)
@@ -14,7 +14,7 @@
namespace MonoDevelop.Gui.Dialogs
{
- public class ViewGPLDialog
+ public class ViewGPLDialog : IDisposable
{
[Glade.Widget] Gtk.TextView view;
[Glade.Widget] Gtk.Dialog GPLDialog;
@@ -36,6 +36,11 @@
}
}
+ public void Dispose ()
+ {
+ GPLDialog.Dispose ();
+ }
+
protected void OnCloseButtonClicked(object sender, EventArgs e)
{
GPLDialog.Hide();
More information about the Monodevelop-patches-list
mailing list