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 | |
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')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml | 11 | ||||
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs | 10 |
2 files changed, 11 insertions, 10 deletions
diff --git a/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml b/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml index 5afdda97da..36e512a3b2 100644 --- a/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml +++ b/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml @@ -24,13 +24,10 @@ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.SaveAs" /> <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.SaveAll" /> <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.ReloadFile" /> - <!-- Disabled printing on windows because gtk# printing support is broken on that platform. --> - <Condition id = "Platform" value = "!windows"> - <SeparatorItem id = "SaveSeparator" /> - <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.PrintPageSetup" /> - <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.PrintPreviewDocument" /> - <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.PrintDocument" /> - </Condition> + <SeparatorItem id = "SaveSeparator" /> + <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.PrintPageSetup" /> + <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.PrintPreviewDocument" /> + <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.PrintDocument" /> <SeparatorItem id = "RecentSeparator" /> <ItemSet id = "RecentFiles" _label = "Recent _Files"> <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.RecentFileList" /> 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; + } } } |