From 4827b88fa34807425640d2a9f07bbf4ac4119ab3 Mon Sep 17 00:00:00 2001 From: Burt P Date: Sat, 10 Aug 2019 08:54:32 -0500 Subject: Add GTK_CHECK_VERSION(2, 18, 0) for links in label Alternative to https://github.com/lpereira/hardinfo/pull/418 Signed-off-by: Burt P --- hardinfo/vendor.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'hardinfo') diff --git a/hardinfo/vendor.c b/hardinfo/vendor.c index 5df57c52..83c99fcf 100644 --- a/hardinfo/vendor.c +++ b/hardinfo/vendor.c @@ -423,6 +423,11 @@ gchar *vendor_get_link(const gchar *id_str) gchar *vendor_get_link_from_vendor(const Vendor *v) { + gboolean label_link_ok = FALSE; +#if GTK_CHECK_VERSION(2, 18, 0) + label_link_ok = TRUE; +#endif + if (!v) { return g_strdup(_("Unknown")); } @@ -431,7 +436,7 @@ gchar *vendor_get_link_from_vendor(const Vendor *v) return g_strdup(v->name); } - if (params.markup_ok) { + if (params.markup_ok && label_link_ok) { const gchar *prefix; if (!strncmp(v->url, "http://", sizeof("http://") - 1) || -- cgit v1.2.3