GNOME Bugzilla – Bug 660769
Handle other paper sizes
Last modified: 2019-03-20 10:56:06 UTC
We currently only handle A4 and Letter as papersizes, we should also handle others like B5 (popular in Japan), and the ones listed in: http://git.gnome.org/browse/gtk+/tree/gtk/gtkpapersize.h A4 and letter are going to be absolutely useless for a photo printer for example.
Created attachment 308074 [details] [review] print-notifications: Fix setting of page size This patch sets PPD's 'PageSize' attribute instead of IPP's 'media' attribute. We've changed this in gnome-control-center too since setting 'PageSize' is safer choice when setting default paper size.
Created attachment 308075 [details] [review] Don't set unsupported paper size This patch fixes the reported problem by checking whether the paper size selected according to locale is present among paper sizes listed in the printer's PPD file. If it is not there then it keeps what the PPD has as its default.
Review of attachment 308074 [details] [review]: Sure.
Review of attachment 308075 [details] [review]: ::: plugins/print-notifications/gsd-printer.c @@ +771,2 @@ + if (ppd_size != NULL) + size_is_present = TRUE; indentation. @@ +778,2 @@ + if (size_is_present) { + proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, Any chance to replace this by an async call? You'd be blocking the whole of gnome-settings-daemon with that. @@ +789,1 @@ g_warning ("%s", error->message); if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) g_warning()... @@ +809,3 @@ + g_variant_unref (output); + } else { + if (!(error->domain == G_DBUS_ERROR && g_error_matches()
Created attachment 308203 [details] [review] Don't set unsupported paper size (In reply to Bastien Nocera from comment #4) > Review of attachment 308075 [details] [review] [review]: > > ::: plugins/print-notifications/gsd-printer.c > @@ +771,2 @@ > + if (ppd_size != NULL) > + size_is_present = TRUE; > > indentation. Fixed. > @@ +778,2 @@ > + if (size_is_present) { > + proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, > > Any chance to replace this by an async call? You'd be blocking the whole of > gnome-settings-daemon with that. Actually, it doesn't block gnome-settings-daemon. 'gsd-printer' is a binary which is executed asynchronously from gnome-settings-daemon and implements com.redhat.NewPrinterNotification and com.redhat.PrinterDriversInstaller DBus interfaces. > @@ +789,1 @@ > g_warning ("%s", error->message); > > if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) > g_warning()... Added. > @@ +809,3 @@ > + g_variant_unref (output); > + } else { > + if (!(error->domain == G_DBUS_ERROR && > > g_error_matches() Changed.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/177.