summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-11-24 10:45:09 +0100
committerVictor Kareh <[email protected]>2020-12-11 13:18:31 -0500
commit7ffadcb35f4b3758f36b8337baba337a74d62c36 (patch)
tree40627f778b519a71d12187275b207ff1618a5793 /libcaja-private
parent7f9200cbdd5678a39262321538813f1963b807cb (diff)
downloadcaja-7ffadcb35f4b3758f36b8337baba337a74d62c36.tar.bz2
caja-7ffadcb35f4b3758f36b8337baba337a74d62c36.tar.xz
caja-directory-async: trust marked launchers
gio set PATH "metadata::caja-trusted-launcher" true
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-directory-async.c8
-rw-r--r--libcaja-private/caja-metadata.c1
-rw-r--r--libcaja-private/caja-metadata.h2
3 files changed, 11 insertions, 0 deletions
diff --git a/libcaja-private/caja-directory-async.c b/libcaja-private/caja-directory-async.c
index 874667d3..5a093a5d 100644
--- a/libcaja-private/caja-directory-async.c
+++ b/libcaja-private/caja-directory-async.c
@@ -35,6 +35,7 @@
#include "caja-file-attributes.h"
#include "caja-file-private.h"
#include "caja-file-utilities.h"
+#include "caja-metadata.h"
#include "caja-signaller.h"
#include "caja-global-preferences.h"
#include "caja-link.h"
@@ -3871,6 +3872,13 @@ is_link_trusted (CajaFile *file,
is_trusted_system_desktop_file (location) ||
caja_is_in_desktop_dir (location);
+ if (!res)
+ {
+ res = caja_file_get_boolean_metadata (file,
+ CAJA_METADATA_KEY_TRUSTED_LAUNCHER,
+ FALSE);
+ }
+
g_object_unref (location);
}
diff --git a/libcaja-private/caja-metadata.c b/libcaja-private/caja-metadata.c
index b854215d..da831f8b 100644
--- a/libcaja-private/caja-metadata.c
+++ b/libcaja-private/caja-metadata.c
@@ -59,6 +59,7 @@ static char *used_metadata_names[] =
CAJA_METADATA_KEY_CUSTOM_ICON,
CAJA_METADATA_KEY_SCREEN,
CAJA_METADATA_KEY_EMBLEMS,
+ CAJA_METADATA_KEY_TRUSTED_LAUNCHER,
NULL
};
diff --git a/libcaja-private/caja-metadata.h b/libcaja-private/caja-metadata.h
index 72eb4789..34ac7ac7 100644
--- a/libcaja-private/caja-metadata.h
+++ b/libcaja-private/caja-metadata.h
@@ -75,6 +75,8 @@
#define CAJA_METADATA_KEY_SCREEN "screen"
#define CAJA_METADATA_KEY_EMBLEMS "emblems"
+#define CAJA_METADATA_KEY_TRUSTED_LAUNCHER "caja-trusted-launcher"
+
guint caja_metadata_get_id (const char *metadata);
#endif /* CAJA_METADATA_H */