After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 541168 - Printing Scales Incorrectly?
Printing Scales Incorrectly?
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: [obsolete] Backend:Mozilla
2.22.x
Other Linux
: Normal major
: gnome-2-22
Assigned To: Epiphany Maintainers
Epiphany Maintainers
: 541580 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-07-02 04:27 UTC by Paul Drain
Modified: 2008-07-04 19:12 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Patch fixing the bug (926 bytes, patch)
2008-07-02 04:31 UTC, Paul Drain
committed Details | Review

Description Paul Drain 2008-07-02 04:27:11 UTC
I ran across the bug:

https://bugs.launchpad.net/ubuntu/+source/epiphany-browser/+bug/217151/

and did a little bit of digging, and I think there's an issue with the way gtk_print_settings_set_scale works in embed/mozilla/GeckoPrintService.cpp

Line 737-739 states:

  /* FIXME: only if GTK_PRINT_CAPABILITY_SCALE is not set? */
  aSettings->SetScaling (gtk_print_settings_get_scale (aGtkSettings) / 100.0);
  gtk_print_settings_set_scale (aGtkSettings, 1.0);

But, http://library.gnome.org/devel/gtk/unstable/GtkPrintSettings.html#gtk-print-settings-set-scale states:

" scale : the scale in percent "

So, doesn't that mean:

  gtk_print_settings_set_scale (aGtkSettings, 1.0);

should be:

  gtk_print_settings_set_scale (aGtkSettings, 100.0);

Which fixes the bug for me, and makes pages in Epiphany print the same as they would in Firefox.
Comment 1 Paul Drain 2008-07-02 04:31:10 UTC
Created attachment 113829 [details] [review]
Patch fixing the bug

Changes 1.0 to 100.0, which makes Scale read 100% (and work) in the Print Preview Dialogue.
Comment 2 Cosimo Cecchi 2008-07-02 13:35:58 UTC
This looks fine to me, except that I don't think the change is worth a comment in the source code.
Anyway, let's wait for Christian's ACK on the patch :)
Comment 3 Christian Persch 2008-07-02 13:55:35 UTC
Right, no need for the comment. Please commit to the gnome-2-22 branch.
Comment 4 Cosimo Cecchi 2008-07-02 16:09:52 UTC
Paul, thanks for the patch. I committed it, closing as FIXED.

------------------------------------------------------------------------
r8330 | cosimoc | 2008-07-02 18:08:55 +0200 (Wed, 02 Jul 2008) | 3 lines

Use percentage instead of value when calling gtk_print_settings_set_scale.
Patch by Paul Drain. (#541168).
Comment 5 Cosimo Cecchi 2008-07-04 19:12:02 UTC
*** Bug 541580 has been marked as a duplicate of this bug. ***