[gnome-characters/wip/exalm/emoji] searchProvider: Hide codepoints for composite characters
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-characters/wip/exalm/emoji] searchProvider: Hide codepoints for composite characters
- Date: Fri, 11 Mar 2022 11:47:59 +0000 (UTC)
commit 8c095174e3156fcbdb45d185a06a35aeba27fed7
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Mar 11 14:27:44 2022 +0400
searchProvider: Hide codepoints for composite characters
Same as in the dialog.
src/searchProvider.js | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/searchProvider.js b/src/searchProvider.js
index f39b4e1..a117c04 100644
--- a/src/searchProvider.js
+++ b/src/searchProvider.js
@@ -81,14 +81,19 @@ var SearchProvider = GObject.registerClass({
for (let i = 0; i < identifiers.length; i++) {
let character = identifiers[i];
- let codePoint = Util.toCodePoint(character);
- let codePointHex = codePoint.toString(16).toUpperCase();
let name = Gc.character_name(character);
if (name === null)
name = _('Unknown character name');
else
name = Util.capitalize(name);
- let summary = _('U+%s').format(codePointHex);
+
+ let summary = '';
+
+ if (!Gc.character_is_composite(character)) {
+ let codePoint = Util.toCodePoint(character);
+ let codePointHex = codePoint.toString(16).toUpperCase();
+ summary = _('U+%s').format(codePointHex);
+ }
let iconData = Util.characterToIconData(character);
ret.push({
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]