[Monodevelop-patches-list] r2018 - in trunk/MonoDevelop/Core/src/Main/Base: . Commands Services/File Services/Project
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Tue Nov 2 15:51:47 EST 2004
Author: jluke
Date: 2004-11-02 15:51:47 -0500 (Tue, 02 Nov 2004)
New Revision: 2018
Modified:
trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
trunk/MonoDevelop/Core/src/Main/Base/Commands/MenuItemBuilders.cs
trunk/MonoDevelop/Core/src/Main/Base/Services/File/RecentOpen.cs
trunk/MonoDevelop/Core/src/Main/Base/Services/Project/DefaultProjectService.cs
Log:
* Services/File/RecentOpen.cs:
* Services/Project/DefaultProjectService:
* Commands/MenuItemBuilders.cs: display project name for projects
Modified: trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-11-02 20:26:35 UTC (rev 2017)
+++ trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-11-02 20:51:47 UTC (rev 2018)
@@ -5,6 +5,10 @@
among some other incremental improvements, should also fix bug #68999
* Commands/AutoStartCommands.cs: revert Todds workaround from yesterday
+ * Services/File/RecentOpen.cs:
+ * Services/Project/DefaultProjectService:
+ * Commands/MenuItemBuilders.cs: display project name for projects
+
2004-11-01 Fawad Halim <fawad at fawad.net>
* Internal/Parser/SharpAssemblyLayer/SharpAssemblyParameter.cs
Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/MenuItemBuilders.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/MenuItemBuilders.cs 2004-11-02 20:26:35 UTC (rev 2017)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/MenuItemBuilders.cs 2004-11-02 20:51:47 UTC (rev 2018)
@@ -13,20 +13,19 @@
using MonoDevelop.Core.AddIns;
using MonoDevelop.Core.AddIns.Codons;
using MonoDevelop.Core.AddIns.Conditions;
-
using MonoDevelop.Core.Properties;
using MonoDevelop.Core.Services;
-
using MonoDevelop.Services;
using MonoDevelop.Gui;
using MonoDevelop.Gui.Components;
using MonoDevelop.Gui.ErrorHandlers;
using MonoDevelop.Gui.Dialogs;
using MonoDevelop.Internal.Project;
-
using MonoDevelop.Internal.ExternalTool;
using MonoDevelop.Gui.Pads.ProjectBrowser;
+using Freedesktop.RecentFiles;
+
namespace MonoDevelop.Commands
{
@@ -97,9 +96,11 @@
RPMItem[] items = new RPMItem[recentOpen.RecentProject.Length];
for (int i = 0; i < recentOpen.RecentProject.Length; ++i) {
string accelaratorKeyPrefix = i < 10 ? "&" + ((i + 1) % 10).ToString() + " " : "";
- items[i] = new RPMItem(null, null, accelaratorKeyPrefix + recentOpen.RecentProject[i].ToString().Replace ("_", "__"), new EventHandler(LoadRecentProject));
- items[i].Tag = recentOpen.RecentProject[i].ToString();
- items[i].Description = String.Format (GettextCatalog.GetString ("load solution {0}"), recentOpen.RecentProject[i].ToString ());
+ RecentItem ri = recentOpen.RecentProject[i];
+ string label = ri.Private == null ? ri.ToString () : ri.Private;
+ items[i] = new RPMItem(null, null, accelaratorKeyPrefix + label.Replace ("_", "__"), new EventHandler(LoadRecentProject));
+ items[i].Tag = ri.ToString ();
+ items[i].Description = String.Format (GettextCatalog.GetString ("load solution {0}"), ri.ToString ());
}
return items;
}
Modified: trunk/MonoDevelop/Core/src/Main/Base/Services/File/RecentOpen.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Services/File/RecentOpen.cs 2004-11-02 20:26:35 UTC (rev 2017)
+++ trunk/MonoDevelop/Core/src/Main/Base/Services/File/RecentOpen.cs 2004-11-02 20:51:47 UTC (rev 2018)
@@ -71,6 +71,9 @@
UpdateLastProject ();
}
+ // FIXME: store the Project name also
+ // so we can optionally display in the menu
+ // filename [Project]
public void AddLastFile (string name)
{
recentFiles.AddWithLimit (new RecentItem (new Uri (name), Vfs.GetMimeType (name), "MonoDevelop Files"), "MonoDevelop Files", MAX_LENGTH);
@@ -91,9 +94,12 @@
OnRecentProjectChange();
}
- public void AddLastProject (string name)
+ public void AddLastProject (string uri, string projectName)
{
- recentFiles.AddWithLimit (new RecentItem (new Uri (name), Vfs.GetMimeType (name), "MonoDevelop Projects"), "MonoDevelop Projects", MAX_LENGTH);
+
+ RecentItem ri = new RecentItem (new Uri (uri), Vfs.GetMimeType (uri), "MonoDevelop Projects");
+ ri.Private = projectName;
+ recentFiles.AddWithLimit (ri, "MonoDevelop Projects", MAX_LENGTH);
UpdateLastProject ();
}
Modified: trunk/MonoDevelop/Core/src/Main/Base/Services/Project/DefaultProjectService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Services/Project/DefaultProjectService.cs 2004-11-02 20:26:35 UTC (rev 2017)
+++ trunk/MonoDevelop/Core/src/Main/Base/Services/Project/DefaultProjectService.cs 2004-11-02 20:51:47 UTC (rev 2018)
@@ -177,7 +177,7 @@
openCombineFileName = filename;
IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
- fileService.RecentOpen.AddLastProject(filename);
+ fileService.RecentOpen.AddLastProject (filename, openCombine.Name);
OnCombineOpened(new CombineEventArgs(openCombine));
openCombine.FileAddedToProject += new ProjectFileEventHandler (NotifyFileAddedToProject);
More information about the Monodevelop-patches-list
mailing list