On Sun, Dec 06, 2020 at 09:30:02PM +0100, Christian Weisgerber wrote:
> Antoine Jacoutot:
> 
> > CVSROOT:    /cvs
> > Module name:        ports
> > Changes by: [email protected]       2020/12/06 02:00:22
> > 
> > Modified files:
> >     x11/gtk+3      : Makefile distinfo 
> >     x11/gtk+3/pkg  : PLIST-main 
> > 
> > Log message:
> > Update to gtk+3-3.24.24.
> > Amongst other changes:
> > - Allow the lpr backend to print pdf and ps files
> 
> Should we port this change back to x11/gtk+2?  I seem to remember
> that it affected GTK+2 too, back when Mozilla still used it.
> I don't know an actual GTK+2 application to test it on now, though.

Yes I think it's worth backporting it.
We still have lots of gtk+2 apps in tree.

ok aja



> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/x11/gtk+2/Makefile,v
> retrieving revision 1.236
> diff -u -p -r1.236 Makefile
> --- Makefile  11 Nov 2020 11:49:55 -0000      1.236
> +++ Makefile  6 Dec 2020 20:27:55 -0000
> @@ -11,7 +11,7 @@ GNOME_PROJECT=              gtk+
>  PKGNAME-main=                gtk+2-${GNOME_VERSION}
>  PKGNAME-cups=                gtk+2-cups-${GNOME_VERSION}
>  
> -REVISION-main=               10
> +REVISION-main=               11
>  REVISION-cups=               4
>  
>  CATEGORIES=          x11 devel
> Index: patches/patch-modules_printbackends_lpr_gtkprintbackendlpr_c
> ===================================================================
> RCS file: patches/patch-modules_printbackends_lpr_gtkprintbackendlpr_c
> diff -N patches/patch-modules_printbackends_lpr_gtkprintbackendlpr_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-modules_printbackends_lpr_gtkprintbackendlpr_c      6 Dec 
> 2020 20:27:55 -0000
> @@ -0,0 +1,25 @@
> +$OpenBSD$
> +
> +Allow attempts to print PDF and PS files using the LPR backend.
> +https://gitlab.gnome.org/GNOME/gtk/-/commit/8d5357ee56b1d34fe14346ed15004f9e4d571594
> +
> +Index: modules/printbackends/lpr/gtkprintbackendlpr.c
> +--- modules/printbackends/lpr/gtkprintbackendlpr.c.orig
> ++++ modules/printbackends/lpr/gtkprintbackendlpr.c
> +@@ -392,9 +392,13 @@ gtk_print_backend_lpr_init (GtkPrintBackendLpr *backen
> + {
> +   GtkPrinter *printer;
> + 
> +-  printer = gtk_printer_new (_("Print to LPR"),
> +-                         GTK_PRINT_BACKEND (backend),
> +-                         TRUE); 
> ++  printer = g_object_new (GTK_TYPE_PRINTER,
> ++                      "name", _("Print to LPR"),
> ++                      "backend", backend,
> ++                      "is-virtual", FALSE,
> ++                      "accepts-pdf", TRUE,
> ++                      "accepts-ps", TRUE,
> ++                      NULL);
> +   gtk_printer_set_has_details (printer, TRUE);
> +   gtk_printer_set_icon_name (printer, "gtk-print");
> +   gtk_printer_set_is_active (printer, TRUE);
> -- 
> Christian "naddy" Weisgerber                          [email protected]
> 

-- 
Antoine

Reply via email to