X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Drawing%2FSystem.Drawing.Printing%2FPrintingServicesUnix.cs;h=e9e90c3e8347d0c498f1d997071962524dcdc54b;hb=5317fbc0cd0146c84ffab2dc1776ec34cce859c0;hp=8e172ad3a4d57b404fd04d6528d289f3c0ccdf57;hpb=12461baf50da00c5d30f757af0e1891d7ebbef3b;p=mono.git diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrintingServicesUnix.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrintingServicesUnix.cs index 8e172ad3a4d..e9e90c3e834 100644 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrintingServicesUnix.cs +++ b/mcs/class/System.Drawing/System.Drawing.Printing/PrintingServicesUnix.cs @@ -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); } ///