Laszlo Ersek
2022-Sep-27 14:53 UTC
[Libguestfs] [p2v PATCH 7/7] gui.c: annotate GTK_INPUT_PURPOSE_PASSWORD with upstream GTK3 version
On 09/26/22 14:09, Daniel P. Berrang? wrote:> On Mon, Sep 26, 2022 at 12:59:21PM +0100, Richard W.M. Jones wrote: >> >> Apart from Dan's suggestions in patch 1, the series looks good to me. >> >> FWIW RHEL 7 (the earliest distro with PCRE 2) has glib2 2.56.1 & >> gtk3 3.22.30, so supporting any earlier versions also seems pointless, >> so that might be another thing to review. We could make USE_POPOVERS >> unconditional, and make gui-gtk3-compat.h considerably less >> complicated. > > Say you pick 3.22 as your official min and check this with pkg-config > in configure, then you can further define > > GDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_22 > GDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_22 > > The former will give you warnings if you use any API that was already > deprecated in 3.22 - this is something that should be re-written to > use the recommended modern alternative API.Is "GDK" a muscle-memory typo (because "GDK" does exist)? Did you mean GTK?> The latter will give you warnings if you use any API that was introduced > after 3.22 - this is to prevent you accidentally introducing usage of > APIs newer than your min version > > The same exists for glib via GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED.Thanks Laszlo
Daniel P. Berrangé
2022-Sep-27 15:59 UTC
[Libguestfs] [p2v PATCH 7/7] gui.c: annotate GTK_INPUT_PURPOSE_PASSWORD with upstream GTK3 version
On Tue, Sep 27, 2022 at 04:53:08PM +0200, Laszlo Ersek wrote:> On 09/26/22 14:09, Daniel P. Berrang? wrote: > > On Mon, Sep 26, 2022 at 12:59:21PM +0100, Richard W.M. Jones wrote: > >> > >> Apart from Dan's suggestions in patch 1, the series looks good to me. > >> > >> FWIW RHEL 7 (the earliest distro with PCRE 2) has glib2 2.56.1 & > >> gtk3 3.22.30, so supporting any earlier versions also seems pointless, > >> so that might be another thing to review. We could make USE_POPOVERS > >> unconditional, and make gui-gtk3-compat.h considerably less > >> complicated. > > > > Say you pick 3.22 as your official min and check this with pkg-config > > in configure, then you can further define > > > > GDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_22 > > GDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_22 > > > > The former will give you warnings if you use any API that was already > > deprecated in 3.22 - this is something that should be re-written to > > use the recommended modern alternative API. > > Is "GDK" a muscle-memory typo (because "GDK" does exist)? Did you mean GTK?It looks odd, but I really do mean GDK here. It affects both the GDK and GTK include files (GDK is a layer below GTK). With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|