caja-extensions: update to 1.28.0.

This commit is contained in:
Đoàn Trần Công Danh 2024-03-04 23:44:26 +07:00 committed by Đoàn Trần Công Danh
parent 5addb33d60
commit 2e308a49e4
5 changed files with 22 additions and 224 deletions

1
srcpkgs/caja-av Symbolic link
View file

@ -0,0 +1 @@
caja-extensions

View file

@ -1,24 +0,0 @@
From dac72f1d7b4ab1f24bdc64bd2b3f96bd0e30e489 Mon Sep 17 00:00:00 2001
From: David Henry <davi.henry@orange.fr>
Date: Fri, 18 Nov 2022 22:28:01 +0000
Subject: [PATCH] Fix missing GtkRadioButton id
Add missing id to custom scale radio button referenced in caja-image-resizer.c
This fixes issue #104.
---
image-converter/caja-image-resize.ui | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/image-converter/caja-image-resize.ui b/image-converter/caja-image-resize.ui
index 5fe0ea35..f3bcbce4 100644
--- a/image-converter/caja-image-resize.ui
+++ b/image-converter/caja-image-resize.ui
@@ -183,7 +183,7 @@
<property name="can_focus">False</property>
<property name="spacing">8</property>
<child>
- <object class="GtkRadioButton">
+ <object class="GtkRadioButton" id="custom_pct_radiobutton">
<property name="label" translatable="yes">Scale:</property>
<property name="visible">True</property>
<property name="can_focus">True</property>

View file

