diff options
author | Michael Hutchinson <mhutch@xamarin.com> | 2013-06-08 05:51:21 +0400 |
---|---|---|
committer | Michael Hutchinson <mhutch@xamarin.com> | 2013-06-11 19:49:49 +0400 |
commit | 3d5f584e6991e97b6b9d02b79e7d7d58f2257e24 (patch) | |
tree | afa7395ecc80a650e671bb90f4d9e33f47d1fbf0 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs | |
parent | 9281b3787d93810df94bd2be9dd99d64108e48dc (diff) |
[Ide] Re-enable printing on Win32
It works now we have a STA main thread.
Print Preview is still broken.
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 | 10 |
1 files changed, 7 insertions, 3 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 c816b7357e..78bdb5f2e2 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs @@ -218,9 +218,7 @@ namespace MonoDevelop.Ide.Commands internal static bool CanPrint () { IPrintable print; - //HACK: disable printing on Windows while it doesn't work - return !Platform.IsWindows - && IdeApp.Workbench.ActiveDocument != null + return IdeApp.Workbench.ActiveDocument != null && (print = IdeApp.Workbench.ActiveDocument.GetContent<IPrintable> ()) != null && print.CanPrint; } @@ -236,6 +234,12 @@ namespace MonoDevelop.Ide.Commands protected override void Update (CommandInfo info) { info.Enabled = PrintHandler.CanPrint (); + + //HACK: disable print preview on Win32 because it doesn't work + if (Platform.IsWindows) { + info.Enabled = false; + info.Visible = false; + } } } |