Re: [PATCH] Inconsistent read/write of a GtkPaperSize to GKeyFile



Andrea wrote:
> Hi,
> 
> I've been chasing a bug in GIMP for a few days
> http://bugzilla.gnome.org/show_bug.cgi?id=567806
> 
> and I have finally found what the problem is.
> 
> Basically when I write and read a GtkPaperSize to a GKeyFile
> 
> gtk_paper_size_to_key_file
> gtk_paper_size_new_from_key_file
> 
> I get different sizes.
> 
> This happens only for some paper sizes (the non standard I guess) e.g. the photo paper.
> 
> The problem is that
> 
> the sizes are written in unit = GTK_UNIT_MM (in gtkpapersize.c:916)
> and read as GTK_UNIT_POINTS (in gtk_paper_size_new_from_ppd() in gtkpapersize.c:311)
> 
> This does not happens always, because if the ppd name is recognized as a standard value (in
> gtk_paper_size_new_from_ppd()), the code follows a different path.
> 
> I attach a patch to fix the way values as read (MM rather than POINTS).
> I have not tested it yet (I need to recompile GTK's rpm source), but I am pretty confident.
> 
> I am using gtk 2.12.12 on a Fedora 9.
> The same happens on Fedora 10 gtk 2.14.5.
> I could not test the latest svn, but just reading the code in trunk I've observed the same.
> 
> The line numbers are for trunk.
> 
> Hope I have not misunderstood everything.
> 
> Andrea
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Hi Andrea,
I think, that this was fixed in the bug #559914
(http://bugzilla.gnome.org/show_bug.cgi?id=559914).

  Regards

    Marek


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