diff options
author | rbuj <[email protected]> | 2020-11-24 10:45:09 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2022-07-21 19:33:49 +0200 |
commit | dafa898655727aeae05da2fcd1905933306151f8 (patch) | |
tree | 8bd7ef1aa917d04a4f2b5827b0d21ca2f555825b /libcaja-private | |
parent | 94cdc752d0030e828241ace821e7d303bb35ac58 (diff) | |
download | caja-dafa898655727aeae05da2fcd1905933306151f8.tar.bz2 caja-dafa898655727aeae05da2fcd1905933306151f8.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.c | 8 | ||||
-rw-r--r-- | libcaja-private/caja-metadata.c | 1 | ||||
-rw-r--r-- | libcaja-private/caja-metadata.h | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/libcaja-private/caja-directory-async.c b/libcaja-private/caja-directory-async.c index cd02177c..bff999b0 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 */ |