Blame SOURCES/evolution-3.40.4-empty-emoji-picker.patch

cbefb6
From e75c4faa36a9eb17b88128e45f9e5d91628149f9 Mon Sep 17 00:00:00 2001
cbefb6
From: Milan Crha <mcrha@redhat.com>
cbefb6
Date: Mon, 4 Oct 2021 17:18:35 +0200
cbefb6
Subject: I#1646 - Emoji picker empty
cbefb6
cbefb6
Embed emoji.data as expected by the copy of the gtk+' emoji chooser dialog.
cbefb6
cbefb6
Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1646
cbefb6
cbefb6
diff --git a/data/org.gnome.Evolution.gresource.xml b/data/org.gnome.Evolution.gresource.xml
cbefb6
new file mode 100644
cbefb6
index 0000000000..783ed153b8
cbefb6
--- /dev/null
cbefb6
+++ b/data/org.gnome.Evolution.gresource.xml
cbefb6
@@ -0,0 +1,6 @@
cbefb6
+
cbefb6
+<gresources>
cbefb6
+  <gresource prefix="org.gnome.Evolution">
cbefb6
+    <file>emoji.data</file>
cbefb6
+  </gresource>
cbefb6
+</gresources>
cbefb6
diff --git a/src/e-util/CMakeLists.txt b/src/e-util/CMakeLists.txt
cbefb6
index 03b60d8e4b..6f63f29858 100644
cbefb6
--- a/src/e-util/CMakeLists.txt
cbefb6
+++ b/src/e-util/CMakeLists.txt
cbefb6
@@ -30,6 +30,8 @@ if(WIN32)
cbefb6
 	)
cbefb6
 endif(WIN32)
cbefb6
 
cbefb6
+glib_compile_resources(${CMAKE_SOURCE_DIR}/data/ ${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution.gresource org_gnome_evolution ../../data/org.gnome.Evolution.gresource.xml ${CMAKE_SOURCE_DIR}/data/emoji.data)
cbefb6
+
cbefb6
 # Main libevolution-util
cbefb6
 
cbefb6
 set(DEPENDENCIES
cbefb6
@@ -309,6 +311,8 @@ set(SOURCES
cbefb6
 	${PLATFORM_SOURCES}
cbefb6
 	${CMAKE_CURRENT_BINARY_DIR}/e-marshal.c
cbefb6
 	${CMAKE_CURRENT_BINARY_DIR}/e-util-enumtypes.c
cbefb6
+	${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution.gresource.c
cbefb6
+	${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution.gresource.h
cbefb6
 )
cbefb6
 
cbefb6
 set(HEADERS
cbefb6
diff --git a/src/e-util/e-gtkemojichooser.c b/src/e-util/e-gtkemojichooser.c
cbefb6
index ba4d15ecee..7d8aae3039 100644
cbefb6
--- a/src/e-util/e-gtkemojichooser.c
cbefb6
+++ b/src/e-util/e-gtkemojichooser.c
cbefb6
@@ -444,7 +444,7 @@ populate_emoji_chooser (gpointer data)
cbefb6
 
cbefb6
   if (!chooser->data)
cbefb6
     {
cbefb6
-      bytes = g_resources_lookup_data ("/org/gtk/libgtk/emoji/emoji.data", 0, NULL);
cbefb6
+      bytes = g_resources_lookup_data ("/org.gnome.Evolution/emoji.data", 0, NULL);
cbefb6
       chooser->data = g_variant_ref_sink (g_variant_new_from_bytes (G_VARIANT_TYPE ("a(auss)"), bytes, TRUE));
cbefb6
     }
cbefb6