Print drivers

Olly Betts olly@survex.com
Mon, 5 Apr 2004 01:31:24 +0100


On Sat, Apr 03, 2004 at 08:38:04PM +0100, Phil Underwood wrote:
> Give an option to "print it how it looks on the main screen"
> -this seems to be the thing everyone wants. Coming soon...

Thanks Phil.  I've merged the changes in.  I've put the changes in CVS
yet, and it's time I went to bed - I'll sort that out tomorrow.

Also fixed it up so you get the same view (bearing, tilt, and
legs/names/crosses/surface bits displayed).  I've not done anything
towards transfering the window bounds (for "print what I can see here").

> Enable I18N support - I don't understand how it works in survex, so I've
> just put everything in as static strings. This is obviously wrong, and I
> hope I can get some directions as what to do. Most of the strings I want
> have already got translations, I think...

Each message has a number - you put the message in lib/messages.txt and
use msg(N) to get the message in the code.  I also put the message
itself in as a comment like so: msg(/*mud*/77) (without any extra
whitespace or line breaks) which makes the code easier to follow.  And
there's a perl script which checks the commented messages match those in
the message file.

I've made a start on transferring the messages to the file.  I'll do the
rest tomorrow.

> General tidying up of the user interface - I think I need to redesign
> the print dialog a bit - wxWindows seems very keen to bring up a further
> print dialog box with page range and print to file options. I think I'll
> just use this, so we'd have a two stage print dialog:
> 
>   svxPrintDialog - choose scale, view angle, which bits (legs etc)
>   wxPrintDialog - choose which pages, print to file etc...

I don't get the second one (on Linux with wxGTK).  I just get a
"printing" progress box which soon disappears, leaving me at the
svxPrintDialog (I think this dialog should probably close after
printing).

Other problems I've noticed:

* Selecting "10%" in the preview window causes a "Bad memory access".
  Choosing a scale greater than the default seems OK.

* The preview window is convinced there are 32000 pages, but will only
  let me look at page 1.

* The preview window doesn't open at a sensible size, and the virtual
  size is much too large.

* Selecting "Landscape" in "File->Page Setup" doesn't change the
  orientation in the preview window.

Cheers,
    Olly