@ -1,132 +0,0 @@
From 652e145d2c5e2a9658eed7a665fe5a295503940b Mon Sep 17 00:00:00 2001
From: Xiaotian Wu <yetist@gmail.com>
Date: Mon, 16 Oct 2023 10:42:27 +0800
Subject: [PATCH] sendto: require gupnp-1.6
---
configure.ac | 6 ++---
sendto/plugins/upnp/upnp.c | 48 ++++++++++++++++++++++----------------
2 files changed, 30 insertions(+), 24 deletions(-)
diff --git a/configure.ac b/configure.ac
index a6c506c..5fedb4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,7 +100,7 @@ if test "x$enable_sendto" = "xyes"; then
GTHREAD_REQUIRED=2.6.0
DBUS_REQUIRED=1.0
DBUS_GLIB_REQUIRED=0.60
- GUPNP_REQUIRED=0.13
+ GUPNP_REQUIRED=1.6
PKG_CHECK_MODULES(SENDTO,
glib-2.0 >= $GLIB_REQUIRED
gthread-2.0 >= $GTHREAD_REQUIRED
@@ -214,9 +214,7 @@ if test "x$enable_sendto" = "xyes"; then
fi
;;
upnp)
- PKG_CHECK_MODULES(UPNP, gupnp-1.2 >= $GUPNP_REQUIRED,
- enable_upnp=yes AC_DEFINE([HAS_GUPNP_VERSION_1_2], 1, ["Version is at least 1.2"]), enable_upnp=no)
- PKG_CHECK_MODULES(UPNP, gupnp-1.0 >= $GUPNP_REQUIRED,
+ PKG_CHECK_MODULES(UPNP, gupnp-1.6 >= $GUPNP_REQUIRED,
enable_upnp=yes, enable_upnp=no)
if test "${enable_upnp}" != "yes" ; then
sendto_plugin_error_or_ignore "you need gupnp installed to build the upnp plugin"
diff --git a/sendto/plugins/upnp/upnp.c b/sendto/plugins/upnp/upnp.c
index 7b6775b..b770e37 100644
--- a/sendto/plugins/upnp/upnp.c
+++ b/sendto/plugins/upnp/upnp.c
@@ -87,25 +87,37 @@ check_required_actions (GUPnPServiceIntrospection *introspection)
}
static void
-get_introspection_cb (GUPnPServiceInfo *service_info,
- GUPnPServiceIntrospection *introspection, const GError *error,
- gpointer user_data)
+get_introspection_cb (GObject *source_object,
+ GAsyncResult *res,
+ gpointer user_data)
{
GUPnPDeviceInfo *device_info;
gchar *name;
const gchar *udn, *interface;
GtkTreeIter iter;
GUPnPContext *context;
+ GError *error = NULL;
device_info = GUPNP_DEVICE_INFO (user_data);
- if (introspection != NULL) {
- /* If introspection is available, make sure required actions
- * are implemented.
- */
- if (!check_required_actions (introspection))
- goto error;
- }
+ GUPnPServiceIntrospection *introspection =
+ gupnp_service_info_introspect_finish (GUPNP_SERVICE_INFO (GUPNP_SERVICE_INFO (source_object)),
+ res,
+ &error);
+ if (error) {
+ g_warning ("Failed to create introspection for '%s': %s",
+ gupnp_service_info_get_udn (GUPNP_SERVICE_INFO (source_object)),
+ error->message);
+ g_clear_error (&error);
+ goto error;
+ }
+
+ /* If introspection is available, make sure required actions
+ * are implemented.
+ */
+ if (!check_required_actions (introspection)) {
+ goto error;
+ }
udn = gupnp_device_info_get_udn (device_info);
if (G_UNLIKELY (udn == NULL))
@@ -129,10 +141,8 @@ get_introspection_cb (GUPnPServiceInfo *service_info,
-1);
g_free (name);
-
+ g_object_unref (introspection);
error:
- /* We don't need the proxy objects anymore */
- g_object_unref (service_info);
g_object_ref (device_info);
}
@@ -148,9 +158,10 @@ device_proxy_available_cb (GUPnPControlPoint *cp,
return;
}
- gupnp_service_info_get_introspection_async (info,
- get_introspection_cb,
- g_object_ref (proxy));
+ gupnp_service_info_introspect_async (info,
+ NULL,
+ get_introspection_cb,
+ g_object_ref (proxy));
}
static void
@@ -211,11 +222,7 @@ init (NstPlugin *plugin)
return FALSE;
g_free (upload_cmd);
-#ifdef HAS_GUPNP_VERSION_1_2
context_manager = gupnp_context_manager_create (0);
-#else
- context_manager = gupnp_context_manager_new (NULL, 0);
-#endif
g_assert (context_manager != NULL);
g_signal_connect (context_manager, "context-available",
G_CALLBACK (on_context_available), NULL);
@@ -275,6 +282,7 @@ send_files (NstPlugin *plugin,
g_ptr_array_add (argv, "15"); /* discovery timeout (seconds) */
g_ptr_array_add (argv, "-e");
g_ptr_array_add (argv, interface);
+ g_ptr_array_add (argv, "-u");
g_ptr_array_add (argv, udn);
for (l = file_list ; l; l=l->next) {
gchar *file_path;

View file

@ -1,58 +0,0 @@
From 91cc4665e9d707fd1015fb5c952816d13ef37693 Mon Sep 17 00:00:00 2001
From: Goffredo Baroncelli <kreijack@inwind.it>
Date: Sun, 6 Nov 2022 16:17:04 +0100
Subject: [PATCH] xattr-tags-extension: avoid check xattr for mtp:// and
gphoto2://
Some protocols (like mtp://), doesn't support xattr. In this
case avoid to check the xattr-tags to not have
poor performance.
This patch blacklist mtp:// and gphoto2://.
---
xattr-tags/caja-xattr-tags-extension.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/xattr-tags/caja-xattr-tags-extension.c b/xattr-tags/caja-xattr-tags-extension.c
index a3c8993..ab6450d 100644
--- a/xattr-tags/caja-xattr-tags-extension.c
+++ b/xattr-tags/caja-xattr-tags-extension.c
@@ -50,6 +50,16 @@ typedef struct {
GClosure *update_complete;
} CajaXattrTagsHandle;
+/* List of protocols that don't support xattr retriving,
+ * so we can skip it safetely
+ */
+static gchar *protocols_blacklist[] = {
+ "mtp://",
+ "gphoto2://",
+
+ NULL
+};
+
/* Stolen code: why they didn't expose it!?
* file: glocalfileinfo.c
* function: hex_unescape_string
@@ -107,8 +117,21 @@ static gchar *caja_xattr_tags_get_xdg_tags(CajaFileInfo *file)
gchar *tags = NULL, *uri;
GFile *location;
GFileInfo *info;
+ int i;
uri = caja_file_info_get_activation_uri (file);
+ for (i = 0 ; protocols_blacklist[i] ; i++) {
+ int l = strlen(protocols_blacklist[i]);
+
+ if (strlen(uri) < l)
+ continue;
+ if (strncasecmp(uri, protocols_blacklist[i], l))
+ continue;
+
+ g_free (uri);
+ return NULL;
+ }
+
location = g_file_new_for_uri (uri);
info = g_file_query_info (location,
G_FILE_ATTRIBUTE_XATTR_XDG_TAGS,

View file

@ -1,12 +1,12 @@
# Template file for 'caja-extensions'
pkgname=caja-extensions
version=1.26.1
revision=3
version=1.28.0
revision=1
build_style=gnu-configure
configure_args="--disable-gksu --disable-static"
hostmakedepends="pkg-config intltool glib-devel libxml2
automake gettext-devel-tools libtool gtk-doc"
makedepends="libcaja-devel mate-desktop-devel dbus-glib-devel gupnp-devel"
hostmakedepends="pkg-config intltool glib-devel libxml2 gettext"
makedepends="libcaja-devel mate-desktop-devel dbus-glib-devel gupnp-devel
gst-plugins-base1-devel totem-devel gtk+3-devel dbus-devel"
depends="caja"
short_desc="Extensions for the MATE Caja file manager"
maintainer="skmpz <dem.procopiou@gmail.com>"
@ -14,11 +14,7 @@ license="GPL-2.0-or-later"
homepage="https://mate-desktop.org"
changelog="https://raw.githubusercontent.com/mate-desktop/caja-extensions/master/NEWS"
distfiles="https://pub.mate-desktop.org/releases/${version%.*}/${pkgname}-${version}.tar.xz"
checksum=589c19e3fa10242d6239a5ccb9585598436a56ebe94d2eb2a50b5950cce1d520
pre_configure() {
autoreconf -fi
}
checksum=d2986c5e0740835fe271cfbd5823eeeaf03291af1763203f4700abb8109e3175
post_install() {
rm -rf ${DESTDIR}/usr/include
@ -31,6 +27,7 @@ caja-image-converter_package() {
depends="caja-extensions ImageMagick"
pkg_install() {
vmove usr/lib/caja/extensions-2.0/libcaja-image-converter.so
vmove usr/share/caja/extensions/libcaja-image-converter.caja-extension
}
}
@ -39,6 +36,7 @@ caja-open-terminal_package() {
depends="caja-extensions"
pkg_install() {
vmove usr/lib/caja/extensions-2.0/libcaja-open-terminal.so
vmove usr/share/caja/extensions/libcaja-open-terminal.caja-extension
vmove usr/share/glib-2.0/schemas/org.mate.caja-open-terminal.gschema.xml
}
}
@ -50,6 +48,7 @@ caja-sendto_package() {
vmove usr/bin/caja-sendto
vmove usr/lib/caja-sendto
vmove usr/lib/caja/extensions-2.0/libcaja-sendto.so
vmove usr/share/caja/extensions/libcaja-sendto.caja-extension
vmove usr/share/glib-2.0/schemas/org.mate.Caja.Sendto.gschema.xml
vmove usr/share/man/man1/caja-sendto.1
}
@ -60,6 +59,7 @@ caja-share_package() {
depends="caja-extensions samba"
pkg_install() {
vmove usr/lib/caja/extensions-2.0/libcaja-share.so
vmove usr/share/caja/extensions/libcaja-share.caja-extension
vmove usr/share/caja-extensions/share-dialog.ui
}
}
@ -69,6 +69,7 @@ caja-wallpaper_package() {
depends="caja-extensions"
pkg_install() {
vmove usr/lib/caja/extensions-2.0/libcaja-wallpaper.so
vmove usr/share/caja/extensions/libcaja-wallpaper.caja-extension
}
}
@ -77,5 +78,15 @@ caja-xattr-tags_package() {
depends="caja-extensions"
pkg_install() {
vmove usr/lib/caja/extensions-2.0/libcaja-xattr-tags.so
vmove usr/share/caja/extensions/libcaja-xattr-tags.caja-extension
}
}
caja-av_package() {
short_desc="Caja extension to see audio/video properties"
depends="caja-extensions"
pkg_install() {
vmove usr/lib/caja/extensions-2.0/libcaja-av.so
vmove usr/share/caja/extensions/libcaja-av.caja-extension
}
}