Skip to content
Commits on Source (37)
......@@ -11,7 +11,7 @@ include:
image: fedora:latest
variables:
LAST_ABI_BREAK: 9d01763ba2a3f71b7c0aade04d2ffa6a883e308d
LAST_ABI_BREAK: 0da1fcac914ad4c67f016bda7864c4b153cbfbaa
DEPENDENCIES: gtk3-devel gtk4-devel gsettings-desktop-schemas-devel gettext
gtk-doc libxkbcommon-devel xkeyboard-config-devel itstool
gobject-introspection-devel systemd-devel iso-codes-devel
......
=============
Version 42.3
Version 43.alpha
=============
- No changes
=============
Version 42.2
=============
- Don't try to use bubblewrap inside snaps
=============
Version 42.1
=============
- Fix build_gtk4 option
- Don't use bubblewrap inside snaps since those are already sandboxed
- Remove gnome-version.xml
- Add GCancellable and GError to the thumbnail API
- Make it possible to disable gobject-introspection generation
- Revert "thumbnails: keep the original file name"
- Include a header defining GNOME_DESKTOP_PLATFORM_VERSION
- Translation updates
=============
Version 42.0
=============
- No changes
=============
Version 42.rc
=============
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0"?>
<gnome-version>
<platform>@GNOME_PLATFORM@</platform>
<minor>@GNOME_MINOR@</minor>
<micro>@GNOME_MICRO@</micro>
<distributor>@GNOME_DISTRIBUTOR@</distributor>
@GNOME_DATE_COMMENT_START@<date>@GNOME_DATE@</date>@GNOME_DATE_COMMENT_END@
</gnome-version>
\ No newline at end of file
......@@ -30,6 +30,7 @@
#endif
#include <gdk/gdk.h>
#include <libgnome-desktop/gnome-desktop-version.h>
G_BEGIN_DECLS
......
......@@ -30,6 +30,7 @@
#endif
#include <gio/gio.h>
#include <libgnome-desktop/gnome-desktop-version.h>
G_BEGIN_DECLS
......
......@@ -2153,6 +2153,7 @@ create_thumbnail_for_filename (GnomeDesktopThumbnailFactory *factory,
time_t mtime;
GdkPixbuf *orig, *result = NULL;
char *uri;
GError *error = NULL;
mtime = get_mtime (filename);
......@@ -2194,10 +2195,18 @@ create_thumbnail_for_filename (GnomeDesktopThumbnailFactory *factory,
g_object_unref (orig);
gnome_desktop_thumbnail_factory_save_thumbnail (factory, result, uri, mtime);
gnome_desktop_thumbnail_factory_save_thumbnail (factory, result, uri, mtime, NULL, &error);
if (error) {
g_warning ("Error while saving thumbnail: %s", error->message);
g_error_free (error);
}
}
else {
gnome_desktop_thumbnail_factory_create_failed_thumbnail (factory, uri, mtime);
gnome_desktop_thumbnail_factory_create_failed_thumbnail (factory, uri, mtime, NULL, &error);
if (error) {
g_warning ("Error while creating failed thumbnail: %s", error->message);
g_error_free (error);
}
}
}
......
......@@ -35,6 +35,7 @@
#include <libgnome-desktop/gnome-desktop-thumbnail.h>
#include <libgnome-desktop/gnome-bg-crossfade.h>
#include <gdesktop-enums.h>
#include <libgnome-desktop/gnome-desktop-version.h>
G_BEGIN_DECLS
......
......@@ -2237,6 +2237,7 @@ create_thumbnail_for_filename (GnomeDesktopThumbnailFactory *factory,
time_t mtime;
GdkPixbuf *orig, *result = NULL;
char *uri;
GError *error = NULL;
mtime = get_mtime (filename);
......@@ -2278,10 +2279,18 @@ create_thumbnail_for_filename (GnomeDesktopThumbnailFactory *factory,
g_object_unref (orig);
gnome_desktop_thumbnail_factory_save_thumbnail (factory, result, uri, mtime);
gnome_desktop_thumbnail_factory_save_thumbnail (factory, result, uri, mtime, NULL, &error);
if (error) {
g_warning ("Error while saving thumbnail: %s", error->message);
g_error_free (error);
}
}
else {
gnome_desktop_thumbnail_factory_create_failed_thumbnail (factory, uri, mtime);
gnome_desktop_thumbnail_factory_create_failed_thumbnail (factory, uri, mtime, NULL, &error);
if (error) {
g_warning ("Error while creating failed thumbnail: %s", error->message);
g_error_free (error);
}
}
}
......
......@@ -155,6 +155,21 @@ create_gst_cache_dir (void)
return out;
}
static char *
get_extension (const char *path)
{
g_autofree char *basename = NULL;
char *p;
basename = g_path_get_basename (path);
p = strrchr (basename, '.');
if (g_file_test (path, G_FILE_TEST_IS_DIR) ||
!p ||
p == basename) /* Leading periods on the basename are ignored. */
return NULL;
return g_strdup (p + 1);
}
#ifdef ENABLE_SECCOMP
static gboolean
flatpak_fail (GError **error,
......@@ -954,8 +969,8 @@ script_exec_new (const char *uri,
if (exec->sandbox == SANDBOX_TYPE_BWRAP)
{
char *tmpl;
const char *infile;
g_autofree char *basename = NULL;
g_autofree char *ext = NULL;
g_autofree char *infile = NULL;
exec->fd_array = g_array_new (FALSE, TRUE, sizeof (int));
g_array_set_clear_func (exec->fd_array, clear_fd);
......@@ -969,12 +984,12 @@ script_exec_new (const char *uri,
goto bail;
}
exec->outfile = g_build_filename (exec->outdir, "gnome-desktop-thumbnailer.png", NULL);
basename = g_file_get_basename (file);
ext = get_extension (exec->infile);
if (basename)
infile = basename;
if (ext)
infile = g_strdup_printf ("gnome-desktop-file-to-thumbnail.%s", ext);
else
infile = "gnome-desktop-file-to-thumbnail";
infile = g_strdup_printf ("gnome-desktop-file-to-thumbnail");
exec->infile_tmp = g_build_filename (exec->outdir, infile, NULL);
......
......@@ -34,6 +34,7 @@
#include <glib-object.h>
#include <time.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libgnome-desktop/gnome-desktop-version.h>
G_BEGIN_DECLS
......@@ -80,16 +81,22 @@ gboolean gnome_desktop_thumbnail_factory_can_thumbnail (GnomeDeskt
const char *uri,
const char *mime_type,
time_t mtime);
GdkPixbuf * gnome_desktop_thumbnail_factory_generate_thumbnail (GnomeDesktopThumbnailFactory *factory,
const char *uri,
const char *mime_type);
void gnome_desktop_thumbnail_factory_save_thumbnail (GnomeDesktopThumbnailFactory *factory,
GdkPixbuf *thumbnail,
const char *uri,
time_t original_mtime);
void gnome_desktop_thumbnail_factory_create_failed_thumbnail (GnomeDesktopThumbnailFactory *factory,
const char *uri,
time_t mtime);
GdkPixbuf * gnome_desktop_thumbnail_factory_generate_thumbnail (GnomeDesktopThumbnailFactory *factory,
const char *uri,
const char *mime_type,
GCancellable *cancellable,
GError **error);
gboolean gnome_desktop_thumbnail_factory_save_thumbnail (GnomeDesktopThumbnailFactory *factory,
GdkPixbuf *thumbnail,
const char *uri,
time_t original_mtime,
GCancellable *cancellable,
GError **error);
gboolean gnome_desktop_thumbnail_factory_create_failed_thumbnail (GnomeDesktopThumbnailFactory *factory,
const char *uri,
time_t mtime,
GCancellable *cancellable,
GError **error);
void gnome_desktop_thumbnail_factory_generate_thumbnail_async (GnomeDesktopThumbnailFactory *factory,
const char *uri,
......@@ -110,7 +117,7 @@ void gnome_desktop_thumbnail_factory_save_thumbnail_async (Gno
GAsyncReadyCallback callback,
gpointer user_data);
void gnome_desktop_thumbnail_factory_save_thumbnail_finish (GnomeDesktopThumbnailFactory *factory,
gboolean gnome_desktop_thumbnail_factory_save_thumbnail_finish (GnomeDesktopThumbnailFactory *factory,
GAsyncResult *result,
GError **error);
......@@ -121,7 +128,7 @@ void gnome_desktop_thumbnail_factory_create_failed_thumbnail_a
GAsyncReadyCallback callback,
gpointer user_data);
void gnome_desktop_thumbnail_factory_create_failed_thumbnail_finish (GnomeDesktopThumbnailFactory *factory,
gboolean gnome_desktop_thumbnail_factory_create_failed_thumbnail_finish (GnomeDesktopThumbnailFactory *factory,
GAsyncResult *result,
GError **error);
......
/* gnome-desktop-version.c
*
* Copyright (C) 2022 Sergio Costas
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*/
#include <libgnome-desktop/gnome-desktop-version.h>
/**
* gnome_get_platform_version:
*
* Returns an integer with the major version of GNOME. Useful for
* dynamic languages like Javascript or Python (static languages like
* C should use %GNOME_DESKTOP_PLATFORM_VERSION). If this
* function doesn't exist, it can be presumed that the GNOME platform
* version is 42 or previous.
*
* Return value: an integer with the major version of GNOME.
*
* Since: 43.0
**/
int
gnome_get_platform_version (void)
{
return GNOME_DESKTOP_PLATFORM_VERSION;
}
/* gnome-desktop-version.h
*
* Copyright (C) 2022 Sergio Costas
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*/
#ifndef __GNOME_DESKTOP_VERSION_H__
#define __GNOME_DESKTOP_VERSION_H__
#define GNOME_DESKTOP_PLATFORM_VERSION @GNOME_PLATFORM@
int gnome_get_platform_version (void);
#endif
......@@ -28,6 +28,7 @@
#endif
#include <glib-object.h>
#include <libgnome-desktop/gnome-desktop-version.h>
G_BEGIN_DECLS
......
......@@ -28,6 +28,7 @@
#endif
#include <glib.h>
#include <libgnome-desktop/gnome-desktop-version.h>
G_BEGIN_DECLS
......
......@@ -21,6 +21,7 @@
#define __GNOME_PNP_IDS_H
#include <glib-object.h>
#include <libgnome-desktop/gnome-desktop-version.h>
G_BEGIN_DECLS
......
......@@ -33,6 +33,7 @@
#include <glib.h>
#include <glib-object.h>
#include <libgnome-desktop/gnome-rr.h>
#include <libgnome-desktop/gnome-desktop-version.h>
typedef struct _GnomeRROutputInfo GnomeRROutputInfo;
typedef struct _GnomeRROutputInfoClass GnomeRROutputInfoClass;
......