[Monodevelop-patches-list] r1404 - in trunk/MonoDevelop: build/AddIns src/AddIns/DisplayBindings/SourceEditor/Search src/Main/Base src/Main/Base/Commands src/Main/Base/Gui/Pads
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Tue Apr 6 21:24:27 EDT 2004
Author: tberman
Date: 2004-04-06 21:24:27 -0400 (Tue, 06 Apr 2004)
New Revision: 1404
Modified:
trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin.xml
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Search/SearchReplaceManager.cs
trunk/MonoDevelop/src/Main/Base/ChangeLog
trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs
trunk/MonoDevelop/src/Main/Base/Gui/Pads/FileScout.cs
Log:
move to a single open menuitem...
Modified: trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin.xml
===================================================================
--- trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin.xml 2004-04-06 22:56:20 UTC (rev 1403)
+++ trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin.xml 2004-04-07 01:24:27 UTC (rev 1404)
@@ -540,7 +540,7 @@
class = "MonoDevelop.Commands.CreateNewProject"/>
</MenuItem>
- <MenuItem id = "Open" _label = "Open">
+ <!-- <MenuItem id = "Open" _label = "Open">
<MenuItem id = "File"
_label = "File..."
icon = "Icons.16x16.OpenFileIcon"
@@ -554,7 +554,12 @@
description = "${res:XML.MainMenu.FileMenu.Open.Project.Description}"
shortcut = "Control|Shift|O"
class = "MonoDevelop.Commands.OpenCombine"/>
- </MenuItem>
+ </MenuItem> -->
+
+ <MenuItem id = "Open" _label = "Open..."
+ icon = "Icons.16x16.OpenFileIcon"
+ shortcut = "Control|O"
+ class = "MonoDevelop.Commands.OpenFile"/>
<MenuItem id = "Close" _label = "Close">
<Conditional activewindow="*" action="Disable">
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Search/SearchReplaceManager.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Search/SearchReplaceManager.cs 2004-04-06 22:56:20 UTC (rev 1403)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Search/SearchReplaceManager.cs 2004-04-07 01:24:27 UTC (rev 1404)
@@ -163,13 +163,7 @@
ISearchResult result = find.FindNext(searchOptions);
if (result == null) {
- ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
- //FIXME: This needs to be a msg or whatever
- /*MessageBox.Show((Form)WorkbenchSingleton.Workbench,
- resourceService.GetString("Dialog.NewProject.SearchReplace.SearchStringNotFound"),
- "Not Found",
- MessageBoxButtons.OK,
- MessageBoxIcon.Information);*/
+ ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
MessageService.ShowMessage (GettextCatalog.GetString ("Not Found"));
find.Reset();
} else {
@@ -180,7 +174,7 @@
}
int startPos = Math.Min(textArea.Buffer.Text.Length, Math.Max(0, result.Offset));
int endPos = Math.Min(textArea.Buffer.Text.Length, startPos + result.Length);
- textArea.Buffer.MoveMark ("insert", textArea.Buffer.GetIterAtOffset (endPos));
+ textArea.Buffer.MoveMark ("insert", textArea.Buffer.GetIterAtOffset (endPos));
textArea.Buffer.MoveMark ("selection_bound", textArea.Buffer.GetIterAtOffset (startPos));
textArea.View.ScrollMarkOnscreen (textArea.Buffer.InsertMark);
}
Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-04-06 22:56:20 UTC (rev 1403)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-04-07 01:24:27 UTC (rev 1404)
@@ -1,5 +1,11 @@
2004-04-06 Todd Berman <tberman at sevenl.net>
+ * Commands/FileCommands.cs: Combine the open solution/file into one
+ open... command
+ * Gui/Pads/FileScout.cs: add .ToUpper () to catch .pRjx, etc.
+
+2004-04-06 Todd Berman <tberman at sevenl.net>
+
* Commands/MenuItemBuilders.cs: change to use alt instead of control
for a more 'gnomey' feel.
Modified: trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs 2004-04-06 22:56:20 UTC (rev 1403)
+++ trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs 2004-04-07 01:24:27 UTC (rev 1404)
@@ -242,9 +242,11 @@
case ".CMBX": // Don't forget the 'recent' projects if you chance something here
case ".PRJX":
IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
-
+
try {
- projectService.OpenCombine(name);
+ //projectService.OpenCombine(name);
+ IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IFileService));
+ fileService.OpenFile(name);
} catch (Exception ex) {
CombineLoadError.HandleError(ex, name);
}
@@ -309,7 +311,16 @@
if (response == (int)Gtk.ResponseType.Ok) {
IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IFileService));
+ IProjectService proj = (IProjectService)ServiceManager.Services.GetService (typeof (IProjectService));
+ switch (System.IO.Path.GetExtension (name).ToUpper()) {
+ case ".PRJX":
+ case ".CMBX":
+ proj.OpenCombine (name);
+ break;
+ default:
fileService.OpenFile(name);
+ break;
+ }
}
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Pads/FileScout.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Pads/FileScout.cs 2004-04-06 22:56:20 UTC (rev 1403)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Pads/FileScout.cs 2004-04-07 01:24:27 UTC (rev 1404)
@@ -413,7 +413,7 @@
//FIXME: use mimetypes not extensions
// also change to Project tab when its a project
- switch (System.IO.Path.GetExtension (item.FullName)) {
+ switch (System.IO.Path.GetExtension (item.FullName).ToUpper ()) {
case ".cmbx":
case ".prjx":
projectService.OpenCombine (item.FullName);
More information about the Monodevelop-patches-list
mailing list