lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Default printer paper size inappropriate for US


From: Evgeniy Tarassov
Subject: Re: [lmi] Default printer paper size inappropriate for US
Date: Thu, 16 Nov 2006 14:48:11 +0100

On 11/15/06, Greg Chicares <address@hidden> wrote:
Apparently wx defaults to 'A4', while our country uses
something a little different. Rick suggests:

diff --unified=2 --recursive --unidirectional-new-file 
c:/opt/lmi/src/Oldsource/illustration_view.cpp 
c:/opt/lmi/src/Newsource/illustration_view.cpp
--- c:/opt/lmi/src/Oldsource/illustration_view.cpp      Mon Nov 13 10:33:50 2006
+++ c:/opt/lmi/src/Newsource/illustration_view.cpp      Wed Nov 15 12:39:50 2006
@@ -303,4 +303,7 @@
     if(e_print_printer == option)
         {
+        wxPrintData *printer_settings = printer->GetPrintData();
+        // Default to 8.5 X 11 Letter Size
+        printer_settings->SetPaperId(wxPAPER_LETTER);
         printer->PrintText(selected_values_as_html_.c_str());
         }

and I wanted to bring that onto the mailing list for
discussion. Evgeniy, what do you think? [Please copy
Rick on your response because his mailserver is poor
at delivering list traffic to him.]

wxWidgets does ignore system printer settings and defaults to A4. I
hope it will soon be fixed in wx MAIN and could be applied as a patch
for lmi's wx version.

I suppose something like this is okay for our pending
release, but what's the best long-term solution? Is
this somehow globally configurable in wx? If not, then
should it be? Should we add something to our own wxApp
derivative?

A separate question: should it be a persistent setting
that wx automatically saves whenever a user changes it?

wxWidgets printing facilities do not store any persistent settings,
which means that whatever user changes will be discarded and replaced
by the default values during the next run. That is the usual behaviour
for most of the programs.

If we want to persist the printing properties for lmi then we should
either store it in configurable_settings, or save it using wxWidgets
configuration tools (could be registry on windows and ini file on
unix). These settings could also be embed in the document files as it
is done in most text editors, but i guess that when it comes to lmi
the printer settings belong to user preferences.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]