Blame SOURCES/desktop-file-utils-0.26-support-1.5.patch

337fe1
From 425177a28b6215e0745f95100160a08e810fd47c Mon Sep 17 00:00:00 2001
337fe1
From: David King <amigadave@amigadave.com>
337fe1
Date: Tue, 15 Feb 2022 10:54:40 +0000
337fe1
Subject: [PATCH 1/2] validate: support SingleMainWindow key from 1.5
337fe1
337fe1
Fixes https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/issues/59
337fe1
---
337fe1
 src/validate.c | 3 +++
337fe1
 1 file changed, 3 insertions(+)
337fe1
337fe1
diff --git a/src/validate.c b/src/validate.c
337fe1
index 62406ab..ebb03b5 100644
337fe1
--- a/src/validate.c
337fe1
+++ b/src/validate.c
337fe1
@@ -326,6 +326,9 @@ static DesktopKeyDefinition registered_desktop_keys[] = {
337fe1
   /* Since 1.4 */
337fe1
   { DESKTOP_BOOLEAN_TYPE,           "PrefersNonDefaultGPU", FALSE, FALSE, FALSE, NULL },
337fe1
 
337fe1
+  /* Since 1.5 */
337fe1
+  { DESKTOP_BOOLEAN_TYPE,           "SingleMainWindow", FALSE, FALSE, FALSE, NULL },
337fe1
+
337fe1
   /* Keys reserved for KDE */
337fe1
 
337fe1
   /* since 0.9.4 */
337fe1
-- 
337fe1
2.38.1
337fe1
337fe1
337fe1
From 56d220dd679c7c3a8f995a41a27a7d6f3df49dea Mon Sep 17 00:00:00 2001
337fe1
From: David King <amigadave@amigadave.com>
337fe1
Date: Tue, 15 Feb 2022 10:56:04 +0000
337fe1
Subject: [PATCH 2/2] validate: Support version 1.5
337fe1
337fe1
Bump CURRENT_SPEC_VERSION to 1.5.
337fe1
---
337fe1
 man/desktop-file-validate.1 | 2 +-
337fe1
 src/validate.c              | 3 +++
337fe1
 src/validate.h              | 2 +-
337fe1
 3 files changed, 5 insertions(+), 2 deletions(-)
337fe1
337fe1
diff --git a/man/desktop-file-validate.1 b/man/desktop-file-validate.1
337fe1
index 8e17411..ce87c47 100644
337fe1
--- a/man/desktop-file-validate.1
337fe1
+++ b/man/desktop-file-validate.1
337fe1
@@ -9,7 +9,7 @@ desktop-file-validate \- Validate desktop entry files
337fe1
 .B desktop-file-validate [\-\-no-hints] [\-\-no-warn-deprecated] [\-\-warn-kde] FILE...
337fe1
 .SH DESCRIPTION
337fe1
 The \fIdesktop-file-validate\fP program is a tool to validate desktop
337fe1
-entry files according to the Desktop Entry specification 1.4.
337fe1
+entry files according to the Desktop Entry specification 1.5.
337fe1
 .PP
337fe1
 The specification describes a file format to provide information such as
337fe1
 name, icon and description for an application. Such a file can then be
337fe1
diff --git a/src/validate.c b/src/validate.c
337fe1
index ebb03b5..f9eedee 100644
337fe1
--- a/src/validate.c
337fe1
+++ b/src/validate.c
337fe1
@@ -961,6 +961,9 @@ handle_version_key (kf_validator *kf,
337fe1
                     const char   *locale_key,
337fe1
                     const char   *value)
337fe1
 {
337fe1
+  if (!strcmp (value, "1.5"))
337fe1
+    return TRUE;
337fe1
+
337fe1
   if (!strcmp (value, "1.4"))
337fe1
     return TRUE;
337fe1
 
337fe1
diff --git a/src/validate.h b/src/validate.h
337fe1
index e6efd93..a7952cd 100644
337fe1
--- a/src/validate.h
337fe1
+++ b/src/validate.h
337fe1
@@ -30,7 +30,7 @@
337fe1
 
337fe1
 #include <glib.h>
337fe1
 
337fe1
-#define CURRENT_SPEC_VERSION "1.4"
337fe1
+#define CURRENT_SPEC_VERSION "1.5"
337fe1
 
337fe1
 #define GROUP_KDE_DESKTOP_ENTRY "KDE Desktop Entry"
337fe1
 #define GROUP_DESKTOP_ACTION "Desktop Action "
337fe1
-- 
337fe1
2.38.1
337fe1