Merge pull request #4033 from ntherning/no-stdcall-for-icalls-on-windows-32-bit
[mono.git] / mcs / class / System.Drawing / System.Drawing.Printing / PrintingServicesUnix.cs
index 8e172ad3a4d57b404fd04d6528d289f3c0ccdf57..3386004199ab9f792f69a9357c0d9020317beda5 100644 (file)
@@ -299,6 +299,9 @@ namespace System.Drawing.Printing
                        CUPS_OPTIONS cups_options;
                        string option_name, option_value;
                        int cups_size = Marshal.SizeOf(typeof(CUPS_OPTIONS));
+
+                       LoadOptionList (ppd, "PageSize", paper_names, out defsize);
+                       LoadOptionList (ppd, "InputSlot", paper_sources, out defsource);
                        
                        for (int j = 0; j < numOptions; j++)
                        {
@@ -306,6 +309,8 @@ namespace System.Drawing.Printing
                                option_name = Marshal.PtrToStringAnsi(cups_options.name);
                                option_value = Marshal.PtrToStringAnsi(cups_options.val);
 
+                               if (option_name == "PageSize") defsize = option_value;
+                               else if (option_name == "InputSlot") defsource = option_value;
                                #if PrintDebug
                                Console.WriteLine("{0} = {1}", option_name, option_value);
                                #endif
@@ -314,9 +319,6 @@ namespace System.Drawing.Printing
 
                                options = (IntPtr) ((long)options + cups_size);
                        }
-                       
-                       LoadOptionList (ppd, "PageSize", paper_names, out defsize);
-                       LoadOptionList (ppd, "InputSlot", paper_sources, out defsource);
                }
                
                /// <summary>
@@ -923,6 +925,7 @@ namespace System.Drawing.Printing
 
                #endregion
 
+#pragma warning disable 649
                #region Struct
                public struct DOCINFO
                {
@@ -1035,6 +1038,7 @@ namespace System.Drawing.Printing
                }
                
                #endregion
+#pragma warning restore 649
        }
 
        class GlobalPrintingServicesUnix : GlobalPrintingServices