[mono/monodevelop] 3ceed28b: Fixed 'Bug 15435 - Printing problem'.

Mike Krüger ([email protected]) <[email protected]>
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <00000141e90a3044-e42ca69b-eb57-4c39-a7d5-e2e6ac96dac0-000000@email.amazonses.com>
   Branch: refs/heads/master
     Home: https://github.com/mono/monodevelop
  Compare: https://github.com/mono/monodevelop/compare/5837332ce239...3ceed28b8a85

   Commit: 3ceed28b8a851e2d194e7b86aa249da45b18d150
   Author: Mike Krüger <[email protected]> (mkrueger)
     Date: 2013-10-24 05:56:01 GMT
      URL: https://github.com/mono/monodevelop/commit/3ceed28b8a851e2d194e7b86aa249da45b18d150

Fixed 'Bug 15435 - Printing problem'.
Printing doesn't seem to work on windows without the [STAThread]
attribute.

Changed paths:
  M main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml
  M main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs

Modified: main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml
===================================================================
@@ -24,10 +24,12 @@
 		<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.SaveAs" />
 		<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.SaveAll" />
 		<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.ReloadFile" />
-		<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 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 = "RecentSeparator" />
 		<ItemSet id = "RecentFiles" _label = "Recent _Files">
 			<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.RecentFileList" />

Modified: main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs
===================================================================
@@ -217,6 +217,9 @@ protected override void Update (CommandInfo info)
 		
 		internal static bool CanPrint ()
 		{
+			if (Platform.IsWindows)
+				return false;
+
 			IPrintable print;
 			return IdeApp.Workbench.ActiveDocument != null
 				&& (print = IdeApp.Workbench.ActiveDocument.GetContent<IPrintable> ()) != null
_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.