[Monodevelop-patches-list] r1262 - in trunk/MonoDevelop/src/Main/Base: . Gui/Pads/ProjectBrowser/BrowserNode
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Fri Mar 26 17:53:14 EST 2004
Author: jluke
Date: 2004-03-26 17:53:13 -0500 (Fri, 26 Mar 2004)
New Revision: 1262
Modified:
trunk/MonoDevelop/src/Main/Base/ChangeLog
trunk/MonoDevelop/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/FileNode.cs
Log:
* Gui/Pads/ProjectBrowser/BrowserNode/FileNode.cs:
workaround/fix for #55185, a confusing message when
removing a file from a project, need to revisit it later
Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-03-26 22:32:45 UTC (rev 1261)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-03-26 22:53:13 UTC (rev 1262)
@@ -3,6 +3,9 @@
* Gui/Dialogs/SharpDevelopAboutPanels.cs:
enable copy button for assembly version info
fixes bug #55955
+ * Gui/Pads/ProjectBrowser/BrowserNode/FileNode.cs:
+ workaround/fix for #55185, a confusing message when
+ removing a file from a project, need to revisit it later
2004-03-25 Todd Berman <tberman at sevenl.net>
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/FileNode.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/FileNode.cs 2004-03-26 22:32:45 UTC (rev 1261)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/FileNode.cs 2004-03-26 22:53:13 UTC (rev 1262)
@@ -11,8 +11,8 @@
using System.Drawing;
using System.Collections.Specialized;
+using Gtk;
using MonoDevelop.Core.Properties;
-
using MonoDevelop.Core.Services;
using MonoDevelop.Services;
using MonoDevelop.Internal.Project;
@@ -142,14 +142,17 @@
ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
- Gtk.MessageDialog dialog = new Gtk.MessageDialog ((Gtk.Window)WorkbenchSingleton.Workbench, Gtk.DialogFlags.DestroyWithParent, Gtk.MessageType.Question, Gtk.ButtonsType.OkCancel, stringParserService.Parse(resourceService.GetString("ProjectComponent.RemoveFile.Question"), new string[,] { {"FILE", Path.GetFileName (((ProjectFile)userData).Name)}, {"PROJECT", Project.Name}}));
+ //FIXME: bug #55185
+ //Gtk.MessageDialog dialog = new Gtk.MessageDialog ((Gtk.Window)WorkbenchSingleton.Workbench, Gtk.DialogFlags.DestroyWithParent, Gtk.MessageType.Question, Gtk.ButtonsType.OkCancel, stringParserService.Parse(resourceService.GetString("ProjectComponent.RemoveFile.Question"), new string[,] { {"FILE", Path.GetFileName (((ProjectFile)userData).Name)}, {"PROJECT", Project.Name}}));
+ using (MessageDialog dialog = new Gtk.MessageDialog ((Window) WorkbenchSingleton.Workbench, DialogFlags.DestroyWithParent, MessageType.Question, ButtonsType.YesNo, String.Format ("Are you sure you want to remove {0} from the {1}?", Path.GetFileName (((ProjectFile)userData).Name), Project.Name))) {
- if (dialog.Run() != (int)Gtk.ResponseType.Ok) {
- dialog.Destroy ();
- return false;
+ if (dialog.Run() != (int)Gtk.ResponseType.Yes) {
+ dialog.Hide ();
+ return false;
+ }
+
+ dialog.Hide ();
}
-
- dialog.Destroy ();
//switch (sharpMessageBox.ShowMessageBox()) {
// case -1:
// case 2:
More information about the Monodevelop-patches-list
mailing list