mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
Merge branch 'emoji-data-prefix-fix' into 'master'
emoji: Use a portable and configuration-dependent path to load the data See merge request GNOME/gtk!3522
This commit is contained in:
commit
febd143ac8
@ -31,7 +31,6 @@
|
||||
#include "gtkpopover.h"
|
||||
#include "gtkscrolledwindow.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkprivate.h"
|
||||
#include "gtksearchentryprivate.h"
|
||||
#include "gtktext.h"
|
||||
#include "gtknative.h"
|
||||
@ -627,11 +626,15 @@ get_emoji_data (void)
|
||||
if (g_error_matches (error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND))
|
||||
{
|
||||
char *filename;
|
||||
char *gresource_name;
|
||||
GMappedFile *file;
|
||||
|
||||
g_clear_error (&error);
|
||||
|
||||
filename = g_strconcat ("/usr/share/gtk-4.0/emoji/", lang, ".gresource", NULL);
|
||||
gresource_name = g_strconcat (lang, ".gresource", NULL);
|
||||
filename = g_build_filename (_gtk_get_data_prefix (), "share", "gtk-4.0",
|
||||
"emoji", gresource_name, NULL);
|
||||
g_clear_pointer (&gresource_name, g_free);
|
||||
file = g_mapped_file_new (filename, FALSE, NULL);
|
||||
|
||||
if (file)
|
||||
|
Loading…
Reference in New Issue
Block a user