A hopefully better fix for commit 9f1c5fef1 when building with GpgME < 1.7.0.
authorAndrej Kacian <ticho@claws-mail.org>
Thu, 9 Nov 2017 19:31:26 +0000 (20:31 +0100)
committerAndrej Kacian <ticho@claws-mail.org>
Thu, 9 Nov 2017 19:31:26 +0000 (20:31 +0100)
gpgme_check_version() should only be used during
initialization, according to GpgME doc.

src/plugins/pgpcore/pgp_viewer.c

index 074245a..6826c4b 100644 (file)
@@ -279,10 +279,11 @@ static void pgpview_show_mime_part(TextView *textview, MimeInfo *partinfo)
        } else {
                TEXTVIEW_INSERT(_("\n  Key ID "));
 
-               if (gpgme_check_version("1.7.0"))
-                       TEXTVIEW_INSERT(key->fpr);
-               else
-                       TEXTVIEW_INSERT(sig->fpr);
+#if defined GPGME_VERSION_NUMBER && GPGME_VERSION_NUMBER >= 0x010700
+               TEXTVIEW_INSERT(key->fpr);
+#else
+               TEXTVIEW_INSERT(sig->fpr);
+#endif
 
                TEXTVIEW_INSERT(":\n\n");
                TEXTVIEW_INSERT(_("   This key is in your keyring.\n"));