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

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