Comment 85 for bug 10910

Revision history for this message
In , Timeless-bemail (timeless-bemail) wrote :

does it really make sense to favor LC_anything over CUPS settings?

if i have two printers and one is using metric and one is using letter, surely i can't possibly want an env var to break one or the other.

note that using setlocale() is not something I'd want to see. We do not need to have our fragile code confused by something which will almost certainly confuse it on random systems and in random places. Yes that means someone might be forced to parse a couple of env vars manually, however, that's life and it's better than breaking the rest of our code.

1 - if it exists, use a firefox-specific setting
    stored in the user's firefox profile
2 - retrieve paper size from gtk
    (and hence cups)
---------------questionable---------------
3 - infer paper size from LC_ALL
4 - infer paper size from LC_PAPER
5 - infer paper size from LANG
---------------questionable---------------
6 - if the system is using something that hints it isn't en-US default to a4

There are lots of people in the US, and just because I'm one of the stupid ones who isn't there doesn't mean we should magically do something strange to their systems.

http://mxr.mozilla.org/mozilla-central/source/widget/src/gtk2/nsPrintSettingsGTK.cpp

afaict, we use something called gtk_paper_size_get_name today and have since bug 193001 was fixed in 2008.

it's documented here:
http://library.gnome.org/devel/gtk/unstable/gtk-GtkPaperSize.html

Perhaps someone could figure out why it isn't doing the right thing instead of complaining about our behavior?

reporter: since you're able to use a compiler, could you please investigate?

someone who doesn't have a compiler is free to find a typical gnome app and (something like gedit) and indicate whether it gets this stuff right. if it does, then you could perhaps try to find someone who can compare our code (it's in the one file i listed above) with the gtk app's code.