[Gambas-user] More on Print bugs.
Benoît Minisini
gambas at ...1...
Sun Jan 2 12:20:41 CET 2011
> Sorry about forgetting your previous advice. I moved house and was off
> air for 10 days. This problem is not unique to Gambas. Various other
> apps have the same problem and have been reported. Evince and Gimp
> overcome it by using the GTK+ "GtkPageSetupUnixDialog". I'm not sure how
> they then pass the information to the native print Dialog. The GTK+
> reference manual points out that they only use their
> GtkPrintUnixDialogif a native dialog does not exist.
> I am using Gambas3 V3425 with LibGTK2.0 V2.22.0 and Gambas2-GB-GTK
> V.2.21.0-1build1. Should I have a Gambas3-GB-GTK?
>
> As a work around I decided to use the QT4 library but this brought it's
> own set of problems. Using the code I previously supplied, on the line
> "Paint.Begin(hPrinter)" I get an error "Device already being painted".
> If I remove this line and the "Paint.End" line then the document will
> print in Landscape but the font is very, very small. I have to reset the
> font.size to 56 to get a size approximating 14.
> If I set a breakpoint on the Paint.Begin line and test for Paint.Device,
> it already knows that the device is my printer without it being set.
> I was under the impression that the Gambas code was portable between GTK
> or QT4 without major changes.
>
> As an experiment I also set the library back to GTK+ and ran the print
> module without any Paint.Begin or Paint.End lines. No errors reported.
>
> Sorry to keep on about this problem but I moved from Windows to Ubuntu
> and from .NET to Gambas2 and was delighted with the whole process. I
> think if Gambas3 is released for production in it's current form it will
> not improve it's reputation.
> Regards
>
> Michael
>
As I asked you before, are you sure that you run the latest revision?
I use the same system than you (Buggy Maverick, with GTK+ 2.22.0, but with
KDE). The GTK+ print dialog problem and the Qt printer font size problem have
been fixed for a while. I checked that with your example. And nobody else has
reported these problems since the fix.
As for Paint.Begin / Paint.End, you should not use them inside the Print
event.
And as for the Gambas 3 reputation if it will release now, the result will not
be worse than Vista, Ubuntu or Visual Basic. I'm not scared.
Regards,
--
Benoît Minisini
More information about the User
mailing list