diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2008-05-21 02:17:30 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-05-21 02:17:30 +0000 |
commit | 59ae44d00ee7876b3c69fd462d515a4f50c55b6a (patch) | |
tree | 76c8f2df967022569c134fa9e177663ffb07b27f /gtk/gtkpagesetupunixdialog.c | |
parent | 75a9722aa14784e70c49b988ce28589eceb752e3 (diff) | |
download | gtk+-59ae44d00ee7876b3c69fd462d515a4f50c55b6a.tar.gz |
RH bug 204621 - "GtkPrint" asks for "Letter" size paper when "A4" size
was chosen
Patch by Marek Kasik.
* gtk/gtk.symbols:
* gtk/gtkprinter.[hc]: Add gtk_printer_get_default_page_size.
* gtk/gtkprintbackend.[hc]: Add fallback implementation.
* modules/printbackends/file/gtkprintbackendfile.c:
* modules/printbackends/cups/gtkprintbackendcups.c: Implement
get_default_page_size.
* gtk/gtkpagesetupunixdialog.c: When selecting a different printer,
select its default paper size.
* gtk/gtkprintunixdialog.c: If no explicit page setup has been set,
use the printer default.
* gtk/gtkprintoperation-unix.c: Don't create an empty page setup
if we don't have a default page setup.
svn path=/trunk/; revision=20120
Diffstat (limited to 'gtk/gtkpagesetupunixdialog.c')
-rw-r--r-- | gtk/gtkpagesetupunixdialog.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c index 00b6da074a..8d9cbc787e 100644 --- a/gtk/gtkpagesetupunixdialog.c +++ b/gtk/gtkpagesetupunixdialog.c @@ -681,8 +681,6 @@ fill_paper_sizes_from_printer (GtkPageSetupUnixDialog *dialog, GtkTreeIter iter; gint i; - current_page_setup = get_current_page_setup (dialog); - gtk_list_store_clear (priv->page_setup_list); if (printer == NULL) @@ -720,6 +718,15 @@ fill_paper_sizes_from_printer (GtkPageSetupUnixDialog *dialog, fill_custom_paper_sizes (dialog); + current_page_setup = NULL; + + /* When selecting a different printer, select its default paper size */ + if (printer != NULL) + current_page_setup = gtk_printer_get_default_page_size (printer); + + if (current_page_setup == NULL) + current_page_setup = get_current_page_setup (dialog); + if (!set_paper_size (dialog, current_page_setup, FALSE, FALSE)) set_paper_size (dialog, current_page_setup, TRUE, TRUE); |