summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2019-08-10 08:54:32 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2019-08-10 16:48:18 -0700
commit4827b88fa34807425640d2a9f07bbf4ac4119ab3 (patch)
tree249a97aa3bbf2512946417ec2ef44224c12bb0e7
parentd89c22611893dcc1cde0ff36d2490f2fd6273e57 (diff)
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 <pburt0@gmail.com>
-rw-r--r--hardinfo/vendor.c7
1 files changed, 6 insertions, 1 deletions
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) ||