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 559914 - eog doesn't apply paper setup.
eog doesn't apply paper setup.
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
2.14.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
: 558969 567806 573519 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-11-08 17:30 UTC by Achim Frase
Modified: 2009-03-19 13:14 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
paper size conversion patch (820 bytes, patch)
2008-12-02 16:34 UTC, Marek Kašík
committed Details | Review

Description Achim Frase 2008-11-08 17:30:17 UTC
Please describe the problem:
eog changes the paper size after I have applied my settings.

Steps to reproduce:
1. Open an image
2. Change the page setup (use a tear-off borders format)
3. Take a second look in the page setup an you will see that eog has changed the settings to a smaller page size.


Actual results:
You will see that eog doesn't apply the page setup correctly.

Expected results:
eog should use my page setup.

Does this happen every time?
This happens very time.

Other information:
This is a regression, I hadn't that problem with eog 2.22.
Comment 1 Achim Frase 2008-11-08 17:32:54 UTC
I have also reported this problem in launchpad.

https://bugs.launchpad.net/eog/+bug/295643

Regards
Achim
Comment 2 Felix Riemann 2008-11-09 11:56:12 UTC
Confirming.
As I can reproduce it with gedit as well, I suppose this is a GtkPrint issue.

Note that you need to restart gedit to see the effect. So, it might have something to do with saving and loading the page settings from file (which gedit only does on startup,but eog every time the dialog is opened).

Reassigning.
Comment 3 Felix Riemann 2008-11-09 12:02:56 UTC
(In reply to comment #2)
> So, it might have
> something to do with saving and loading the page settings from file (which
> gedit only does on startup,but eog every time the dialog is opened).
> 

Seems like it. I augmented the eog's page setup reading function and got the following output:
"Keyfile: 101,60 - PageSetup: 53,76"
The left value shows the value when using g_key_file API to read the paper width from the keyfile while the right value shows what I get when using gtk_page_setup_get_paper_width().

The keyfile value matches with the value that is shown in the dialog when setting the paper size, while right value matches the displayed value when I reopen the dialog afterwards.

Comment 4 Marek Kašík 2008-12-02 16:34:53 UTC
Created attachment 123808 [details] [review]
paper size conversion patch

Hi,
there is a problem in the function gtk_paper_size_new_from_key_file(), which calls gtk_paper_size_new_from_ppd(). This function expects width and height in points, but it is called with width and height in mm.
Patch is attached.

  Very nice bug :)

    Marek
Comment 5 Matthias Clasen 2008-12-02 16:54:42 UTC
Yeah, looks right to me, considering we do

  g_key_file_set_double (key_file, group_name,
                         "Width", gtk_paper_size_get_width (size, GTK_UNIT_MM));
  g_key_file_set_double (key_file, group_name,
                         "Height", gtk_paper_size_get_height (size, GTK_UNIT_MM));


when saving them 
Comment 6 Marek Kašík 2008-12-03 14:09:34 UTC
*** Bug 558969 has been marked as a duplicate of this bug. ***
Comment 7 Michael Natterer 2009-01-22 14:59:53 UTC
*** Bug 567806 has been marked as a duplicate of this bug. ***
Comment 8 Marek Kašík 2009-03-19 13:14:40 UTC
*** Bug 573519 has been marked as a duplicate of this bug. ***