diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-08-23 00:57:55 +0300 |
---|---|---|
committer | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-08-23 00:57:55 +0300 |
commit | 90ce7a22f51a11c28dafc49ae7381b341d6d19c4 (patch) | |
tree | 9ff33916a9688703985212cd68449f7487bae85e /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs | |
parent | 1b32232d97e3914a42402510bfc8de67955f0f24 (diff) |
[Ide] Remove numbering from recent file/project on mac
Bug 894 - Recent Files or Solutions numbered from 1 to 0
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs index 38d4b566a4..dd95a7feef 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs @@ -273,8 +273,12 @@ namespace MonoDevelop.Ide.Commands int i = 0; foreach (var ri in files) { - string acceleratorKeyPrefix = i < 10 ? "_" + ((i + 1) % 10).ToString() + " " : ""; - var cmd = new CommandInfo (acceleratorKeyPrefix + ri.DisplayName.Replace ("_", "__")) { + string commandText = ri.DisplayName.Replace ("_", "__"); + if (!Platform.IsMac) { + string acceleratorKeyPrefix = i < 10 ? "_" + ((i + 1) % 10).ToString() + " " : ""; + commandText = acceleratorKeyPrefix + commandText; + } + var cmd = new CommandInfo (commandText) { Description = GettextCatalog.GetString ("Open {0}", ri.FileName) }; /* Gdk.Pixbuf icon = DesktopService.GetIconForFile (ri.FileName, IconSize.Menu); @@ -347,13 +351,18 @@ namespace MonoDevelop.Ide.Commands LoggingService.LogWarning ("Error building recent solutions list", ex); continue; } - - string acceleratorKeyPrefix = i < 10 ? "_" + ((i + 1) % 10).ToString() + " " : ""; + + string commandText = ri.DisplayName.Replace ("_", "__"); + if (!Platform.IsMac) { + string acceleratorKeyPrefix = i < 10 ? "_" + ((i + 1) % 10).ToString() + " " : ""; + commandText = acceleratorKeyPrefix + commandText; + } + string str = GettextCatalog.GetString ("Load solution {0}", ri.ToString ()); if (IdeApp.Workspace.IsOpen) str += " - " + GettextCatalog.GetString ("Hold Control to open in current workspace."); - var cmd = new CommandInfo (acceleratorKeyPrefix + ri.DisplayName.Replace ("_", "__")) { + var cmd = new CommandInfo (commandText) { Icon = icon, Description = str, }; |