diff options
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 | 21 |
1 files changed, 15 insertions, 6 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..cba2475b4a 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs @@ -79,7 +79,7 @@ namespace MonoDevelop.Ide.Commands { protected override void Run () { - var dlg = new OpenFileDialog (GettextCatalog.GetString ("File to Open"), Gtk.FileChooserAction.Open) { + var dlg = new OpenFileDialog (GettextCatalog.GetString ("File to Open"), MonoDevelop.Components.FileChooserAction.Open) { TransientFor = IdeApp.Workbench.RootWindow, ShowEncodingSelector = true, ShowViewerSelector = true, @@ -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, }; |