Laszlo Ersek
2022-Sep-26 08:18 UTC
[Libguestfs] [p2v PATCH 7/7] gui.c: annotate GTK_INPUT_PURPOSE_PASSWORD with upstream GTK3 version
GTK_INPUT_PURPOSE_PASSWORD was introduced in upstream GTK3 commit 8a8c43473745 ("enums: Add purpose enum and hints flags.", 2012-08-20), first released in version 3.5.12. For some reason (potentially for accommodating distro backports to GTK3?), virt-p2v does not guard GTK_INPUT_PURPOSE_PASSWORD with GTK_CHECK_VERSION(). Thus, at least add a comment that versions 3.5.12 and higher are sufficient (if not strictly necessary, considering backports) for GTK_INPUT_PURPOSE_PASSWORD to exist. Signed-off-by: Laszlo Ersek <lersek at redhat.com> --- gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui.c b/gui.c index 6e785497b968..42d6ce9c8cfc 100644 --- a/gui.c +++ b/gui.c @@ -247,7 +247,7 @@ create_connection_dialog (struct config *config) password_entry = gtk_entry_new (); gtk_label_set_mnemonic_widget (GTK_LABEL (password_label), password_entry); gtk_entry_set_visibility (GTK_ENTRY (password_entry), FALSE); -#ifdef GTK_INPUT_PURPOSE_PASSWORD +#ifdef GTK_INPUT_PURPOSE_PASSWORD /* guaranteed if gtk >= 3.5.12 */ gtk_entry_set_input_purpose (GTK_ENTRY (password_entry), GTK_INPUT_PURPOSE_PASSWORD); #endif
Richard W.M. Jones
2022-Sep-26 11:59 UTC
[Libguestfs] [p2v PATCH 7/7] gui.c: annotate GTK_INPUT_PURPOSE_PASSWORD with upstream GTK3 version
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. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW