Author: lluis
Date: 2005-11-17 05:55:56 -0500 (Thu, 17 Nov 2005)
New Revision: 53163
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.CodeTemplates/CodeTemplateLoader.cs
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ToolLoader.cs
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/DirtyFilesDialog.cs
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Search/ForwardTextIterator.cs
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ProjectOperations.cs
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs
Log:
2005-11-17 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* MonoDevelop.Ide.CodeTemplates/CodeTemplateLoader.cs:
* MonoDevelop.Ide.ExternalTools/ToolLoader.cs:
* MonoDevelop.Ide.Gui.Dialogs/DirtyFilesDialog.cs:
* MonoDevelop.Ide.Gui/Document.cs:
* MonoDevelop.Ide.Gui/ProjectOperations.cs:
* MonoDevelop.Ide.Gui/Workbench.cs:
* MonoDevelop.Ide.Gui/DefaultWorkbench.cs:
Removed useless Observed* calls.
* MonoDevelop.Ide.Gui.Search/ForwardTextIterator.cs: Place the position
after the replaced text. Fixes bug #76728.
Modified: trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog 2005-11-17
10:11:15 UTC (rev 53162)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog 2005-11-17
10:55:56 UTC (rev 53163)
@@ -1,3 +1,17 @@
+2005-11-17 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * MonoDevelop.Ide.CodeTemplates/CodeTemplateLoader.cs:
+ * MonoDevelop.Ide.ExternalTools/ToolLoader.cs:
+ * MonoDevelop.Ide.Gui.Dialogs/DirtyFilesDialog.cs:
+ * MonoDevelop.Ide.Gui/Document.cs:
+ * MonoDevelop.Ide.Gui/ProjectOperations.cs:
+ * MonoDevelop.Ide.Gui/Workbench.cs:
+ * MonoDevelop.Ide.Gui/DefaultWorkbench.cs:
+ Removed useless Observed* calls.
+
+ * MonoDevelop.Ide.Gui.Search/ForwardTextIterator.cs: Place the position
+ after the replaced text. Fixes bug #76728.
+
2005-11-16 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* options/DefaultEditingLayout.xml: Updated with the new pad names.
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.CodeTemplates/CodeTemplateLoader.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.CodeTemplates/CodeTemplateLoader.cs
2005-11-17 10:11:15 UTC (rev 53162)
+++
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.CodeTemplates/CodeTemplateLoader.cs
2005-11-17 10:55:56 UTC (rev 53163)
@@ -86,7 +86,7 @@
doc.DocumentElement.AppendChild(codeTemplateGroup.ToXmlElement(doc));
}
- Runtime.FileUtilityService.ObservedSave(new
NamedFileOperationDelegate(doc.Save), fileName,
FileErrorPolicy.ProvideAlternative);
+ doc.Save (fileName);
}
/// <summary>
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ToolLoader.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ToolLoader.cs
2005-11-17 10:11:15 UTC (rev 53162)
+++
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ToolLoader.cs
2005-11-17 10:55:56 UTC (rev 53163)
@@ -65,8 +65,8 @@
foreach (ExternalTool et in tool) {
doc.DocumentElement.AppendChild(et.ToXmlElement(doc));
}
-
- Runtime.FileUtilityService.ObservedSave(new
NamedFileOperationDelegate(doc.Save), fileName,
FileErrorPolicy.ProvideAlternative);
+
+ doc.Save (fileName);
}
/// <summary>
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs
2005-11-17 10:11:15 UTC (rev 53162)
+++
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs
2005-11-17 10:55:56 UTC (rev 53163)
@@ -308,7 +308,7 @@
// check the file name length because it could be more
than the maximum length of a file name
string fullFileName = directory +
System.IO.Path.DirectorySeparatorChar + fileName;
if
(Runtime.FileUtilityService.IsValidFileName(fullFileName)) {
- Runtime.FileUtilityService.ObservedSave(new
NamedFileOperationDelegate(doc.Save), fullFileName,
FileErrorPolicy.ProvideAlternative);
+ doc.Save (fullFileName);
}
}
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
2005-11-17 10:11:15 UTC (rev 53162)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
2005-11-17 10:55:56 UTC (rev 53163)
@@ -110,9 +110,9 @@
string fileName =
Window.ViewContent.ContentName;
// save backup first
if((bool)
Runtime.Properties.GetProperty ("SharpDevelop.CreateBackupCopy", false)) {
-
Runtime.FileUtilityService.ObservedSave (new
NamedFileOperationDelegate(Window.ViewContent.Save), fileName + "~");
+ Window.ViewContent.Save
(fileName + "~");
}
- Runtime.FileUtilityService.ObservedSave
(new NamedFileOperationDelegate(Window.ViewContent.Save), fileName);
+ Window.ViewContent.Save (fileName);
OnSaved (EventArgs.Empty);
}
}
@@ -153,13 +153,12 @@
}
// save backup first
if((bool) Runtime.Properties.GetProperty
("SharpDevelop.CreateBackupCopy", false)) {
- Runtime.FileUtilityService.ObservedSave (new
NamedFileOperationDelegate(Window.ViewContent.Save), filename + "~");
+ Window.ViewContent.Save (filename + "~");
}
// do actual save
- if (Runtime.FileUtilityService.ObservedSave (new
NamedFileOperationDelegate(Window.ViewContent.Save), filename) ==
FileOperationResult.OK) {
- IdeApp.Workbench.RecentOpen.AddLastFile
(filename, null);
- }
+ Window.ViewContent.Save (filename);
+ IdeApp.Workbench.RecentOpen.AddLastFile (filename,
null);
OnSaved (EventArgs.Empty);
}
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ProjectOperations.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ProjectOperations.cs
2005-11-17 10:11:15 UTC (rev 53162)
+++
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ProjectOperations.cs
2005-11-17 10:55:56 UTC (rev 53163)
@@ -627,7 +627,7 @@
propertynode.AppendChild(properties.ToXmlElement(doc));
- Runtime.FileUtilityService.ObservedSave(new
NamedFileOperationDelegate(doc.Save), directory + Path.DirectorySeparatorChar +
combine.Name + ".xml", FileErrorPolicy.ProvideAlternative);
+ doc.Save (directory + Path.DirectorySeparatorChar +
combine.Name + ".xml");
}
public IAsyncOperation Execute (CombineEntry entry)
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs
2005-11-17 10:11:15 UTC (rev 53162)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs
2005-11-17 10:55:56 UTC (rev 53163)
@@ -231,7 +231,7 @@
}
}
- IProgressMonitor pm =
ProgressMonitors.GetStatusProgressMonitor (string.Format
(GettextCatalog.GetString ("Opening {0}"), fileName), Stock.OpenFileIcon,
false);
+ IProgressMonitor pm =
ProgressMonitors.GetStatusProgressMonitor (string.Format
(GettextCatalog.GetString ("Opening {0}"), fileName), Stock.OpenFileIcon, true);
FileInformation openFileInfo = new FileInformation();
openFileInfo.ProgressMonitor = pm;
openFileInfo.FileName = fileName;
@@ -325,7 +325,7 @@
}
} else {
-
Runtime.FileUtilityService.ObservedSave(new
FileOperationDelegate(window.ViewContent.Save), window.ViewContent.ContentName
, FileErrorPolicy.ProvideAlternative);
+ window.ViewContent.Save
(window.ViewContent.ContentName);
}
}
}
@@ -376,7 +376,7 @@
return;
}
}
- } else
+ }
if (!File.Exists (fileName)) {
monitor.ReportError
(string.Format (GettextCatalog.GetString ("File not found: {0}"), fileName),
null);
return;
@@ -405,15 +405,15 @@
if (combine != null && project != null)
{
- if
(Runtime.FileUtilityService.ObservedLoad(new NamedFileOperationDelegate(new
LoadFileWrapper (workbench, binding, project, oFileInfo).Invoke), fileName) ==
FileOperationResult.OK) {
- RecentOpen.AddLastFile
(fileName, project.Name);
- }
+ LoadFileWrapper fw = new
LoadFileWrapper (workbench, binding, project, oFileInfo);
+ fw.Invoke (fileName);
+ RecentOpen.AddLastFile
(fileName, project.Name);
}
else
{
- if
(Runtime.FileUtilityService.ObservedLoad(new NamedFileOperationDelegate(new
LoadFileWrapper (workbench, binding, null, oFileInfo).Invoke), fileName) ==
FileOperationResult.OK) {
- RecentOpen.AddLastFile
(fileName, null);
- }
+ LoadFileWrapper fw = new
LoadFileWrapper (workbench, binding, null, oFileInfo);
+ fw.Invoke (fileName);
+ RecentOpen.AddLastFile
(fileName, null);
}
} else {
try {
@@ -425,9 +425,9 @@
Gnome.Url.Show
("file://" + fileName);
//}
} catch {
- if
(Runtime.FileUtilityService.ObservedLoad(new NamedFileOperationDelegate (new
LoadFileWrapper (workbench, Services.DisplayBindings.LastBinding, null,
oFileInfo).Invoke), fileName) == FileOperationResult.OK) {
- RecentOpen.AddLastFile
(fileName, null);
- }
+ LoadFileWrapper fw = new
LoadFileWrapper (workbench, Services.DisplayBindings.LastBinding, null,
oFileInfo);
+ fw.Invoke (fileName);
+ RecentOpen.AddLastFile
(fileName, null);
}
}
}
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/DirtyFilesDialog.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/DirtyFilesDialog.cs
2005-11-17 10:11:15 UTC (rev 53162)
+++
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/DirtyFilesDialog.cs
2005-11-17 10:55:56 UTC (rev 53163)
@@ -102,7 +102,7 @@
{
tsFiles.Foreach (new TreeModelForeachFunc
(CollectWorkbenches));
foreach (SdiWorkspaceWindow window in
arrSaveWorkbenches) {
- Runtime.FileUtilityService.ObservedSave(new
FileOperationDelegate(window.ViewContent.Save), window.ViewContent.ContentName
, FileErrorPolicy.ProvideAlternative);
+ window.ViewContent.Save
(window.ViewContent.ContentName);
}
Respond (Gtk.ResponseType.Ok);
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Search/ForwardTextIterator.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Search/ForwardTextIterator.cs
2005-11-17 10:11:15 UTC (rev 53162)
+++
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Search/ForwardTextIterator.cs
2005-11-17 10:55:56 UTC (rev 53163)
@@ -172,7 +172,7 @@
endOffset = endOffset - length + pattern.Length;
}
- currentOffset = currentOffset - length + pattern.Length;
+ currentOffset += pattern.Length;
}
public virtual bool SupportsSearch (SearchOptions options, bool
reverse)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches