I have modified some code involving the print dialog and the printer settings on Linux. Whoever is interested in the details of this, please give feedback. I have made these changes in order to install Linux/Chromium onto an in-store kiosk for customers to place orders.
This is a Linux-only modification because the print dialog and print settings on Linux do not go through the same code paths as the Mac OS X and Windows builds appear to do. Here is a summary of my changes and ideas: 1) If --kiosk is passed at the command-line, I assume the desired printer (GtkPrinter), print settings (GtkPrintSettings), and print setup (GtkPageSetup) are configured from other command-line switches. I am considering using a separate switch such as --supress-print- dialog, since kiosk mode and suppressing the print dialog are orthogonal features. 2) The command-line switches for the printer and its print settings are prefixed with --print-settings. The printer name is specified with --print-settings-printer. Since every printer may have different settings, the set of switches will differ for each printer. For example, "Print to file" may be specified as the printer name. If it is, then --print-settings-output is a valid option. For a physical printer, there are switches for things like opening a cash drawer, the pulse width, and so on. It does seem a little odd to break from the norm where command-line switches are static and well-documented in the switches source files. I had to add a function to CommandLine in order to enumerate the switches and look for ones with a particular prefix (--print- settings). Thoughts? 3) The switches for the page setup are prefixed with --page-setup and are not variable, since they map directly to member properties of the GtkPageSetup class. These are things like paper width and orientation. 4) WISH: Instead of putting this massive list of switches on the command-line, using an about:config seems ideal. Has anyone started this? 5) WISH: Ultimately, the linux code should be merged with the other platforms so that these new features could be shared. I do not have chromium building on Mac OS X or Windows. Can someone confirm that it is true that these code paths are not merged? I noticed that on these other platforms, there is functionality related to asking the user for the settings or using the default. Is this related to the feature I'm attempting to add? Thanks in advance for any guidance. Andy -- Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev